MCPcopy Index your code
hub / github.com/python/cpython / test_getsize

Method test_getsize

Lib/test/test_genericpath.py:107–116  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

105 self.assertNotEqual(s1[n:n+1], s2[n:n+1])
106
107 def test_getsize(self):
108 filename = os_helper.TESTFN
109 self.addCleanup(os_helper.unlink, filename)
110
111 create_file(filename, b'Hello')
112 self.assertEqual(self.pathmodule.getsize(filename), 5)
113 os.remove(filename)
114
115 create_file(filename, b'Hello World!')
116 self.assertEqual(self.pathmodule.getsize(filename), 12)
117
118 def test_filetime(self):
119 filename = os_helper.TESTFN

Callers

nothing calls this directly

Calls 4

addCleanupMethod · 0.80
create_fileFunction · 0.70
assertEqualMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected