comparison tests/test_baking_baker.py @ 29:7e44f6092a1d

More unit tests for output bake paths.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 19 Aug 2014 11:51:09 -0700
parents 617191dec18e
children 3471ffa059b2
comparison
equal deleted inserted replaced
28:19f3ac27c3d5 29:7e44f6092a1d
12 ('foo', 2, True, 'foo/2/index.html'), 12 ('foo', 2, True, 'foo/2/index.html'),
13 ('foo/bar', 1, True, 'foo/bar/index.html'), 13 ('foo/bar', 1, True, 'foo/bar/index.html'),
14 ('foo/bar', 2, True, 'foo/bar/2/index.html'), 14 ('foo/bar', 2, True, 'foo/bar/2/index.html'),
15 ('foo.ext', 1, True, 'foo.ext/index.html'), 15 ('foo.ext', 1, True, 'foo.ext/index.html'),
16 ('foo.ext', 2, True, 'foo.ext/2/index.html'), 16 ('foo.ext', 2, True, 'foo.ext/2/index.html'),
17 ('foo/bar.ext', 1, True, 'foo/bar.ext/index.html'),
18 ('foo/bar.ext', 2, True, 'foo/bar.ext/2/index.html'),
17 ('foo.bar.ext', 1, True, 'foo.bar.ext/index.html'), 19 ('foo.bar.ext', 1, True, 'foo.bar.ext/index.html'),
18 ('foo.bar.ext', 2, True, 'foo.bar.ext/2/index.html'), 20 ('foo.bar.ext', 2, True, 'foo.bar.ext/2/index.html'),
19 # Ugly URLs 21 # Ugly URLs
20 ('', 1, False, 'index.html'), 22 ('', 1, False, 'index.html'),
21 ('', 2, False, '2.html'), 23 ('', 2, False, '2.html'),
23 ('foo', 2, False, 'foo/2.html'), 25 ('foo', 2, False, 'foo/2.html'),
24 ('foo/bar', 1, False, 'foo/bar.html'), 26 ('foo/bar', 1, False, 'foo/bar.html'),
25 ('foo/bar', 2, False, 'foo/bar/2.html'), 27 ('foo/bar', 2, False, 'foo/bar/2.html'),
26 ('foo.ext', 1, False, 'foo.ext'), 28 ('foo.ext', 1, False, 'foo.ext'),
27 ('foo.ext', 2, False, 'foo/2.ext'), 29 ('foo.ext', 2, False, 'foo/2.ext'),
30 ('foo/bar.ext', 1, False, 'foo/bar.ext'),
31 ('foo/bar.ext', 2, False, 'foo/bar/2.ext'),
28 ('foo.bar.ext', 1, False, 'foo.bar.ext'), 32 ('foo.bar.ext', 1, False, 'foo.bar.ext'),
29 ('foo.bar.ext', 2, False, 'foo.bar/2.ext') 33 ('foo.bar.ext', 2, False, 'foo.bar/2.ext')
30 ]) 34 ])
31 def test_get_output_path(uri, page_num, pretty, expected): 35 def test_get_output_path(uri, page_num, pretty, expected):
32 app = get_mock_app() 36 app = get_mock_app()