1
0
mirror of https://github.com/venthur/blag.git synced 2025-11-25 12:42:41 +00:00

Added some extra tests:

* test for static files
* generated files
* archive
* atom feed
* tags and tags-archive
This commit is contained in:
Bastian Venthur
2022-08-07 21:11:41 +02:00
parent 6e94a0c094
commit 641f0ed94e

View File

@@ -274,6 +274,22 @@ foo bar
blag.build(args)
# test existence of the three converted files
for i in range(3):
assert os.path.exists(f'{args.output_dir}/{i}.html')
# ... static file
assert os.path.exists(f'{args.output_dir}/test')
# ... directory
assert os.path.exists(f'{args.output_dir}/testdir/test')
# ... feed
assert os.path.exists(f'{args.output_dir}/atom.xml')
# ... archive
assert os.path.exists(f'{args.output_dir}/index.html')
# ... tags
assert os.path.exists(f'{args.output_dir}/tags/index.html')
assert os.path.exists(f'{args.output_dir}/tags/foo.html')
assert os.path.exists(f'{args.output_dir}/tags/bar.html')
def test_main(cleandir):
blag.main(['build'])