diff options
author | Christoph Zwerschke <cito@online.de> | 2010-08-19 13:55:33 +0200 |
---|---|---|
committer | Christoph Zwerschke <cito@online.de> | 2010-08-19 13:55:33 +0200 |
commit | aa7d0fb24140051ebffe8fd3717ae437193541a8 (patch) | |
tree | f21164b2e508f9bd0e58d96f8e5d4c199b0d0d96 | |
parent | 29d62c6d63199fd9739daf3fa362654b2a512c50 (diff) | |
download | paste-aa7d0fb24140051ebffe8fd3717ae437193541a8.tar.gz |
The reporter test never created the necessary output directory.
-rw-r--r-- | tests/test_exceptions/test_reporter.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/test_exceptions/test_reporter.py b/tests/test_exceptions/test_reporter.py index faf3657..8f4dc7a 100644 --- a/tests/test_exceptions/test_reporter.py +++ b/tests/test_exceptions/test_reporter.py @@ -4,15 +4,19 @@ from paste.exceptions.reporter import * from paste.exceptions import collector def setup_file(fn, content=None): - fn = os.path.join(os.path.dirname(__file__), 'reporter_output', fn) - if os.path.exists(fn): - os.unlink(fn) + dir = os.path.join(os.path.dirname(__file__), 'reporter_output') + fn = os.path.join(dir, fn) + if os.path.exists(dir): + if os.path.exists(fn): + os.unlink(fn) + else: + os.mkdir(dir) if content is not None: f = open(fn, 'wb') f.write(content) f.close() return fn - + def test_logger(): fn = setup_file('test_logger.log') rep = LogReporter( @@ -31,7 +35,7 @@ def test_logger(): assert 'int' in content assert 'test_reporter.py' in content assert 'test_logger' in content - + try: 1 / 0 except: |