More tests.

This commit is contained in:
Simon Conseil
2014-07-20 23:35:28 +02:00
parent 0e202d7adb
commit 979e04a16c
2 changed files with 12 additions and 0 deletions

View File

@@ -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)

View File

@@ -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"""