Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 65da9a8

Browse files
committed
merge heads
2 parents ae18f38 + 38c707e commit 65da9a8

148 files changed

Lines changed: 184 additions & 866 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Lib/test/datetimetester.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3885,8 +3885,5 @@ class Float(float):
38853885
with self.assertRaises(TypeError):
38863886
datetime(10, 10, 10, 10, 10, 10, 10.)
38873887

3888-
def test_main():
3889-
support.run_unittest(__name__)
3890-
38913888
if __name__ == "__main__":
3892-
test_main()
3889+
unittest.main()

Lib/test/test___future__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import unittest
2-
from test import support
32
import __future__
43

54
GOOD_SERIALS = ("alpha", "beta", "candidate", "final")
@@ -58,8 +57,5 @@ def check(t, name):
5857
".compiler_flag isn't int")
5958

6059

61-
def test_main():
62-
support.run_unittest(FutureTest)
63-
6460
if __name__ == "__main__":
65-
test_main()
61+
unittest.main()

Lib/test/test__opcode.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import dis
2-
from test.support import run_unittest, import_module
2+
from test.support import import_module
33
import unittest
44

55
_opcode = import_module("_opcode")
@@ -16,8 +16,5 @@ def test_stack_effect(self):
1616
self.assertRaises(ValueError, _opcode.stack_effect, dis.opmap['BUILD_SLICE'])
1717
self.assertRaises(ValueError, _opcode.stack_effect, dis.opmap['POP_TOP'], 0)
1818

19-
def test_main():
20-
run_unittest(OpcodeTests)
21-
2219
if __name__ == "__main__":
23-
test_main()
20+
unittest.main()

Lib/test/test__osx_support.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,5 @@ def test_get_platform_osx(self):
273273
result = _osx_support.get_platform_osx(config_vars, ' ', ' ', ' ')
274274
self.assertEqual(('macosx', '10.6', 'fat'), result)
275275

276-
def test_main():
277-
if sys.platform == 'darwin':
278-
test.support.run_unittest(Test_OSXSupport)
279-
280276
if __name__ == "__main__":
281-
test_main()
277+
unittest.main()

Lib/test/test_atexit.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,5 @@ def f():
177177
self.assertEqual(atexit._ncallbacks(), n)
178178

179179

180-
def test_main():
181-
support.run_unittest(__name__)
182-
183-
184180
if __name__ == "__main__":
185-
test_main()
181+
unittest.main()

Lib/test/test_augassign.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Augmented assignment test.
22

3-
from test.support import run_unittest
43
import unittest
54

65

@@ -315,8 +314,5 @@ def __ilshift__(self, val):
315314
__ilshift__ called
316315
'''.splitlines())
317316

318-
def test_main():
319-
run_unittest(AugAssignTest)
320-
321317
if __name__ == '__main__':
322-
test_main()
318+
unittest.main()

Lib/test/test_binascii.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Test the binascii C module."""
22

3-
from test import support
43
import unittest
54
import binascii
65
import array
@@ -262,11 +261,5 @@ class MemoryviewBinASCIITest(BinASCIITest):
262261
type2test = memoryview
263262

264263

265-
def test_main():
266-
support.run_unittest(BinASCIITest,
267-
ArrayBinASCIITest,
268-
BytearrayBinASCIITest,
269-
MemoryviewBinASCIITest)
270-
271264
if __name__ == "__main__":
272-
test_main()
265+
unittest.main()

Lib/test/test_binop.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,5 @@ def test_comparison_orders(self):
369369
self.assertEqual(op_sequence(le, B, C), ['C.__ge__', 'B.__le__'])
370370
self.assertEqual(op_sequence(le, C, B), ['C.__le__', 'B.__ge__'])
371371

372-
def test_main():
373-
support.run_unittest(RatTestCase, OperationOrderTests)
374-
375372
if __name__ == "__main__":
376-
test_main()
373+
unittest.main()

Lib/test/test_call.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import unittest
2-
from test import support
32

43
# The test cases here cover several paths through the function calling
54
# code. They depend on the METH_XXX flag that is used to define a C
@@ -123,9 +122,5 @@ def test_oldargs1_2_kw(self):
123122
self.assertRaises(TypeError, [].count, x=2, y=2)
124123

125124

126-
def test_main():
127-
support.run_unittest(CFunctionCalls)
128-
129-
130125
if __name__ == "__main__":
131-
test_main()
126+
unittest.main()

Lib/test/test_cgitb.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from test.support import run_unittest
21
from test.script_helper import assert_python_failure, temp_dir
32
import unittest
43
import sys
@@ -63,8 +62,5 @@ def test_syshook_no_logdir_text_format(self):
6362
self.assertNotIn('</p>', out)
6463

6564

66-
def test_main():
67-
run_unittest(TestCgitb)
68-
6965
if __name__ == "__main__":
70-
test_main()
66+
unittest.main()

0 commit comments

Comments
 (0)