# -*- coding: utf-8 -*- """Test of data_step_std module. :Date: 2020-01-03 .. module:: test_data_step_std :platform: *nix, Windows :synopsis: Test of data_step_std module. .. moduleauthor:: Daniel Weschke """ import unittest import os import sys sys.path.insert(0, os.path.abspath('..')) from pylib.data_step_std import CARTESIAN_POINT, VERTEX_POINT class TestDataStepStd(unittest.TestCase): def test_multi_objects(self): cp = CARTESIAN_POINT('', (0.E+000, 0.E+000, 0.E+000)) #print(cp) self.assertEqual( str(cp), "#1 = CARTESIAN_POINT('', (0.0, 0.0, 0.0))") cp2 = eval('CARTESIAN_POINT("j", (0.E+000,0.E+000,0.E+000))') #print(cp2) self.assertEqual( str(cp2), "#2 = CARTESIAN_POINT('j', (0.0, 0.0, 0.0))") vp = VERTEX_POINT('', cp) #print(vp) self.assertEqual( str(vp), "#3 = VERTEX_POINT('', #1)") if __name__ == '__main__': unittest.main(verbosity=2)