Mercurial > piecrust2
changeset 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 | b91fe30ae7aa |
children | 3ab6f7a3a2c7 |
files | tests/test_baking_baker.py |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
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():