aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2022-12-08 15:38:06 -0700
committerGitHub <noreply@github.com>2022-12-08 15:38:06 -0700
commitcda9f0236fd7800c6db5eec207668c4bfec4a45d (patch)
tree8271573ec183d16da788eaba0e83a8ec65572d76 /Lib/test
parentc85be734d1823f02a3600d7cd9195cecbf51afe8 (diff)
downloadcpython-cda9f0236fd7800c6db5eec207668c4bfec4a45d.tar.gz
cpython-cda9f0236fd7800c6db5eec207668c4bfec4a45d.zip
gh-81057: Move OS-Related Globals to _PyRuntimeState (gh-100082)
https://github.com/python/cpython/issues/81057
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_os.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 94db8bb7737..e0577916428 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -606,12 +606,13 @@ class StatAttributeTests(unittest.TestCase):
def test_stat_result_pickle(self):
result = os.stat(self.fname)
for proto in range(pickle.HIGHEST_PROTOCOL + 1):
- p = pickle.dumps(result, proto)
- self.assertIn(b'stat_result', p)
- if proto < 4:
- self.assertIn(b'cos\nstat_result\n', p)
- unpickled = pickle.loads(p)
- self.assertEqual(result, unpickled)
+ with self.subTest(f'protocol {proto}'):
+ p = pickle.dumps(result, proto)
+ self.assertIn(b'stat_result', p)
+ if proto < 4:
+ self.assertIn(b'cos\nstat_result\n', p)
+ unpickled = pickle.loads(p)
+ self.assertEqual(result, unpickled)
@unittest.skipUnless(hasattr(os, 'statvfs'), 'test needs os.statvfs()')
def test_statvfs_attributes(self):