summaryrefslogtreecommitdiffstats
path: root/tests/test_wrapper.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_wrapper.py')
-rw-r--r--tests/test_wrapper.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/test_wrapper.py b/tests/test_wrapper.py
index 89d8b2385..7845ee163 100644
--- a/tests/test_wrapper.py
+++ b/tests/test_wrapper.py
@@ -209,11 +209,12 @@ class Requirements(RepoWrapperTestCase):
209 209
210 def test_missing_file(self): 210 def test_missing_file(self):
211 """Don't crash if the file is missing (old version).""" 211 """Don't crash if the file is missing (old version)."""
212 testdir = os.path.dirname(os.path.realpath(__file__)) 212 self.assertIsNone(
213 self.assertIsNone(self.wrapper.Requirements.from_dir(testdir)) 213 self.wrapper.Requirements.from_dir(utils_for_test.THIS_DIR)
214 )
214 self.assertIsNone( 215 self.assertIsNone(
215 self.wrapper.Requirements.from_file( 216 self.wrapper.Requirements.from_file(
216 os.path.join(testdir, "xxxxxxxxxxxxxxxxxxxxxxxx") 217 utils_for_test.THIS_DIR / "xxxxxxxxxxxxxxxxxxxxxxxx"
217 ) 218 )
218 ) 219 )
219 220
@@ -225,12 +226,10 @@ class Requirements(RepoWrapperTestCase):
225 def test_valid_data(self): 226 def test_valid_data(self):
226 """Make sure we can parse the file we ship.""" 227 """Make sure we can parse the file we ship."""
227 self.assertIsNotNone(self.wrapper.Requirements.from_data(b"{}")) 228 self.assertIsNotNone(self.wrapper.Requirements.from_data(b"{}"))
228 rootdir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) 229 rootdir = utils_for_test.THIS_DIR.parent
229 self.assertIsNotNone(self.wrapper.Requirements.from_dir(rootdir)) 230 self.assertIsNotNone(self.wrapper.Requirements.from_dir(rootdir))
230 self.assertIsNotNone( 231 self.assertIsNotNone(
231 self.wrapper.Requirements.from_file( 232 self.wrapper.Requirements.from_file(rootdir / "requirements.json")
232 os.path.join(rootdir, "requirements.json")
233 )
234 ) 233 )
235 234
236 def test_format_ver(self): 235 def test_format_ver(self):