List of commits:
Subject Hash Author Date (UTC)
Add test cases for test case docstring with surrounding newlines. aa3e95ae60a1c0348f232eae9ad3edd458c95ff3 Ben Finney 2017-05-01 06:01:49
Add test cases for stripping surrounding space for shortDescription. 38e9d6d9d77a436951700754240c13f7b1a933a0 Ben Finney 2017-05-01 06:01:13
Add test cases for single-line test case docstring. 4b78af6d79c868fd9658258a122fc2ef28876c35 Ben Finney 2017-05-01 06:41:43
Comment as to why docs are built against Python 3.6 (#1550) 31b3901a078774b28a88dc410376c46e28c52c9c Brett Cannon 2017-05-11 17:45:34
bpo-30308: Code coverage for argument in random.shuffle (#1504) f111fd2e65ef7aefd4ebeadbb48e84d609bf3733 csabella 2017-05-11 15:19:35
bpo-30048: asyncio: fix Task.cancel() was ignored. (GH-1097) 991adca012f5e106c2d4040ce619c696ba6f9c46 INADA Naoki 2017-05-11 12:18:38
#30190: fix invalid escape sequence warnings (#1534) c4750959acbfc3057f12aaec832483ba30898d1c Giampaolo Rodola 2017-05-10 18:13:20
bpo-28787: Fix out of tree --with-dtrace builds (#135) f6eae5bf1c5d7b83e5d5bdbecfff928e478c1cfd stratakis 2017-05-10 15:08:15
bpo-30281: Fix the default value for stop in PySlice_Unpack() (#1480) 2ddf5a19c3a06978edff2c8ba0aaf5df3528204a Xiang Zhang 2017-05-10 10:19:41
bpo-30298: Weaken the condition of deprecation warnings for inline modifiers. (#1490) 305ccbe27ea5ba82fd2d8c32ec739f980e524330 Serhiy Storchaka 2017-05-10 03:05:20
bpo-30320: test_eintr now uses pthread_sigmask() (#1523) 211a392cc15f9a7b1b8ce65d8f6c9f8237d1b77f Victor Stinner 2017-05-10 00:37:42
PCbuild/build.bat: pass command line parameters when building PGO (#1510) 291557e2904fa149ee3d56142f41acf63c47fea3 Charles 2017-05-09 21:58:48
bpo-30285: Optimize case-insensitive matching and searching (#1482) 6d336a027913327fc042b0d758a16724fea27b9c Serhiy Storchaka 2017-05-09 20:37:14
bpo-30024: Circular imports involving absolute imports with binding (#1264) f93234bb8a87855f295d441524e519481ce6ab13 Serhiy Storchaka 2017-05-09 19:31:05
bpo-30273: update distutils.sysconfig for venv's created from Python (#1515) dbdea629e2e0e4bd8845aa55041e0a0ca4172cf3 Jeremy Kloth 2017-05-09 15:24:13
bpo-30258: regrtest: Fix run_tests_multiprocess() (#1479) 74683fc6247c522ae955a6e7308b8ff51def35d8 Victor Stinner 2017-05-09 09:34:01
bpo-29990: Fix range checking in GB18030 decoder (#1495) 9da408d15bdef624a5632182cb4edf98001fa82f Xiang Zhang 2017-05-09 03:38:32
bpo-30289: remove Misc/python-config.sh when make distclean (#1498) fa5abac1e6cd74979557d5a6f960a55f40a10b0e Xiang Zhang 2017-05-09 02:32:13
bpo-29979: Rewrite cgi.parse_multipart to make it consistent with FieldStorage (#991) cc3fa204d357be5fafc10eb8c2a80fe0bca998f1 Pierre Quentel 2017-05-08 12:08:34
Fix a trivial typo in global section (#1497) f34c6850203a2406c4950af7a9c8a134145df4ea Jim Fasarakis-Hilliard 2017-05-08 11:36:29
Commit aa3e95ae60a1c0348f232eae9ad3edd458c95ff3 - Add test cases for test case docstring with surrounding newlines.
PEP 257 specifies that tools which parse docstrings should strip
surrounding blank lines *before* determining what is the first line
<URL:https://www.python.org/dev/peps/pep-0257/#handling-docstring-indentation>.
Author: Ben Finney
Author date (UTC): 2017-05-01 06:01
Committer name: Ben Finney
Committer date (UTC): 2017-05-12 06:02
Parent(s): 38e9d6d9d77a436951700754240c13f7b1a933a0
Signing key:
Tree: 75a7d67f2e06f845f4ed6d83f279191ce7c28c2b
File Lines added Lines deleted
Lib/unittest/test/test_case.py 32 0
Lib/unittest/test/test_functiontestcase.py 30 0
File Lib/unittest/test/test_case.py changed (mode: 100644) (index 045c06464c..e01ac14208)
... ... class Test_TestCase(unittest.TestCase, TestEquality, TestHashing):
606 606 " to get the shortDescription.") " to get the shortDescription.")
607 607 self.assertEqual(self.shortDescription(), expected_description) self.assertEqual(self.shortDescription(), expected_description)
608 608
609 @unittest.skipIf(
610 sys.flags.optimize >= 2,
611 "Docstrings are omitted with -O2 and above")
612 def testShortDescriptionWithSurroundingNewlineOneLineDocstring(self):
613 """
614 Surrounding newlines should be stripped to get the shortDescription.
615 """
616 expected_description = (
617 "Surrounding newlines should be stripped"
618 " to get the shortDescription.")
619 self.assertEqual(self.shortDescription(), expected_description)
620
621 @unittest.skipIf(
622 sys.flags.optimize >= 2,
623 "Docstrings are omitted with -O2 and above")
624 def testShortDescriptionWithSurroundingNewlineMultiLineDocstring(self):
625 """
626 Surrounding newlines should be stripped to get the shortDescription.
627
628 The specification of how docstring space should be parsed is at
629 https://www.python.org/dev/peps/pep-0257/#handling-docstring-indentation
630 which requires that “Blank lines should be removed from the
631 beginning and end of the docstring.”
632
633 The PEP 257 algorithm is implemented by `pydoc.splitdoc`.
634
635 """
636 expected_description = (
637 "Surrounding newlines should be stripped"
638 " to get the shortDescription.")
639 self.assertEqual(self.shortDescription(), expected_description)
640
609 641 def testAddTypeEqualityFunc(self): def testAddTypeEqualityFunc(self):
610 642 class SadSnake(object): class SadSnake(object):
611 643 """Dummy class for test_addTypeEqualityFunc.""" """Dummy class for test_addTypeEqualityFunc."""
File Lib/unittest/test/test_functiontestcase.py changed (mode: 100644) (index 4bd591209f..d1ec44254c)
... ... class Test_FunctionTestCase(unittest.TestCase):
155 155 expected_description = "Surrounding space should be stripped." expected_description = "Surrounding space should be stripped."
156 156 self.assertEqual(test.shortDescription(), expected_description) self.assertEqual(test.shortDescription(), expected_description)
157 157
158 def test_shortDescription__singleline_docstring_newline_surrounded(self):
159 """
160 Surrounding newlines should be stripped to get the shortDescription.
161 """
162 test_function = (lambda: None)
163 test_function.__doc__ = """
164 Surrounding newlines should be stripped.
165 """
166 test = unittest.FunctionTestCase(test_function)
167 expected_description = "Surrounding newlines should be stripped."
168 self.assertEqual(test.shortDescription(), expected_description)
169
170 def test_shortDescription__multiline_docstring_newline_surrounded(self):
171 """
172 Surrounding newlines should be stripped to get the shortDescription.
173 """
174 test_function = (lambda: None)
175 test_function.__doc__ = """
176 Surrounding newlines should be stripped.
177
178 The specification of how docstring space should be parsed is at
179 https://www.python.org/dev/peps/pep-0257/#handling-docstring-indentation
180 which requires that “Blank lines should be removed from the
181 beginning and end of the docstring.”
182
183 """
184 test = unittest.FunctionTestCase(test_function)
185 expected_description = "Surrounding newlines should be stripped."
186 self.assertEqual(test.shortDescription(), expected_description)
187
158 188
159 189 if __name__ == "__main__": if __name__ == "__main__":
160 190 unittest.main() unittest.main()
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/benf_wspdigital/cpython

Clone this repository using git:
git clone git://git.rocketgit.com/user/benf_wspdigital/cpython

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main