| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 87e1df3 commit 8effe30
4 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,6 +18,7 @@ | |||
| 18 | 18 | # other test modules that import System.Windows.Forms | |
| 19 | 19 | # run first. They must not do module level import/AddReference() | |
| 20 | 20 | # of the System.Windows.Forms namespace. | |
| 21 | + 'test_suite', | ||
| 21 | 22 | 'test_event', | |
| 22 | 23 | 'test_constructors', | |
| 23 | 24 | 'test_enum', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,10 @@ | |||
| 1 | + import unittest | ||
| 2 | + | ||
| 3 | + __all__ = ['test_suite'] | ||
| 4 | + | ||
| 5 | + from .test_import import test_suite as import_tests | ||
| 6 | + | ||
| 7 | + def test_suite(): | ||
| 8 | + suite = unittest.TestSuite() | ||
| 9 | + suite.addTests((import_tests(),)) | ||
| 10 | + return suite | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + | ||
| 2 | + import this_package_should_never_exist_ever | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,16 @@ | |||
| 1 | + import unittest | ||
| 2 | + | ||
| 3 | + class ImportTests(unittest.TestCase): | ||
| 4 | + """Test the import statement.""" | ||
| 5 | + | ||
| 6 | + def testRealtiveMissingImport(self): | ||
| 7 | + """Test that a relative missing import doesn't crash. Some modules use this to check if a package is installed (realtive import in the site-packages folder""" | ||
| 8 | + try: | ||
| 9 | + from . import _missing_import | ||
| 10 | + except ImportError: | ||
| 11 | + pass | ||
| 12 | + | ||
| 13 | + | ||
| 14 | + def test_suite(): | ||
| 15 | + return unittest.makeSuite(ImportTests) | ||
| 16 | + | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments