summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-08-20 16:18:19 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2008-08-20 16:18:19 (GMT)
commitca765d582810664818a0bfbd1a5a0c435ec334cc (patch)
tree4c4aac9dc2fc89939ab081ba634b73ff3536a667 /Lib/test/test_os.py
parent87c624421f5ed4dbbc1b64ac1bf595eae8c71774 (diff)
downloadcpython-ca765d582810664818a0bfbd1a5a0c435ec334cc.zip
cpython-ca765d582810664818a0bfbd1a5a0c435ec334cc.tar.gz
cpython-ca765d582810664818a0bfbd1a5a0c435ec334cc.tar.bz2
Reverted r65901 and uses GetVolumeInformationW because string in py3k is unicode.
See http://mail.python.org/pipermail/python-checkins/2008-August/073116.html
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index c566705..e9b0652 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -301,13 +301,9 @@ class StatAttributeTests(unittest.TestCase):
def get_file_system(path):
root = os.path.splitdrive(os.path.abspath(path))[0] + '\\'
import ctypes
- from ctypes.wintypes import LPCWSTR, LPWSTR, DWORD
- LPDWORD = ctypes.POINTER(DWORD)
- f = ctypes.windll.kernel32.GetVolumeInformationW
- f.argtypes = (LPCWSTR, LPWSTR, DWORD,
- LPDWORD, LPDWORD, LPDWORD, LPWSTR, DWORD)
+ kernel32 = ctypes.windll.kernel32
buf = ctypes.create_unicode_buffer("", 100)
- if f(root, None, 0, None, None, None, buf, len(buf)):
+ if kernel32.GetVolumeInformationW(root, None, 0, None, None, None, buf, len(buf)):
return buf.value
if get_file_system(support.TESTFN) == "NTFS":