mirror of
https://github.com/python/cpython.git
synced 2025-10-21 14:12:27 +00:00
Issue #14711: os.stat_float_times() has been deprecated.
This commit is contained in:
parent
e860404eb7
commit
034d0aa217
4 changed files with 16 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue