Commits

Anonymous committed 68d02f8

convert to nose 0.11

Comments (0)

Files changed (4)

     packages=find_packages(exclude='tests'),
     include_package_data=True,
     zip_safe=False,
+    test_suite='nose.collector',
+    tests_require=['nose>=0.11'],
     extras_require={
       'Config': [],
       'Paste': ['Paste'],

tests/__init__.py

+import os
+import sys
+
+here = os.path.dirname(__file__)
+base = os.path.dirname(here)
+sys.path.insert(0, base)
+
+# We can only import this after we adjust the paths
+import pkg_resources
+
+# Make absolutely sure we're testing *this* package, not
+# some other installed package
+pkg_resources.require('PasteDeploy')
+

tests/conftest.py

-import os
-import sys
-
-here = os.path.dirname(__file__)
-base = os.path.dirname(here)
-sys.path.insert(0, base)
-
-# We can only import this after we adjust the paths
-import pkg_resources
-
-# Make absolutely sure we're testing *this* package, not
-# some other installed package
-pkg_resources.require('PasteDeploy')
-

tests/test_config_middleware.py

+from nose.tools import assert_raises
 from paste.deploy.config import ConfigMiddleware
 from paste.fixture import TestApp
-from py.test import raises
 
 class Bug(Exception): pass
 
 def test_error():
     wrapped = ConfigMiddleware(app_with_exception, {'test': 1})
     test_app = TestApp(wrapped)
-    raises(Bug, "test_app.get('/')")
+    assert_raises(Bug, test_app.get, '/')