Permalink
Browse files

use new startup way

  • Loading branch information...
1 parent aced9c6 commit e54e5c0711ef4bfe2164f39e12f36a6b9d7b505b @jedie committed May 30, 2012
Showing with 14 additions and 14 deletions.
  1. +14 −14 pylucid_project/pylucid_plugins/lexicon/tests.py
View
28 pylucid_project/pylucid_plugins/lexicon/tests.py
@@ -15,11 +15,22 @@
"""
-import os
+import sys
+
if __name__ == "__main__":
- # run all unittest directly
- os.environ['DJANGO_SETTINGS_MODULE'] = "pylucid_project.settings"
+ # Run all unittest directly
+
+ tests = __file__
+# tests = "pylucid_plugins.lexicon.tests.LexiconPluginTest1.test_error_handling"
+
+ from pylucid_project.tests import run_test_directly
+ run_test_directly(tests,
+ verbosity=2,
+ failfast=True
+ )
+ sys.exit()
+
from django.conf import settings
from django.core.urlresolvers import reverse
@@ -328,14 +339,3 @@ def test_es_redirect(self):
)
-if __name__ == "__main__":
- # Run all unittest directly
- from django.core import management
-
- tests = __file__
-# tests = "pylucid_plugins.lexicon.tests.LexiconPluginTest1.test_error_handling"
-
- management.call_command('test', tests,
- verbosity=2,
-# failfast=True
- )

0 comments on commit e54e5c0

Please sign in to comment.