| 1046 | self.assertEqual(cm.exception.filename, filename) |
| 1047 | |
| 1048 | def get_file_system(self, path): |
| 1049 | if sys.platform == 'win32': |
| 1050 | root = os.path.splitdrive(os.path.abspath(path))[0] + '\\' |
| 1051 | import ctypes |
| 1052 | kernel32 = ctypes.windll.kernel32 |
| 1053 | buf = ctypes.create_unicode_buffer("", 100) |
| 1054 | ok = kernel32.GetVolumeInformationW(root, None, 0, |
| 1055 | None, None, None, |
| 1056 | buf, len(buf)) |
| 1057 | if ok: |
| 1058 | return buf.value |
| 1059 | # return None if the filesystem is unknown |
| 1060 | |
| 1061 | def test_large_time(self): |
| 1062 | # Many filesystems are limited to the year 2038. At least, the test |