@@ -14,7 +14,7 @@ class TestNewLibentry(unittest.TestCase):
1414 def setUpClass (cls ):
1515 """Clone git repositories, start OMC session."""
1616
17- def checkout_repo (github_repo :str , refname :str ) -> str :
17+ def checkout_repo (github_repo : str , refname : str ) -> str :
1818 """Clone and checkout a git repository from GitHub"""
1919 giturl = "https://github.com/%s.git" % github_repo
2020 repopath = os .path .join (cls .cache_dir , github_repo .split ("/" )[- 1 ])
@@ -34,7 +34,6 @@ def checkout_repo(github_repo:str, refname:str) -> str:
3434
3535 return os .path .normpath (os .path .join (gitrepo .path , os .pardir ))
3636
37-
3837 cls .cache_dir = os .path .join (os .path .dirname (os .path .abspath (__file__ )), "tmp-cache" )
3938 os .makedirs (cls .cache_dir , exist_ok = True )
4039
@@ -48,7 +47,7 @@ def checkout_repo(github_repo:str, refname:str) -> str:
4847 def tearDownClass (cls ):
4948 """Remove git repositories, stop OMC session."""
5049 cls .omc .sendExpression ("exit" )
51- # shutil.rmtree(cls.cache_dir)
50+ shutil .rmtree (cls .cache_dir )
5251
5352 def tearDown (self ):
5453 """Clear omc session"""
@@ -81,12 +80,12 @@ def test_aixlib_tag_version(self):
8180 self .omc .sendExpression ('loadFile("%s", uses=false)' % hits [0 ])
8281
8382 libentry = new_libentry (
84- libname = libname ,
85- tagName = tagName ,
86- entry = entry ,
87- hits = hits ,
88- repopath = repopath ,
89- omc = self .omc
83+ libname = libname ,
84+ tagName = tagName ,
85+ entry = entry ,
86+ hits = hits ,
87+ repopath = repopath ,
88+ omc = self .omc
9089 )
9190
9291 expected_libentry = {
@@ -98,7 +97,7 @@ def test_aixlib_tag_version(self):
9897 "SDF" : "0.4.2"
9998 },
10099 "convertFromVersion" : [
101- "2.1.0"
100+ "2.1.0"
102101 ],
103102 }
104103 self .assertDictEqual (libentry , expected_libentry )
@@ -134,36 +133,37 @@ def test_modelica_master_version(self):
134133 self .omc .sendExpression ('loadFile("%s", uses=false)' % hits [0 ])
135134
136135 libentry = new_libentry (
137- libname = libname ,
138- tagName = branch ,
139- entry = entry ,
140- hits = hits ,
141- repopath = repopath ,
142- omc = self .omc
136+ libname = libname ,
137+ tagName = branch ,
138+ entry = entry ,
139+ hits = hits ,
140+ repopath = repopath ,
141+ omc = self .omc
143142 )
144143
145144 expected_libentry = {
146145 "version" : "4.2.0-dev" ,
147146 "path" : "Modelica" ,
148147 "uses" : {
149- "Complex" : "4.2.0-dev" ,
150- "ModelicaServices" : "4.2.0-dev"
148+ "Complex" : "4.2.0-dev" ,
149+ "ModelicaServices" : "4.2.0-dev"
151150 },
152151 "provides" : [
153- "4.0.0" ,
154- "4.1.0"
152+ "4.0.0" ,
153+ "4.1.0"
155154 ],
156155 "convertFromVersion" : [
157- "3.0.0" ,
158- "3.0.1" ,
159- "3.1.0" ,
160- "3.2.0" ,
161- "3.2.1" ,
162- "3.2.2" ,
163- "3.2.3"
156+ "3.0.0" ,
157+ "3.0.1" ,
158+ "3.1.0" ,
159+ "3.2.0" ,
160+ "3.2.1" ,
161+ "3.2.2" ,
162+ "3.2.3"
164163 ]
165164 }
166165 self .assertDictEqual (libentry , expected_libentry )
167166
167+
168168if __name__ == "__main__" :
169169 unittest .main ()
0 commit comments