diff options
| author | Jason Madden <jason+github@nextthought.com> | 2017-06-08 21:19:13 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-06-08 21:19:13 -0500 |
| commit | 8bcfddcfbe8a597c7af0de191d51569fa1b1f603 (patch) | |
| tree | f03c9d8edeecfae1980656399efd0c8a869bc245 /src/zope/interface/common | |
| parent | 47cf89eee7d43d6c268fb0fef4bbe0567d977ae4 (diff) | |
| download | zope-interface-8bcfddcfbe8a597c7af0de191d51569fa1b1f603.tar.gz | |
Test sanity cleanups (#88)
* Test sanity cleanups
Partially addresses #87
- Remove manual lists of tests in favor of loadTestsFromName. This
mostly gets all test runners running the same number of tests.
- Remove `additional_tests`, which was just duplicating the discovered
tests. No modern test runner seems to need it.
- Change the two compatibility skip decorators to actually use
unitetest skips, which helps with the reporting.
* Per @tseaver, drop most test_suite functions.
* Port remaining doctest to unittest.
* Make the odd tests work on all supported python versions
Diffstat (limited to 'src/zope/interface/common')
| -rw-r--r-- | src/zope/interface/common/tests/test_idatetime.py | 10 | ||||
| -rw-r--r-- | src/zope/interface/common/tests/test_import_interfaces.py | 17 |
2 files changed, 4 insertions, 23 deletions
diff --git a/src/zope/interface/common/tests/test_idatetime.py b/src/zope/interface/common/tests/test_idatetime.py index 60f377e..496a5c9 100644 --- a/src/zope/interface/common/tests/test_idatetime.py +++ b/src/zope/interface/common/tests/test_idatetime.py @@ -35,13 +35,3 @@ class TestDateTimeInterfaces(unittest.TestCase): verifyClass(IDateClass, date) verifyClass(IDateTimeClass, datetime) verifyClass(ITimeClass, time) - - -def test_suite(): - suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestDateTimeInterfaces)) - return suite - - -if __name__ == '__main__': - unittest.main() diff --git a/src/zope/interface/common/tests/test_import_interfaces.py b/src/zope/interface/common/tests/test_import_interfaces.py index 908f05d..fe3766f 100644 --- a/src/zope/interface/common/tests/test_import_interfaces.py +++ b/src/zope/interface/common/tests/test_import_interfaces.py @@ -11,19 +11,10 @@ # FOR A PARTICULAR PURPOSE. # ############################################################################## -import doctest import unittest -def test_interface_import(): - """ - >>> import zope.interface.common.interfaces - """ - -def test_suite(): - return unittest.TestSuite(( - doctest.DocTestSuite(), - )) - -if __name__ == '__main__': - unittest.main(defaultTest='test_suite') +class TestInterfaceImport(unittest.TestCase): + def test_import(self): + import zope.interface.common.interfaces as x + self.assertIsNotNone(x) |
