Skip to content
Snippets Groups Projects
Commit 6c9d8bda authored by Mads M. Pedersen's avatar Mads M. Pedersen
Browse files

fix failing test related to modelpath autodetection in htcfile

parent ec3d77e8
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -254,7 +254,7 @@ class TestHtcFile(unittest.TestCase):
htcfile = HTCFile(self.testfilepath + "test.htc")
self.assertEqual(os.path.relpath(htcfile.modelpath,os.path.dirname(htcfile.filename)), "..")
htcfile = HTCFile(self.testfilepath + "sub/test.htc")
self.assertEqual(os.path.relpath(htcfile.modelpath,os.path.dirname(htcfile.filename)), "..\\..")
self.assertEqual(os.path.relpath(htcfile.modelpath,os.path.dirname(htcfile.filename)).replace("\\","/"), "../..")
self.assertRaisesRegex(ValueError, "Modelpath cannot be autodetected", HTCFile, self.testfilepath + "test2.htc")
......
......@@ -40,7 +40,7 @@ class TestLogFile(unittest.TestCase):
self.tfp = os.path.join(os.path.dirname(__file__), 'test_files/') # test file path
def test_from_htcfile(self):
htcfile = HTCFile(self.tfp + 'logfiles/model/htc/dlc14_iec61400-1ed3/dlc14_wsp10_wdir000_s0000.htc')
htcfile = HTCFile(self.tfp + 'logfiles/model/htc/dlc14_iec61400-1ed3/dlc14_wsp10_wdir000_s0000.htc',"../")
logfile = LogFile.from_htcfile(htcfile, self.tfp + 'logfiles/model/')
self.assertEqual(logfile.status, DONE)
......@@ -210,7 +210,7 @@ class TestLogFile(unittest.TestCase):
def test_reset(self):
htcfile = HTCFile(self.tfp + 'logfiles/model/htc/dlc14_iec61400-1ed3/dlc14_wsp10_wdir000_s0000.htc')
htcfile = HTCFile(self.tfp + 'logfiles/model/htc/dlc14_iec61400-1ed3/dlc14_wsp10_wdir000_s0000.htc',"../")
logfile = LogFile.from_htcfile(htcfile, self.tfp + 'logfiles/model/')
self.assertEqual(logfile.status, DONE)
logfile.reset()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment