You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now, we have a list of all models to test and have a function for each of them. This is kind of ugly.
Therefore, I think we should have some method of dynamically getting a list of all models and importing them programmatically, and subsequently, testing them one by one.
Btw, personally, I do not think this is necessary. If we want to simplify testing, I would rather do something like this:
classNativeTestCase(unittest.TestCase):
model=Nonedeftest_single_node(self):
# this will skip running test for this parent classifself.modelisNone:
returnself.model.run()
...
deftest_network(self):
ifself.modelisNone:
returnself.model.run()
...
classTestAln(NativeTestCase):
model=ALNModel()
classTestHopf(NativeTestCase):
model=HopfModel()
deftest_specific(self):
# optional specific test for this modelreturn42
...
Yes, we still need to add tests for each (new) model manually, but all the logic is in one class, so adding a test is a matter of two lines... The same logic can be done for MultiModel.
Right now, we have a list of all models to test and have a function for each of them. This is kind of ugly.
Therefore, I think we should have some method of dynamically getting a list of all models and importing them programmatically, and subsequently, testing them one by one.
Some code that can be useful for this:
Outputs:
The text was updated successfully, but these errors were encountered: