cpython: 4335d898be59 (original) (raw)

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

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 math 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 +71,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

@@ -223,15 +214,10 @@ class FileTests(unittest.TestCase):

Test attributes on return values from os.stat family.

class StatAttributeTests(unittest.TestCase): def setUp(self):

-

@unittest.skipUnless(hasattr(os, 'stat'), 'test needs os.stat()') def check_stat_attributes(self, fname): @@ -383,179 +369,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 @@ -596,12 +409,206 @@ class StatAttributeTests(unittest.TestCa 0) # test directory st_file_attributes (FILE_ATTRIBUTE_DIRECTORY set)

+

+ +class UtimeTests(unittest.TestCase):

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

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