Commits

astaric committed 3c03510

Enabled running tests from setup.py.

  • Participants
  • Parent commits 95d81ef

Comments (0)

Files changed (3)

File Orange/testing/testing.py

     __IPYTHON__  #We are running tests from ipython
     if getattr(__IPYTHON__.shell, "call_pdb", None): # Is pdb enabled
         enable_pdb()
-except NameError:
+except:
     pass
 
 

File Orange/testing/unit/tests/__init__.py

+import os
+import unittest
+
+
+def suite():
+    test_dir = os.path.dirname(__file__)
+    return unittest.TestLoader().discover(test_dir, )
+
+test_suite = suite()
+
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='suite')
         entry_points = ENTRY_POINTS,
         include_package_data = True,
         zip_safe = False,
-
+        test_suite = 'Orange.testing.unit.tests.test_suite',
         cmdclass = cmdclass,
         ext_modules = ext_modules,
     )