diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-06-22 17:25:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 17:25:44 (GMT) |
commit | 8fbbdf0c3107c3052659e166f73990b466eacbb0 (patch) | |
tree | 81ce7da212017b7918b2373dc68a50cb9fda52fc /Lib/test/test_shutil.py | |
parent | 209abf746985526bce255e2fba97d3246924885d (diff) | |
download | cpython-8fbbdf0c3107c3052659e166f73990b466eacbb0.zip cpython-8fbbdf0c3107c3052659e166f73990b466eacbb0.tar.gz cpython-8fbbdf0c3107c3052659e166f73990b466eacbb0.tar.bz2 |
bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)
* Add support.MS_WINDOWS: True if Python is running on Microsoft Windows.
* Add support.MACOS: True if Python is running on Apple macOS.
* Replace support.is_android with support.ANDROID
* Replace support.is_jython with support.JYTHON
* Cleanup code to initialize unix_shell
Diffstat (limited to 'Lib/test/test_shutil.py')
-rw-r--r-- | Lib/test/test_shutil.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 7e0a329..b3b3e66 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -33,7 +33,6 @@ from test import support from test.support import TESTFN, FakePath TESTFN2 = TESTFN + "2" -MACOS = sys.platform.startswith("darwin") try: import grp import pwd @@ -1808,7 +1807,7 @@ class TestCopyFile(unittest.TestCase): self.assertRaises(OSError, shutil.copyfile, 'srcfile', 'destfile') - @unittest.skipIf(MACOS, "skipped on macOS") + @unittest.skipIf(support.MACOS, "skipped on macOS") def test_w_dest_open_fails(self): srcfile = self.Faux() @@ -1828,7 +1827,7 @@ class TestCopyFile(unittest.TestCase): self.assertEqual(srcfile._exited_with[1].args, ('Cannot open "destfile"',)) - @unittest.skipIf(MACOS, "skipped on macOS") + @unittest.skipIf(support.MACOS, "skipped on macOS") def test_w_dest_close_fails(self): srcfile = self.Faux() @@ -1851,7 +1850,7 @@ class TestCopyFile(unittest.TestCase): self.assertEqual(srcfile._exited_with[1].args, ('Cannot close',)) - @unittest.skipIf(MACOS, "skipped on macOS") + @unittest.skipIf(support.MACOS, "skipped on macOS") def test_w_source_close_fails(self): srcfile = self.Faux(True) @@ -2185,7 +2184,7 @@ class TestZeroCopySendfile(_ZeroCopyFileTest, unittest.TestCase): shutil._HAS_SENDFILE = True -@unittest.skipIf(not MACOS, 'macOS only') +@unittest.skipIf(not support.MACOS, 'macOS only') class TestZeroCopyMACOS(_ZeroCopyFileTest, unittest.TestCase): PATCHPOINT = "posix._fcopyfile" |