More tests.
This commit is contained in:
@@ -38,6 +38,13 @@ def test_url_from_path():
|
||||
assert utils.url_from_path(os.sep.join(['foo', 'bar'])) == 'foo/bar'
|
||||
|
||||
|
||||
def test_url_from_windows_path(monkeypatch):
|
||||
monkeypatch.setattr('os.sep', "\\")
|
||||
path = os.sep.join(['foo', 'bar'])
|
||||
assert path == r'foo\bar'
|
||||
assert utils.url_from_path(path) == 'foo/bar'
|
||||
|
||||
|
||||
def test_read_markdown():
|
||||
src = os.path.join(SAMPLE_DIR, 'pictures', 'dir1', 'test1', '11.md')
|
||||
m = utils.read_markdown(src)
|
||||
|
||||
@@ -11,6 +11,11 @@ TEST_VIDEO = 'stallman software-freedom-day-low.ogv'
|
||||
SRCFILE = os.path.join(CURRENT_DIR, 'sample', 'pictures', 'video', TEST_VIDEO)
|
||||
|
||||
|
||||
def test_video_size():
|
||||
size_src = video_size(SRCFILE)
|
||||
assert size_src == (480, 270)
|
||||
|
||||
|
||||
def test_generate_video_fit_height(tmpdir):
|
||||
"""largest fitting dimension is height"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user