PageRenderTime 13ms CodeModel.GetById 11ms RepoModel.GetById 1ms app.codeStats 0ms

/bangkokhotel/lib/python2.5/site-packages/django/utils/unittest/collector.py

https://bitbucket.org/luisrodriguez/bangkokhotel
Python | 9 lines | 7 code | 1 blank | 1 comment | 0 complexity | 4878a161fe7abedb5309f7916743ae3c MD5 | raw file
  1. import os
  2. import sys
  3. from django.utils.unittest.loader import defaultTestLoader
  4. def collector():
  5. # import __main__ triggers code re-execution
  6. __main__ = sys.modules['__main__']
  7. setupDir = os.path.abspath(os.path.dirname(__main__.__file__))
  8. return defaultTestLoader.discover(setupDir)