cpython: 744c96cd57da (original) (raw)

--- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -2,33 +2,33 @@

does add tests for a few functions which have been determined to be more

portable than they had been thought to be.

-import os +import asynchat +import asyncore +import codecs +import contextlib +import decimal import errno +import fractions import getpass -import unittest -import warnings -import sys -import signal -import subprocess -import time -import shutil -from test import support -import contextlib +import itertools +import locale import mmap +import os +import pickle import platform import re -import uuid -import asyncore -import asynchat +import shutil +import signal import socket -import itertools import stat -import locale -import codecs -import decimal -import fractions -import pickle +import subprocess +import sys import sysconfig +import time +import unittest +import uuid +import warnings +from test import support try: import threading except ImportError: @@ -70,16 +70,6 @@ root_in_posix = False if hasattr(os, 'geteuid'): root_in_posix = (os.geteuid() == 0) -with warnings.catch_warnings():

-st = os.stat(file) -stat_supports_subsecond = (

-

Detect whether we're on a Linux system that uses the (now outdated

and unmaintained) linuxthreads threading library. There's an issue

when combining linuxthreads with a failed execv call: see

@@ -383,179 +373,6 @@ class StatAttributeTests(unittest.TestCa unpickled = pickle.loads(p) self.assertEqual(result, unpickled)

-

-

- -

-

-

-

-

-

-

- -

-

-

-

-

-

-

-

-

-

- @unittest.skipUnless(sys.platform == "win32", "Win32 specific tests") def test_1686475(self): # Verify that an open file can be stat'ed @@ -602,6 +419,196 @@ class StatAttributeTests(unittest.TestCa result.st_file_attributes & stat.FILE_ATTRIBUTE_DIRECTORY, stat.FILE_ATTRIBUTE_DIRECTORY) + +class UtimeTests(unittest.TestCase):

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+ + from test import mapping_tests class EnvironTests(mapping_tests.BasicTestMappingProtocol):