kopia lustrzana https://github.com/micropython/micropython-lib
unittest: isinstance(<class>, object) no works.
rodzic
525487137b
commit
a432e9ecf1
|
@ -29,8 +29,7 @@ def main(module="__main__"):
|
||||||
m = __import__(module)
|
m = __import__(module)
|
||||||
for tn in dir(m):
|
for tn in dir(m):
|
||||||
c = getattr(m, tn)
|
c = getattr(m, tn)
|
||||||
# workaround for isinstance(c, object) not working
|
if isinstance(c, object) and issubclass(c, TestCase):
|
||||||
if type(c) is type(object) and issubclass(c, TestCase):
|
|
||||||
o = c()
|
o = c()
|
||||||
for name in dir(o):
|
for name in dir(o):
|
||||||
if name.startswith("test"):
|
if name.startswith("test"):
|
||||||
|
|
Ładowanie…
Reference in New Issue