class TestUM(unittest.TestCase):
def test_Dynasty_init(self):
try:
self.p = ModelInterface(r"E:\HIL\07_Tests\AT_Dynasty_models\AT745\RTM_AT_745.dml") #any dml file should do here
except Exception:
self.fail("Dynasty initialization raised ExceptionType unexpectedly!")
def test_Dynasty_check(self):
self.p.check()
At line 9 I am getting the following error:
"AttributeError: 'TestUM' object has no attribute 'p'"
I don't understand. self.p is not getting recognized in the test_Dynasty_check function.
TestUM. Either renametest_Dynasty_inittosetUp, or combine the two into a single method.