pyo3/pytests/tests/test_subclassing.py

13 lines
259 B
Python
Raw Normal View History

from pyo3_pytests.subclassing import Subclassable
2018-11-11 11:24:24 +00:00
class SomeSubClass(Subclassable):
2020-06-21 14:38:26 +00:00
def __str__(self):
return "SomeSubclass"
2018-11-11 11:24:24 +00:00
def test_subclassing():
2021-07-18 18:30:30 +00:00
a = SomeSubClass()
assert str(a) == "SomeSubclass"
assert type(a) is SomeSubClass