TEASER icon indicating copy to clipboard operation
TEASER copied to clipboard

parent setter of class building

Open jteeonerc opened this issue 7 years ago • 3 comments

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?

  • ...

jteeonerc avatar Sep 21 '17 15:09 jteeonerc

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 avatar Sep 21 '17 15:09 PRemmen

@PRemmen Can you help me with what exactly you want to test here?

StanleyRisch avatar Nov 14 '17 16:11 StanleyRisch

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.

PRemmen avatar Nov 22 '17 13:11 PRemmen