Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 356bdeb commit e1ba8dfCopy full SHA for e1ba8df
1 file changed
Lib/unittest/test/__main__.py
@@ -0,0 +1,18 @@
1
+import os
2
+import unittest
3
+
4
5
+def load_tests(loader, standard_tests, pattern):
6
+ # top level directory cached on loader instance
7
+ this_dir = os.path.dirname(__file__)
8
+ pattern = pattern or "test_*.py"
9
+ # We are inside unittest.test, so the top-level is two notches up
10
+ top_level_dir = os.path.dirname(os.path.dirname(this_dir))
11
+ package_tests = loader.discover(start_dir=this_dir, pattern=pattern,
12
+ top_level_dir=top_level_dir)
13
+ standard_tests.addTests(package_tests)
14
+ return standard_tests
15
16
17
+if __name__ == '__main__':
18
+ unittest.main()
0 commit comments