* 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).
11 lines
262 B
Python
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
|