From c3451c5604b2397a8b6748ba8b1a2715b2691c34 Mon Sep 17 00:00:00 2001 From: Grigory Smolkin Date: Mon, 29 Apr 2019 19:40:59 +0300 Subject: [PATCH] tests: module "external" fixes for Windows --- tests/external.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/external.py b/tests/external.py index b80beb80..0c05059a 100644 --- a/tests/external.py +++ b/tests/external.py @@ -1380,6 +1380,9 @@ class ExternalTest(ProbackupTest, unittest.TestCase): symlink pointing to external dir should be followed, but restored as directory """ + if os.name == 'nt': + return unittest.skip('Skipped for Windows') + fname = self.id().split('.')[3] backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup') core_dir = os.path.join(self.tmp_path, module_name, fname) @@ -1462,6 +1465,9 @@ class ExternalTest(ProbackupTest, unittest.TestCase): symlink pointing to external dir should be followed, but restored as directory """ + if os.name == 'nt': + return unittest.skip('Skipped for Windows') + fname = self.id().split('.')[3] backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup') core_dir = os.path.join(self.tmp_path, module_name, fname) @@ -1544,6 +1550,9 @@ class ExternalTest(ProbackupTest, unittest.TestCase): symlink pointing to external dir should be followed, but restored as directory """ + if os.name == 'nt': + return unittest.skip('Skipped for Windows') + fname = self.id().split('.')[3] backup_dir = os.path.join(self.tmp_path, module_name, fname, 'backup') core_dir = os.path.join(self.tmp_path, module_name, fname) @@ -1896,7 +1905,7 @@ class ExternalTest(ProbackupTest, unittest.TestCase): except ProbackupException as e: self.assertIn( 'ERROR: External directory is not found:', - external_dir, + e.message, '\n Unexpected Error Message: {0}\n CMD: {1}'.format( repr(e.message), self.cmd))