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

Skip to content

Commit 89fad14

Browse files
committed
Merged revisions 78018,78035-78040,78042-78043,78046,78048-78052,78054,78059,78075-78080 via svnmerge from
svn+ssh://[email protected]/python/trunk ........ r78018 | georg.brandl | 2010-02-06 11:08:21 +0100 (Sa, 06 Feb 2010) | 1 line #7864: make deprecation notices a bit clearer. ........ r78035 | georg.brandl | 2010-02-06 23:44:17 +0100 (Sa, 06 Feb 2010) | 1 line Fix duplicate import. ........ r78036 | georg.brandl | 2010-02-06 23:49:47 +0100 (Sa, 06 Feb 2010) | 1 line Remove unused import. ........ r78037 | georg.brandl | 2010-02-06 23:59:15 +0100 (Sa, 06 Feb 2010) | 1 line No need to assign the results of expressions used only for side effects. ........ r78038 | georg.brandl | 2010-02-07 00:02:29 +0100 (So, 07 Feb 2010) | 1 line Add a missing import. ........ r78039 | georg.brandl | 2010-02-07 00:06:24 +0100 (So, 07 Feb 2010) | 1 line Add missing imports. ........ r78040 | georg.brandl | 2010-02-07 00:08:00 +0100 (So, 07 Feb 2010) | 1 line Fix a few UnboundLocalErrors in test_long. ........ r78042 | georg.brandl | 2010-02-07 00:12:12 +0100 (So, 07 Feb 2010) | 1 line Add missing import. ........ r78043 | georg.brandl | 2010-02-07 00:12:19 +0100 (So, 07 Feb 2010) | 1 line Remove duplicate test method. ........ r78046 | georg.brandl | 2010-02-07 00:18:00 +0100 (So, 07 Feb 2010) | 1 line Fix various missing import/unbound name errors. ........ r78048 | georg.brandl | 2010-02-07 00:23:45 +0100 (So, 07 Feb 2010) | 1 line We heard you like test failures so we put unbound locals in your test so that you can fail while you fail. ........ r78049 | georg.brandl | 2010-02-07 00:33:33 +0100 (So, 07 Feb 2010) | 1 line Fix import/access for some identifiers. _TestSharedCTypes does not seem to be executed? ........ r78050 | georg.brandl | 2010-02-07 00:34:10 +0100 (So, 07 Feb 2010) | 1 line Fix more unbound locals in code paths that do not seem to be used. ........ r78051 | georg.brandl | 2010-02-07 00:53:52 +0100 (So, 07 Feb 2010) | 1 line Add missing import when running these tests standalone. ........ r78052 | georg.brandl | 2010-02-07 00:54:04 +0100 (So, 07 Feb 2010) | 1 line Add missing import when running these tests standalone. ........ r78054 | georg.brandl | 2010-02-07 00:58:25 +0100 (So, 07 Feb 2010) | 1 line Add missing import. ........ r78059 | georg.brandl | 2010-02-07 12:34:15 +0100 (So, 07 Feb 2010) | 1 line Use "regexp" consistently. ........ r78075 | georg.brandl | 2010-02-07 13:16:12 +0100 (So, 07 Feb 2010) | 1 line Fix another duplicated test method. ........ r78076 | georg.brandl | 2010-02-07 13:19:43 +0100 (So, 07 Feb 2010) | 1 line Fix wrong usage of "except X, Y:". ........ r78077 | georg.brandl | 2010-02-07 13:25:50 +0100 (So, 07 Feb 2010) | 1 line Fix two redefined test methods. ........ r78078 | georg.brandl | 2010-02-07 13:27:06 +0100 (So, 07 Feb 2010) | 1 line Fix a redefined test method. ........ r78079 | georg.brandl | 2010-02-07 13:34:26 +0100 (So, 07 Feb 2010) | 1 line Add a minimal test for fnmatchcase(). ........ r78080 | georg.brandl | 2010-02-07 13:55:12 +0100 (So, 07 Feb 2010) | 1 line Remove duplicate test method. ........
1 parent 1a263ad commit 89fad14

33 files changed

Lines changed: 98 additions & 79 deletions

Doc/library/unittest.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ Test cases
676676
will be *msg* if given, otherwise it will be :const:`None`.
677677

678678
.. deprecated:: 3.1
679-
:meth:`failUnless`.
679+
:meth:`failUnless`; use one of the ``assert`` variants.
680680
:meth:`assert_`; use :meth:`assertTrue`.
681681

682682

@@ -704,7 +704,7 @@ Test cases
704704
function for comparing strings.
705705

706706
.. deprecated:: 3.1
707-
:meth:`failUnlessEqual`.
707+
:meth:`failUnlessEqual`; use :meth:`assertEqual`.
708708

709709

710710
.. method:: assertNotEqual(first, second, msg=None)
@@ -718,7 +718,7 @@ Test cases
718718
*first* and *second*.
719719

720720
.. deprecated:: 3.1
721-
:meth:`failIfEqual`.
721+
:meth:`failIfEqual`; use :meth:`assertNotEqual`.
722722

723723

724724
.. method:: assertAlmostEqual(first, second, *, places=7, msg=None)
@@ -737,7 +737,7 @@ Test cases
737737
Objects that compare equal are automatically almost equal.
738738

739739
.. deprecated:: 3.1
740-
:meth:`failUnlessAlmostEqual`.
740+
:meth:`failUnlessAlmostEqual`; use :meth:`assertAlmostEqual`.
741741

742742

743743
.. method:: assertNotAlmostEqual(first, second, *, places=7, msg=None)
@@ -756,7 +756,7 @@ Test cases
756756
Objects that compare equal automatically fail.
757757

758758
.. deprecated:: 3.1
759-
:meth:`failIfAlmostEqual`.
759+
:meth:`failIfAlmostEqual`; use :meth:`assertNotAlmostEqual`.
760760

761761

762762
.. method:: assertGreater(first, second, msg=None)
@@ -923,7 +923,7 @@ Test cases
923923
Added the :attr:`exception` attribute.
924924

925925
.. deprecated:: 3.1
926-
:meth:`failUnlessRaises`.
926+
:meth:`failUnlessRaises`; use :meth:`assertRaises`.
927927

928928

929929
.. method:: assertRaisesRegexp(exception, regexp[, callable, ...])
@@ -1000,7 +1000,7 @@ Test cases
10001000
for the error message.
10011001

10021002
.. deprecated:: 3.1
1003-
:meth:`failIf`.
1003+
:meth:`failIf`; use :meth:`assertFalse`.
10041004

10051005

10061006
.. method:: fail(msg=None)

Lib/distutils/tests/test_bdist.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import tempfile
66
import shutil
77

8+
from test.support import run_unittest
9+
810
from distutils.core import Distribution
911
from distutils.command.bdist import bdist
1012
from distutils.tests import support
@@ -40,4 +42,4 @@ def test_suite():
4042
return unittest.makeSuite(BuildTestCase)
4143

4244
if __name__ == '__main__':
43-
test_support.run_unittest(test_suite())
45+
run_unittest(test_suite())

Lib/distutils/tests/test_bdist_dumb.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
except ImportError:
1212
zlib = None
1313

14+
from test.support import run_unittest
15+
1416
from distutils.core import Distribution
1517
from distutils.command.bdist_dumb import bdist_dumb
1618
from distutils.tests import support
@@ -100,4 +102,4 @@ def test_suite():
100102
return unittest.makeSuite(BuildDumbTestCase)
101103

102104
if __name__ == '__main__':
103-
test_support.run_unittest(test_suite())
105+
run_unittest(test_suite())

Lib/distutils/tests/test_bdist_msi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import unittest
33
import sys
44

5+
from test.support import run_unittest
6+
57
from distutils.tests import support
68

79
@unittest.skipUnless(sys.platform=="win32", "These tests are only for win32")
@@ -20,4 +22,4 @@ def test_suite():
2022
return unittest.makeSuite(BDistMSITestCase)
2123

2224
if __name__ == '__main__':
23-
test_support.run_unittest(test_suite())
25+
run_unittest(test_suite())

Lib/distutils/tests/test_bdist_rpm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import tempfile
77
import shutil
88

9+
from test.support import run_unittest
10+
911
from distutils.core import Distribution
1012
from distutils.command.bdist_rpm import bdist_rpm
1113
from distutils.tests import support
@@ -122,4 +124,4 @@ def test_suite():
122124
return unittest.makeSuite(BuildRpmTestCase)
123125

124126
if __name__ == '__main__':
125-
test_support.run_unittest(test_suite())
127+
run_unittest(test_suite())

Lib/distutils/tests/test_bdist_wininst.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
"""Tests for distutils.command.bdist_wininst."""
22
import unittest
33

4+
from test.support import run_unittest
5+
46
from distutils.command.bdist_wininst import bdist_wininst
57
from distutils.tests import support
68

@@ -27,4 +29,4 @@ def test_suite():
2729
return unittest.makeSuite(BuildWinInstTestCase)
2830

2931
if __name__ == '__main__':
30-
test_support.run_unittest(test_suite())
32+
run_unittest(test_suite())

Lib/distutils/tests/test_cmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for distutils.cmd."""
22
import unittest
33
import os
4-
from test.support import captured_stdout
4+
from test.support import captured_stdout, run_unittest
55

66
from distutils.cmd import Command
77
from distutils.dist import Distribution
@@ -124,4 +124,4 @@ def test_suite():
124124
return unittest.makeSuite(CommandTestCase)
125125

126126
if __name__ == '__main__':
127-
test_support.run_unittest(test_suite())
127+
run_unittest(test_suite())

Lib/distutils/tests/test_cygwinccompiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import warnings
77
import sysconfig
88

9-
from test.support import check_warnings
9+
from test.support import check_warnings, run_unittest
1010
from test.support import captured_stdout
1111

1212
from distutils import cygwinccompiler
@@ -109,4 +109,4 @@ def test_suite():
109109
return unittest.makeSuite(CygwinCCompilerTestCase)
110110

111111
if __name__ == '__main__':
112-
test_support.run_unittest(test_suite())
112+
run_unittest(test_suite())

Lib/distutils/tests/test_emxccompiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import os
55
import warnings
66

7-
from test.support import check_warnings
7+
from test.support import check_warnings, run_unittest
88
from test.support import captured_stdout
99

1010
from distutils.emxccompiler import get_versions
@@ -30,4 +30,4 @@ def test_suite():
3030
return unittest.makeSuite(EmxCCompilerTestCase)
3131

3232
if __name__ == '__main__':
33-
test_support.run_unittest(test_suite())
33+
run_unittest(test_suite())

Lib/distutils/tests/test_sysconfig.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import test
44
import unittest
5+
import shutil
56

67
from distutils import sysconfig
78
from distutils.tests import support

0 commit comments

Comments
 (0)