Bug #1709599: Run test_1565150 only if the file system is NTFS.

This commit is contained in:
Martin v. Löwis 2007-08-30 18:58:29 +00:00
parent aa1e005d26
commit 39f1f45262
2 changed files with 16 additions and 4 deletions

View File

@ -226,6 +226,16 @@ class StatAttributeTests(unittest.TestCase):
# Restrict test to Win32, since there is no guarantee other
# systems support centiseconds
if sys.platform == 'win32':
def get_file_system(path):
import os
root = os.path.splitdrive(os.path.realpath("."))[0] + '\\'
import ctypes
kernel32 = ctypes.windll.kernel32
buf = ctypes.create_string_buffer("", 100)
if kernel32.GetVolumeInformationA(root, None, 0, None, None, None, buf, len(buf)):
return buf.value
if get_file_system(test_support.TESTFN) == "NTFS":
def test_1565150(self):
t1 = 1159195039.25
os.utime(self.fname, (t1, t1))

View File

@ -26,6 +26,8 @@ Core and builtins
Library
-------
- Bug #1709599: Run test_1565150 only if the file system is NTFS.
- When encountering a password-protected robots.txt file the RobotFileParser
no longer prompts interactively for a username and password (bug 813986).