test_interfaces.py 556 B

1234567891011121314151617181920
  1. # This file is dual licensed under the terms of the Apache License, Version
  2. # 2.0, and the BSD License. See the LICENSE file in the root of this repository
  3. # for complete details.
  4. import abc
  5. from cryptography.utils import verify_interface
  6. class TestVerifyInterface:
  7. def test_noop(self):
  8. class SimpleInterface(metaclass=abc.ABCMeta):
  9. @abc.abstractmethod
  10. def method(self):
  11. """A simple method"""
  12. class NonImplementer:
  13. pass
  14. verify_interface(SimpleInterface, NonImplementer)