1. Michael Merickel
  2. PasteScript

Commits

pjenvey  committed 1ea995d

convert to nose 0.11

  • Participants
  • Parent commits 4bb4d15
  • Branches default

Comments (0)

Files changed (5)

File setup.cfg

View file
  • Ignore whitespace
 [aliases]
 distribute = register sdist bdist_egg upload pudge publish
 
+[nosetests]
+exclude = testapp.py

File setup.py

View file
  • Ignore whitespace
       },
     zip_safe=False,
     scripts=['scripts/paster'],
+    test_suite='nose.collector',
+    tests_require=['nose>=0.11'],
     extras_require={
       'Templating': [],
       'Cheetah': ['Cheetah'],

File tests/__init__.py

View file
  • Ignore whitespace
+import sys
+import os
+import shutil
+import pkg_resources
+
+here = os.path.dirname(__file__)
+base = os.path.dirname(here)
+fake_packages = os.path.join(here, 'fake_packages')
+sys.path.append(fake_packages)
+sys.path.append(here)
+sys.path.insert(0, base)
+
+here = os.path.dirname(__file__)
+egg_info_dir = os.path.join(here, 'fake_packages', 'FakePlugin.egg',
+                            'EGG-INFO')
+info_dir = os.path.join(here, 'fake_packages', 'FakePlugin.egg',
+                        'FakePlugin.egg-info')
+
+if not os.path.exists(egg_info_dir):
+    try:
+        os.symlink(info_dir, egg_info_dir)
+    except:
+        shutil.copytree(info_dir, egg_info_dir)
+
+pkg_resources.working_set.add_entry(fake_packages)
+pkg_resources.working_set.add_entry(base)
+
+if not os.environ.get('PASTE_TESTING'):
+    output_dir = os.path.join(here, 'appsetup', 'output')
+    if os.path.exists(output_dir):
+        shutil.rmtree(output_dir)
+        
+pkg_resources.require('FakePlugin')
+

File tests/appsetup/__init__.py

  • Ignore whitespace
Empty file added.

File tests/conftest.py

  • Ignore whitespace
-import sys
-import os
-import shutil
-import pkg_resources
-
-here = os.path.dirname(__file__)
-base = os.path.dirname(here)
-fake_packages = os.path.join(here, 'fake_packages')
-sys.path.append(fake_packages)
-sys.path.append(here)
-sys.path.insert(0, base)
-
-here = os.path.dirname(__file__)
-egg_info_dir = os.path.join(here, 'fake_packages', 'FakePlugin.egg',
-                            'EGG-INFO')
-info_dir = os.path.join(here, 'fake_packages', 'FakePlugin.egg',
-                        'FakePlugin.egg-info')
-
-if not os.path.exists(egg_info_dir):
-    try:
-        os.symlink(info_dir, egg_info_dir)
-    except:
-        shutil.copytree(info_dir, egg_info_dir)
-
-pkg_resources.working_set.add_entry(fake_packages)
-pkg_resources.working_set.add_entry(base)
-
-if not os.environ.get('PASTE_TESTING'):
-    output_dir = os.path.join(here, 'appsetup', 'output')
-    if os.path.exists(output_dir):
-        shutil.rmtree(output_dir)
-        
-pkg_resources.require('FakePlugin')
-