summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-10-24 09:02:00 (GMT)
committerGitHub <noreply@github.com>2017-10-24 09:02:00 (GMT)
commit01b5aab7bfb11ee5476ef52d24495598cbe7c99a (patch)
treed21899c9bf7a80014b9e14bd27c0cf88ed6da290 /Lib/test
parent87d332dcdbffe8ff60d99f74b1ad241c0967b055 (diff)
downloadcpython-01b5aab7bfb11ee5476ef52d24495598cbe7c99a.zip
cpython-01b5aab7bfb11ee5476ef52d24495598cbe7c99a.tar.gz
cpython-01b5aab7bfb11ee5476ef52d24495598cbe7c99a.tar.bz2
bpo-31827: Remove os.stat_float_times() (GH-4061)
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_os.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index d7d08ce..18edbcd 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -81,12 +81,6 @@ else:
HAVE_WHEEL_GROUP = sys.platform.startswith('freebsd') and os.getgid() == 0
-@contextlib.contextmanager
-def ignore_deprecation_warnings(msg_regex, quiet=False):
- with support.check_warnings((msg_regex, DeprecationWarning), quiet=quiet):
- yield
-
-
def requires_os_func(name):
return unittest.skipUnless(hasattr(os, name), 'requires os.%s' % name)
@@ -488,17 +482,6 @@ class UtimeTests(unittest.TestCase):
os.mkdir(self.dirname)
create_file(self.fname)
- def restore_float_times(state):
- with ignore_deprecation_warnings('stat_float_times'):
- os.stat_float_times(state)
-
- # ensure that st_atime and st_mtime are float
- with ignore_deprecation_warnings('stat_float_times'):
- old_float_times = os.stat_float_times(-1)
- self.addCleanup(restore_float_times, old_float_times)
-
- os.stat_float_times(True)
-
def support_subsecond(self, filename):
# Heuristic to check if the filesystem supports timestamp with
# subsecond resolution: check if float and int timestamps are different