From 92553358e651a721616e85fbc3bf33bdfa4718ea Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Mon, 10 Apr 2017 14:32:26 -0700 Subject: [PATCH] Windows symlink: more small fixes --- tests/test_dvc_path.py | 2 +- tests/test_repro.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_dvc_path.py b/tests/test_dvc_path.py index 760eaa0b8..ca69ebeda 100644 --- a/tests/test_dvc_path.py +++ b/tests/test_dvc_path.py @@ -25,7 +25,7 @@ class TestDvcPathTest(TestCase): self.assertEqual(path.dvc, dvc_file_name) self.assertEqual(path.filename, os.path.basename(dvc_file_name)) self.assertEqual(path.relative, relative_file_name) - self.assertEquals(path.abs[0], os.path.sep) + self.assertTrue(os.path.isabs(path.abs[0])) self.assertTrue(path.abs.endswith(dvc_file_name)) def basic_test(self): diff --git a/tests/test_repro.py b/tests/test_repro.py index 64cf3dbb5..6bd78eaf4 100644 --- a/tests/test_repro.py +++ b/tests/test_repro.py @@ -53,7 +53,8 @@ class ReproBasicEnv(RunBasicTest): self.assertEqual(cmd_res.code_dependencies, [self.file_res_code_file]) cmd_res.run() - self.assertEqual(open(self.file_name_res).read().strip(), 'Hello' + os.linesep + 'Bobby') + lines = list(filter(None, map(str.strip, open(self.file_name_res).readlines()))) + self.assertEqual(lines, ['Hello', 'Bobby']) def create_file_and_commit(self, file_name, content='Any', message='Just a commit'): self.create_file(file_name, content)