diff options
| author | ianb <devnull@localhost> | 2005-12-18 21:19:02 +0000 |
|---|---|---|
| committer | ianb <devnull@localhost> | 2005-12-18 21:19:02 +0000 |
| commit | 79320015c183266927dd776f075189752d20fa3f (patch) | |
| tree | 9abc12d5417d94e20a5e96f5325bba302306e221 /tests | |
| parent | 996f4fbc2119a6ff05aeb1efa55d4f3c58d45313 (diff) | |
| download | paste-79320015c183266927dd776f075189752d20fa3f.tar.gz | |
Added -W option to tests, which will turn warnings into errors (warnings haven't actually been removed yet, though). Split response and fileapp from wsgilib. Some portions of wsgilib may still move to response module, this is just the first cut
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/conftest.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index 227b059..658441c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,3 +6,25 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) import pkg_resources pkg_resources.require('Paste') pkg_resources.require('PasteDeploy') +pkg_resources.require('PasteScript') + +import py + +Option = py.test.Config.Option +option = py.test.Config.addoptions( + "Paste options", + Option('-W', + action="store_true", dest="raise_warnings", + default=False, + help="Turn warnings into errors")) + +class SetupDirectory(py.test.collect.Directory): + + def __init__(self, *args, **kw): + super(SetupDirectory, self).__init__(*args, **kw) + if option.raise_warnings: + print "Setting up warnings" + import warnings + warnings.filterwarnings('error') + +Directory = SetupDirectory |
