Mercurial > piecrust2
diff 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 |
line wrap: on
line diff
--- a/tests/test_baking_baker.py Thu Jun 02 13:00:36 2016 -0700 +++ b/tests/test_baking_baker.py Thu Jun 02 13:01:08 2016 -0700 @@ -45,10 +45,13 @@ for site_root in ['/', '/whatever/', '/~johndoe/']: app.config.set('site/root', urllib.parse.quote(site_root)) baker = PageBaker(app, '/destination') - path = baker.getOutputPath(urllib.parse.quote(site_root) + uri) - expected = os.path.normpath( - os.path.join('/destination', expected)) - assert expected == path + try: + path = baker.getOutputPath(urllib.parse.quote(site_root) + uri) + expected = os.path.normpath( + os.path.join('/destination', expected)) + assert expected == path + finally: + baker.shutdown() def test_removed():