File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,23 @@ between versions.
5757 request if additional work needs to be done to make the code compatible with
5858 all the supported Python releases.
5959
60+ Test specific concerns
61+ ''''''''''''''''''''''
62+
63+ The :mod: `unittest ` module received a massive upgrade in Python 2.7, including
64+ some very useful new functionality. However, retaining compatibility with older
65+ Python versions is very important, so this new functionality can't be used.
66+ Some specific issues to bear in mind are listed below.
67+
68+ Many assertions, such as :meth: `~unittest.TestCase.assertIn ` and
69+ :meth: `~unittest.TestCase.assertGreater `, only exist from 2.7, and can't be used.
70+ The simple workaround is to evaluate an expression to test with
71+ :meth: `~unittest.TestCase.assertTrue `
72+
73+ The incredibly functions for skipping tests(:func: `~unittest.skip `) and marking
74+ expected failures(:func: `~unittest.expectedFailure `) were only added in 2.7, and
75+ unfortunately can't be used.
76+
6077.. todo ::
6178 Add topic branches and pull request usage examples, but most git users are
6279 likely to be comfortable with these already
You can’t perform that action at this time.
0 commit comments