diff options
| author | Jason Madden <jamadden@gmail.com> | 2021-03-18 08:37:37 -0500 |
|---|---|---|
| committer | Jason Madden <jamadden@gmail.com> | 2021-03-18 08:37:37 -0500 |
| commit | 968ccad5f7e0c5417fb3908cf431e17da3beac50 (patch) | |
| tree | 62a6189b8c6c4cbd8a9fa93a2edfb3a8bc094807 /src/zope/component/tests/test_interfaces.py | |
| parent | 41cafd34b01555bc5c8bb7fe1b6181a7acf32fe7 (diff) | |
| download | zope-component-issue59.tar.gz | |
Remove backwards compatibility imports.issue59
Fixes #59
Diffstat (limited to 'src/zope/component/tests/test_interfaces.py')
| -rw-r--r-- | src/zope/component/tests/test_interfaces.py | 40 |
1 files changed, 8 insertions, 32 deletions
diff --git a/src/zope/component/tests/test_interfaces.py b/src/zope/component/tests/test_interfaces.py index 353a212..4d1794d 100644 --- a/src/zope/component/tests/test_interfaces.py +++ b/src/zope/component/tests/test_interfaces.py @@ -17,37 +17,13 @@ Tests for zope.component.interfaces import unittest -class TestBackwardsCompat(unittest.TestCase): +class TestInterfaces(unittest.TestCase): - def test_interface_warnings(self): - from zope.component import interfaces - import warnings - for name in ( - 'ComponentLookupError', - 'Invalid', - 'IObjectEvent', - 'ObjectEvent', - 'IComponentLookup', - 'IRegistration', - 'IUtilityRegistration', - '_IBaseAdapterRegistration', - 'IAdapterRegistration', - 'ISubscriptionAdapterRegistration', - 'IHandlerRegistration', - 'IRegistrationEvent', - 'RegistrationEvent', - 'IRegistered', - 'Registered', - 'IUnregistered', - 'Unregistered', - 'IComponentRegistry', - 'IComponents', - ): - with warnings.catch_warnings(record=True) as log: - warnings.simplefilter("always") - getattr(interfaces, name) + def test_nothing(self): + """ + This exists only so that zope.testrunner doesn't complain this + module has no tests. - self.assertEqual(1, len(log), name) - message = str(log[0].message) - self.assertIn(name, message) - self.assertIn("Import from zope.interface.interfaces", message) + Even though this file is empty, we want to keep it around for ease + of browsing the history. + """ |
