summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-06-04 23:22:15 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-06-04 23:22:15 (GMT)
commit034d0aa2171688c40cee1a723ddcdb85bbce31e8 (patch)
tree6523794112aefabf7d198ab5f1e915dbf9e01568 /Lib/test/test_os.py
parente860404eb78c2f6fcb05477bdb691e81009ee28d (diff)
downloadcpython-034d0aa2171688c40cee1a723ddcdb85bbce31e8.zip
cpython-034d0aa2171688c40cee1a723ddcdb85bbce31e8.tar.gz
cpython-034d0aa2171688c40cee1a723ddcdb85bbce31e8.tar.bz2
Issue #14711: os.stat_float_times() has been deprecated.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 3ee5a1e..d47c8d3 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -30,7 +30,9 @@ except ImportError:
threading = None
from test.script_helper import assert_python_ok
-os.stat_float_times(True)
+with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+ os.stat_float_times(True)
st = os.stat(__file__)
stat_supports_subsecond = (
# check if float and int timestamps are different
@@ -388,7 +390,9 @@ class StatAttributeTests(unittest.TestCase):
filename = self.fname
os.utime(filename, (0, 0))
set_time_func(filename, atime, mtime)
- os.stat_float_times(True)
+ with warnings.catch_warnings():
+ warnings.simplefilter("ignore", DeprecationWarning)
+ os.stat_float_times(True)
st = os.stat(filename)
self.assertAlmostEqual(st.st_atime, atime, places=3)
self.assertAlmostEqual(st.st_mtime, mtime, places=3)