|
|
@@ -710,6 +710,7 @@ class FileObject(MDBase): |
|
|
|
mode = mode & ~nbit |
|
|
|
|
|
|
|
return '|'.join(r) |
|
|
|
|
|
|
|
@classmethod |
|
|
|
def _real_stat_repr(cls, st): # pragma: no cover |
|
|
|
return 'os.stat_result' \ |
|
|
@@ -1779,6 +1780,7 @@ class _TestCases(unittest.TestCase): |
|
|
|
# repr on os.stat_result doesn't work |
|
|
|
# (mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime) |
|
|
|
|
|
|
|
'f': os.stat_result((stat.S_IROTH|stat.S_IXOTH|stat.S_IRGRP|stat.S_IXGRP|stat.S_IXUSR|stat.S_IRUSR|stat.S_IFDIR, 10, 100, 2, 100, 100, 1024, 1654166365, 1558388856.000000, 1663133775)), |
|
|
|
'test.txt': os.stat_result((stat.S_IROTH|stat.S_IRGRP|stat.S_IWUSR|stat.S_IRUSR|stat.S_IFREG, 10, 100, 1, 100, 100, 15, 1654166365, 1558388856.000000, 1663133775)), |
|
|
|
'newfile.txt': os.stat_result((stat.S_IROTH|stat.S_IRGRP|stat.S_IWUSR|stat.S_IRUSR|stat.S_IFREG, 10, 100, 1, 100, 100, 19, 1659652579, 1658982768.041291, 1663133775)), |
|
|
|
'sample.data.sqlite3': os.stat_result((stat.S_IROTH|stat.S_IRGRP|stat.S_IWUSR|stat.S_IRUSR|stat.S_IFREG, 10, 100, 1, 100, 100, 57344, 1663133777, 1663133777.529757, 1663133777)), |
|
|
@@ -2386,7 +2388,8 @@ class _TestCases(unittest.TestCase): |
|
|
|
return orig_open(fname, mode) |
|
|
|
|
|
|
|
#print('foo:', repr(fname), repr(mode), file=sys.stderr) |
|
|
|
raise FileNotFoundError |
|
|
|
if True: #pragma: no cover |
|
|
|
raise FileNotFoundError |
|
|
|
|
|
|
|
op.side_effect = open_repl |
|
|
|
|
|
|
|