summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index e83d785..8bb8ce3 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -187,8 +187,8 @@ class StatAttributeTests(unittest.TestCase):
result = os.stat(self.fname)
# Make sure direct access works
- self.assertEquals(result[stat.ST_SIZE], 3)
- self.assertEquals(result.st_size, 3)
+ self.assertEqual(result[stat.ST_SIZE], 3)
+ self.assertEqual(result.st_size, 3)
# Make sure all the attributes are there
members = dir(result)
@@ -199,8 +199,8 @@ class StatAttributeTests(unittest.TestCase):
def trunc(x): return int(x)
else:
def trunc(x): return x
- self.assertEquals(trunc(getattr(result, attr)),
- result[getattr(stat, name)])
+ self.assertEqual(trunc(getattr(result, attr)),
+ result[getattr(stat, name)])
self.assertIn(attr, members)
try:
@@ -254,13 +254,13 @@ class StatAttributeTests(unittest.TestCase):
return
# Make sure direct access works
- self.assertEquals(result.f_bfree, result[3])
+ self.assertEqual(result.f_bfree, result[3])
# Make sure all the attributes are there.
members = ('bsize', 'frsize', 'blocks', 'bfree', 'bavail', 'files',
'ffree', 'favail', 'flag', 'namemax')
for value, member in enumerate(members):
- self.assertEquals(getattr(result, 'f_' + member), result[value])
+ self.assertEqual(getattr(result, 'f_' + member), result[value])
# Make sure that assignment really fails
try:
@@ -295,7 +295,7 @@ class StatAttributeTests(unittest.TestCase):
# time stamps in stat, but not in utime.
os.utime(test_support.TESTFN, (st.st_atime, int(st.st_mtime-delta)))
st2 = os.stat(test_support.TESTFN)
- self.assertEquals(st2.st_mtime, int(st.st_mtime-delta))
+ self.assertEqual(st2.st_mtime, int(st.st_mtime-delta))
# Restrict test to Win32, since there is no guarantee other
# systems support centiseconds
@@ -312,7 +312,7 @@ class StatAttributeTests(unittest.TestCase):
def test_1565150(self):
t1 = 1159195039.25
os.utime(self.fname, (t1, t1))
- self.assertEquals(os.stat(self.fname).st_mtime, t1)
+ self.assertEqual(os.stat(self.fname).st_mtime, t1)
def test_1686475(self):
# Verify that an open file can be stat'ed
@@ -346,7 +346,7 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol):
os.environ.update(HELLO="World")
with os.popen("/bin/sh -c 'echo $HELLO'") as popen:
value = popen.read().strip()
- self.assertEquals(value, "World")
+ self.assertEqual(value, "World")
class WalkTests(unittest.TestCase):
"""Tests for os.walk()."""