mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Whitespace normalization.
This commit is contained in:
parent
0e43db5baa
commit
27f883687b
15 changed files with 26 additions and 35 deletions
|
@ -343,7 +343,7 @@ def test_main():
|
|||
RecodingTest,
|
||||
PunycodeTest,
|
||||
NameprepTest,
|
||||
CodecTest
|
||||
CodecTest
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -259,9 +259,3 @@ def test_main(verbose=None):
|
|||
|
||||
if __name__ == "__main__":
|
||||
test_main(verbose=True)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -126,4 +126,3 @@ def test_main(verbose=None):
|
|||
|
||||
if __name__ == "__main__":
|
||||
test_main(verbose=True)
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ DOCTYPE html [
|
|||
self._run_check("<e a=rgb(1,2,3)>", [
|
||||
("starttag", "e", [("a", "rgb(1,2,3)")]),
|
||||
])
|
||||
# Regression test for SF bug #921657.
|
||||
# Regression test for SF bug #921657.
|
||||
self._run_check("<a href=mailto:xyz@example.com>", [
|
||||
("starttag", "a", [("href", "mailto:xyz@example.com")]),
|
||||
])
|
||||
|
|
|
@ -52,13 +52,13 @@ n = 10
|
|||
class TestInvariantWithoutMutations(unittest.TestCase):
|
||||
|
||||
def test_invariant(self):
|
||||
it = self.it
|
||||
for i in reversed(xrange(1, n+1)):
|
||||
self.assertEqual(len(it), i)
|
||||
it.next()
|
||||
self.assertEqual(len(it), 0)
|
||||
self.assertRaises(StopIteration, it.next)
|
||||
self.assertEqual(len(it), 0)
|
||||
it = self.it
|
||||
for i in reversed(xrange(1, n+1)):
|
||||
self.assertEqual(len(it), i)
|
||||
it.next()
|
||||
self.assertEqual(len(it), 0)
|
||||
self.assertRaises(StopIteration, it.next)
|
||||
self.assertEqual(len(it), 0)
|
||||
|
||||
class TestTemporarilyImmutable(TestInvariantWithoutMutations):
|
||||
|
||||
|
|
|
@ -86,14 +86,14 @@ class C:
|
|||
|
||||
|
||||
def test_2():
|
||||
d = globals().copy()
|
||||
def testfunc():
|
||||
global x
|
||||
x = 1
|
||||
d['testfunc'] = testfunc
|
||||
profile.runctx("testfunc()", d, d, TESTFN)
|
||||
vereq (x, 1)
|
||||
os.unlink (TESTFN)
|
||||
d = globals().copy()
|
||||
def testfunc():
|
||||
global x
|
||||
x = 1
|
||||
d['testfunc'] = testfunc
|
||||
profile.runctx("testfunc()", d, d, TESTFN)
|
||||
vereq (x, 1)
|
||||
os.unlink (TESTFN)
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_main()
|
||||
|
|
|
@ -38,4 +38,3 @@ else:
|
|||
diff = difflib.context_diff(fromlines, tolines, fromfile, tofile, fromdate, todate, n=n)
|
||||
|
||||
sys.stdout.writelines(diff)
|
||||
|
||||
|
|
|
@ -230,4 +230,3 @@ def main(args=None):
|
|||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue