comparison tests/test_baking_baker.py @ 739:c6035785dbfc

tests: the `PageBaker` now needs to be shutdown. Otherwise it keeps the process alive because of its writer thread.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 02 Jun 2016 13:01:08 -0700
parents f987b29d6fab
children dca51cd8147a
comparison
equal deleted inserted replaced
738:b91fe30ae7aa 739:c6035785dbfc
43 assert app.config.get('site/pretty_urls') == pretty 43 assert app.config.get('site/pretty_urls') == pretty
44 44
45 for site_root in ['/', '/whatever/', '/~johndoe/']: 45 for site_root in ['/', '/whatever/', '/~johndoe/']:
46 app.config.set('site/root', urllib.parse.quote(site_root)) 46 app.config.set('site/root', urllib.parse.quote(site_root))
47 baker = PageBaker(app, '/destination') 47 baker = PageBaker(app, '/destination')
48 path = baker.getOutputPath(urllib.parse.quote(site_root) + uri) 48 try:
49 expected = os.path.normpath( 49 path = baker.getOutputPath(urllib.parse.quote(site_root) + uri)
50 os.path.join('/destination', expected)) 50 expected = os.path.normpath(
51 assert expected == path 51 os.path.join('/destination', expected))
52 assert expected == path
53 finally:
54 baker.shutdown()
52 55
53 56
54 def test_removed(): 57 def test_removed():
55 fs = (mock_fs() 58 fs = (mock_fs()
56 .withConfig() 59 .withConfig()