TEASER
TEASER copied to clipboard
parent setter of class building
parent setter of class building
What is the problem?
class building tests with the parent.setter if Building is a class. This will always return true. The test should be changed.
- ...
Why do we want to solve it?
- ...
How do we want to solve it?
- ...
https://docs.python.org/3/library/functions.html#issubclass seems to be the right builtin for this task,
Thanks for raising this issue @jteeonerc
@PRemmen Can you help me with what exactly you want to test here?
Actually I'm not sure anymore if we really need this. Because what we are trying to do is to add Building (and all inherited classes) to the parent.buildings
attribute.
You could try to just delete if inspect.isclass(Building):
(but keep the rows below) and run tests again.