Skip to content

Commit

Permalink
deleted unnecessary lines #68
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadja-R committed Dec 20, 2019
1 parent eccbaa0 commit b36f37a
Showing 1 changed file with 4 additions and 27 deletions.
31 changes: 4 additions & 27 deletions pyDMPC/tests/test_modeling.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ def test_states(self):
self.assertIsInstance(self.model.outputs, list)
self.assertIsInstance(self.model.state_vars, list)
self.assertIsInstance(self.model.commands, list)

#print('States Class Test successful')


class TestTimesClass (unittest.TestCase):

def test_times(self):
Expand All @@ -49,8 +47,6 @@ def test_times(self):
self.assertEqual(Init.incr[i], self.model.incr)
self.assertEqual(Init.opt_time[i], self.model.opt_time)
self.assertEqual(Init.samp_time[i], self.model.samp_time)

#print('Times Class Test successful')

class TestPathsClass (unittest.TestCase):

Expand All @@ -65,8 +61,6 @@ def test_paths(self):
self.assertEqual(Init.res_path[i] + "\\" + Init.name[i], self.model.res_path)
self.assertEqual(Init.dym_path[i], self.model.dym_path)
self.assertEqual(Init.mod_path[i], self.model.mod_path)

#print('Paths Class Test successful')

class TestModelClass (unittest.TestCase):

Expand All @@ -82,8 +76,6 @@ def test_model(self):
self.assertIsInstance(self.model.times, Modeling.Times)
self.assertIsInstance(self.model.paths, Modeling.Paths)

#print('Model Class Test successful')

class TestModifsClass (unittest.TestCase):

def test_modifs (self):
Expand All @@ -95,9 +87,6 @@ def test_modifs (self):

self.assertEqual(self.modifs.factors, Init.factors[i])

#print('Modifs Class Test successful')


class TestModelicaModClass (unittest.TestCase):

def test_Init(self):
Expand All @@ -111,8 +100,6 @@ def test_Init(self):
self.assertIsInstance(self.model.states, Modeling.States)
self.assertIsInstance(self.model.times, Modeling.Times)
self.assertIsInstance(self.model.paths, Modeling.Paths)

#print('Modelica Init Function Test successful')

def test_makeDymola(self):

Expand All @@ -125,8 +112,6 @@ def test_makeDymola(self):
self.assertEqual(self.model.lib_paths, Init.glob_lib_paths)
self.assertNotEqual(self.model.dymola, None)

#print('Modelica Make Dymola Function Test successful')

self.translate = self.model.translate()
self.simulate = self.model.simulate()
results = self.model.get_results(Init.output_names[i][0])
Expand All @@ -140,10 +125,8 @@ def test_delDymola(self):
self.model = Modeling.ModelicaMod(i)
self.delete = self.model.del_dymola()

self.assertEqual(self.model.dymola, None) #überprüfen, ob dymola auf None gesetzt wurde

#print('Modelica Delete Dymola Function Test successful')

self.assertEqual(self.model.dymola, None)

def test_translate(self):

i = Init.sys_id[-1]
Expand All @@ -153,10 +136,7 @@ def test_translate(self):
self.assertEqual(Init.res_path[i] + "\\" + Init.name[i], self.model.paths.res_path)
#for translating Model
self.assertEqual(Init.mod_path[i], self.model.paths.mod_path)

#print('Modelica Translate Function Test successful') #doesn't mean that the translation was successful



class TestSciModClass (unittest.TestCase):

def test_SciMod(self):
Expand All @@ -175,9 +155,6 @@ def test_SciMod(self):

self.assertAlmostEqual(1, self.predict[0][0], 5)

#print('SciMod Class Test successful')

#@unittest.skipUnless('Linear' in Init.model_type, "no Linear model used")
class TestLinModClass (unittest.TestCase):

def test_LinMod(self):
Expand Down

0 comments on commit b36f37a

Please sign in to comment.