2021-04-01 23:03:49 +00:00
|
|
|
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):
|
2020-06-21 17:38:08 +00:00
|
|
|
return "SomeSubclass"
|
2018-11-11 11:24:24 +00:00
|
|
|
|
|
|
|
|
2020-01-11 17:24:50 +00:00
|
|
|
def test_subclassing():
|
2021-07-18 18:30:30 +00:00
|
|
|
a = SomeSubClass()
|
|
|
|
assert str(a) == "SomeSubclass"
|
|
|
|
assert type(a) is SomeSubClass
|