summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-07-09 15:58:59 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-07-09 15:58:59 (GMT)
commit74e4561a3cdf9d38caca4573b68e1c72fc489629 (patch)
tree55387806a4c157646ad6a39c37b8657ae3f82edc /Lib/test
parentc739569be09d4b271ae8a5d3d566254db6298c55 (diff)
downloadcpython-74e4561a3cdf9d38caca4573b68e1c72fc489629.zip
cpython-74e4561a3cdf9d38caca4573b68e1c72fc489629.tar.gz
cpython-74e4561a3cdf9d38caca4573b68e1c72fc489629.tar.bz2
Re-flow several long lines from #1578269.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/symlink_support.py9
-rw-r--r--Lib/test/test_os.py3
-rw-r--r--Lib/test/test_platform.py4
-rw-r--r--Lib/test/test_sysconfig.py4
-rw-r--r--Lib/test/test_tarfile.py9
5 files changed, 18 insertions, 11 deletions
diff --git a/Lib/test/symlink_support.py b/Lib/test/symlink_support.py
index eab7667..59fa6e6 100644
--- a/Lib/test/symlink_support.py
+++ b/Lib/test/symlink_support.py
@@ -12,7 +12,8 @@ from ctypes import wintypes
GetCurrentProcess = ctypes.windll.kernel32.GetCurrentProcess
GetCurrentProcess.restype = wintypes.HANDLE
OpenProcessToken = ctypes.windll.advapi32.OpenProcessToken
-OpenProcessToken.argtypes = (wintypes.HANDLE, wintypes.DWORD, ctypes.POINTER(wintypes.HANDLE))
+OpenProcessToken.argtypes = (wintypes.HANDLE, wintypes.DWORD,
+ ctypes.POINTER(wintypes.HANDLE))
OpenProcessToken.restype = wintypes.BOOL
class LUID(ctypes.Structure):
@@ -91,7 +92,8 @@ class TOKEN_PRIVILEGES(ctypes.Structure):
def get_array(self):
array_type = LUID_AND_ATTRIBUTES*self.count
- privileges = ctypes.cast(self.privileges, ctypes.POINTER(array_type)).contents
+ privileges = ctypes.cast(self.privileges,
+ ctypes.POINTER(array_type)).contents
return privileges
def __iter__(self):
@@ -133,7 +135,8 @@ def get_process_token():
def get_symlink_luid():
"Get the LUID for the SeCreateSymbolicLinkPrivilege"
symlink_luid = LUID()
- res = LookupPrivilegeValue(None, "SeCreateSymbolicLinkPrivilege", symlink_luid)
+ res = LookupPrivilegeValue(None, "SeCreateSymbolicLinkPrivilege",
+ symlink_luid)
if not res > 0:
raise RuntimeError("Couldn't lookup privilege value")
return symlink_luid
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 4693164..81d05ab 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -1034,7 +1034,8 @@ class Win32KillTests(unittest.TestCase):
def skipUnlessWindows6(test):
- if hasattr(sys, 'getwindowsversion') and sys.getwindowsversion().major >= 6:
+ if (hasattr(sys, 'getwindowsversion')
+ and sys.getwindowsversion().major >= 6):
return test
return unittest.skip("Requires Windows Vista or later")(test)
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index 51f47db..ba3af1a 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -15,8 +15,8 @@ class PlatformTest(unittest.TestCase):
# On Windows, the EXE needs to know where pythonXY.dll is at so we have
# to add the directory to the path.
if sys.platform == "win32":
- os.environ["Path"] = "{};{}".format(os.path.dirname(sys.executable),
- os.environ["Path"])
+ os.environ["Path"] = "{};{}".format(
+ os.path.dirname(sys.executable), os.environ["Path"])
def get(python):
cmd = [python, '-c',
diff --git a/Lib/test/test_sysconfig.py b/Lib/test/test_sysconfig.py
index 8314e66..672f355 100644
--- a/Lib/test/test_sysconfig.py
+++ b/Lib/test/test_sysconfig.py
@@ -244,8 +244,8 @@ class TestSysConfig(unittest.TestCase):
# On Windows, the EXE needs to know where pythonXY.dll is at so we have
# to add the directory to the path.
if sys.platform == "win32":
- os.environ["Path"] = "{};{}".format(os.path.dirname(sys.executable),
- os.environ["Path"])
+ os.environ["Path"] = "{};{}".format(
+ os.path.dirname(sys.executable), os.environ["Path"])
# Issue 7880
def get(python):
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 5c064fc..bc6db27 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -291,7 +291,8 @@ class MiscReadTest(CommonReadTest):
self.assertTrue(self.tar.getmembers()[-1].name == "misc/eof",
"could not find all members")
- @unittest.skipUnless(hasattr(os, "link"), "Missing hardlink implementation")
+ @unittest.skipUnless(hasattr(os, "link"),
+ "Missing hardlink implementation")
@support.skip_unless_symlink
def test_extract_hardlink(self):
# Test hardlink extraction (e.g. bug #857297).
@@ -1423,11 +1424,13 @@ class LinkEmulationTest(ReadTest):
def test_hardlink_extraction2(self):
self._test_link_extraction("./ustar/linktest2/lnktype")
- @unittest.skipIf(hasattr(os, "symlink"), "Skip emulation if symlink exists")
+ @unittest.skipIf(hasattr(os, "symlink"),
+ "Skip emulation if symlink exists")
def test_symlink_extraction1(self):
self._test_link_extraction("ustar/symtype")
- @unittest.skipIf(hasattr(os, "symlink"), "Skip emulation if symlink exists")
+ @unittest.skipIf(hasattr(os, "symlink"),
+ "Skip emulation if symlink exists")
def test_symlink_extraction2(self):
self._test_link_extraction("./ustar/linktest2/symtype")