Files
deb-python-pecan/pecan/tests/__init__.py
Ryan Petrello 7cdf9d3afd A handful of improvements:
* Fixing a few broken tests (https://github.com/dreamhost/pecan/issues/28)
* Removing py.test as a package requirement.
* Moving tests *into* the package.
* Adding code to use native unittest discovery (or unittest2 fallback).
2012-03-02 11:58:12 -05:00

11 lines
262 B
Python

__all__ = ['collector']
def collector():
try:
from unittest import TestLoader
assert hasattr(TestLoader, 'discover')
return TestLoader().discover('pecan.tests')
except:
import unittest2
return unittest2.collector