Commit Graph

20868 Commits

Author SHA1 Message Date
Victor Stinner 3844fe5ed8 Issue #25220: Move most regrtest.py code to libregrtest 2015-09-26 10:38:01 +02:00
Victor Stinner 98de5340d4 Issue #25220: Create Lib/test/libregrtest/
Start to split regrtest.py into smaller parts with the creation of
Lib/test/libregrtest/cmdline.py: code to handle the command line, especially
parsing command line arguments. This part of the code is tested by
test_regrtest.
2015-09-26 09:43:45 +02:00
Benjamin Peterson 00d4442979 merge 3.5 (#25131) 2015-09-25 22:44:55 -07:00
Benjamin Peterson 58b53953f8 make opening brace of container literals and comprehensions correspond to the line number and col offset of the AST node (closes #25131) 2015-09-25 22:44:43 -07:00
Martin Panter 0931ba2259 Issue #25211: Merge test_long from 3.5 2015-09-26 00:07:54 +00:00
Martin Panter 429f28d1ae Issue #25211: Merge test_long from 3.4 into 3.5 2015-09-26 00:07:29 +00:00
Martin Panter cbe16aefb8 Issue #25211: Eliminate lazy error message class by using subTest
Some of the calls to the Frm class were buggy anyway.
2015-09-25 23:50:47 +00:00
Victor Stinner 0cca00b67e Issue #25220: Backed out changeset eaf9a99b6bb8 2015-09-23 23:16:47 +02:00
Victor Stinner 7b92abf0e9 Issue #25220: Create Lib/test/libregrtest/
Start to split regrtest.py into smaller parts with the creation of
Lib/test/libregrtest/cmdline.py.
2015-09-23 23:04:18 +02:00
Eric V. Smith b2080f6554 f-strings: More tests for empty expressions along with missing closing braces. 2015-09-23 10:24:43 -04:00
Eric V. Smith 548c4d3178 Added more f-string test for empty expressions. 2015-09-23 08:00:01 -04:00
Eric V. Smith 1d44c41b0c Move f-string compilation of the expression earlier, before the conversion character and format_spec are checked. This allows for error messages that more closely match what a user would expect. 2015-09-23 07:49:00 -04:00
Martin Panter f9cd8ff14a Issue #25047: Merge Element Tree encoding from 3.5 2015-09-23 01:49:24 +00:00
Martin Panter 982a08f8bb Issue #25047: Merge Element Tree encoding from 3.4 into 3.5 2015-09-23 01:43:08 +00:00
Martin Panter 89f76d3f91 Issue #25047: Respect case writing XML encoding declarations
This restores the ability to write encoding names in uppercase like "UTF-8",
which worked in Python 2.
2015-09-23 01:14:35 +00:00
Berker Peksag dd7cb10b89 Issue #25137: Add a note to whatsnew/3.5.rst for nested functools.partial calls
Also, properly skip the test_nested_optimization test for partial subclasses
and add a test for the suggested usage.
2015-09-22 13:08:42 +03:00
Berker Peksag 9b93c6b5df Issue #25137: Add a note to whatsnew/3.5.rst for nested functools.partial calls
Also, properly skip the test_nested_optimization test for partial subclasses
and add a test for the suggested usage.
2015-09-22 13:08:16 +03:00
Victor Stinner f96418de05 Issue #24870: Optimize the ASCII decoder for error handlers: surrogateescape,
ignore and replace. Initial patch written by Naoki Inada.

The decoder is now up to 60 times as fast for these error handlers.

Add also unit tests for the ASCII decoder.
2015-09-21 23:06:27 +02:00
Victor Stinner 1d59fee294 Merge 3.5 (Issue #23630, fix test_asyncio) 2015-09-21 22:29:43 +02:00
Victor Stinner e355604447 Merge 3.4 (Issue #23630, fix test_asyncio) 2015-09-21 22:29:30 +02:00
Victor Stinner 582b17c2c5 Issue #23630: Fix test_asyncio on Windows
The proactor event loop requires also to mock loop._stop_serving.
2015-09-21 22:28:44 +02:00
Victor Stinner ca0d0384ad Merge 3.5 (test_asyncio) 2015-09-21 22:20:52 +02:00
Victor Stinner e63f1a65ed Merge 3.4 (test_asyncio) 2015-09-21 22:20:36 +02:00
Victor Stinner 72e1eae7bb Issue #25114: Fix test_asyncio
ssl.SSLContext() does not always disable compression. Fix unit test.
2015-09-21 22:20:19 +02:00
Victor Stinner 996572ca3f Merge 3.5 (asyncio) 2015-09-21 18:41:46 +02:00
Victor Stinner 7b58a2bb1d Merge 3.4 (asyncio) 2015-09-21 18:41:05 +02:00
Victor Stinner 5e4a7d8dc7 Issue #23630, asyncio: host parameter of loop.create_server() can now be a
sequence of strings. Patch written by Yann Sionneau.
2015-09-21 18:33:43 +02:00
Victor Stinner 385c75f8d4 Merge 3.5 (asyncio) 2015-09-21 18:08:27 +02:00
Victor Stinner d1fcca8ada Merge 3.4 (asyncio) 2015-09-21 18:08:06 +02:00
Victor Stinner f7dc7fb74d Issue #25114, asyncio: add ssl_object extra info to SSL transports
This info is required on Python 3.5 and newer to get specific information on
the SSL object, like getting the binary peer certificate (instead of getting
it as text).
2015-09-21 18:06:17 +02:00
Victor Stinner 4ddccad9ad Merge 3.5 (test_eintr, FreeBSD) 2015-09-21 14:05:18 +02:00
Victor Stinner 6dae395ed5 Issue #25122: test_eintr: the FreeBSD fix will be released in FreeBSD 10.3 2015-09-21 14:05:02 +02:00
Victor Stinner 2bf20a4e7e Merge 3.5 (test_socket, issue #25138) 2015-09-21 09:06:53 +02:00
Victor Stinner 900db26d34 Merge 3.4 (test_socket, issue #25138) 2015-09-21 09:04:17 +02:00
Victor Stinner 808d6416e3 Issue #25138: test_socket.test_idna() uses support.transient_internet() instead
of catching socket.EAI_NODATA error which doesn't exist on FreeBSD.
2015-09-21 09:04:01 +02:00
Eric V. Smith 608adf9c82 Issue 25180: Fix Tools/parser/unparse.py for f-strings. Patch by Martin Panter. 2015-09-20 15:09:15 -04:00
Eric V. Smith edef3ebafa Temporary hack for issue #25180: exclude test_fstring.py from the unparse round-tripping, while I figure out how to properly fix it. 2015-09-19 15:49:57 -04:00
Eric V. Smith 235a6f0984 Issue #24965: Implement PEP 498 "Literal String Interpolation". Documentation is still needed, I'll open an issue for that. 2015-09-19 14:51:32 -04:00
Raymond Hettinger aed8830af3 Add a fast path (no iterator creation) for a common case for repeating deques of size 1 2015-09-19 09:05:42 -07:00
Serhiy Storchaka d644d5eefa Issue #25101: Try to create a file to test write access in test_zipfile. 2015-09-19 11:00:11 +03:00
Serhiy Storchaka f2d7ea1af1 Issue #25101: Try to create a file to test write access in test_zipfile. 2015-09-19 10:59:48 +03:00
Serhiy Storchaka d86a6ef41c Issue #25101: Try to create a file to test write access in test_zipfile. 2015-09-19 10:55:20 +03:00
Victor Stinner f409c7cd1b Merge 3.5 (test_email) 2015-09-18 16:33:04 +02:00
Victor Stinner 4b363e2701 Merge 3.4 (test_email) 2015-09-18 16:32:51 +02:00
Victor Stinner 53936474aa Issue #24836: Skip FormatDateTests of test_email.test_utils on Mac OS X Snow
Leopard because this OS uses out of date (pre 2011k) timezone files.
2015-09-18 16:32:23 +02:00
Victor Stinner d8f432a98c Issue #25003: Skip test_os.URandomFDTests on Solaris 11.3 and newer
When os.urandom() is implemented with the getrandom() function, it doesn't use
a file descriptor.
2015-09-18 16:24:31 +02:00
Victor Stinner 5ebfe42cdf Oops, fix test_microsecond_rounding()
Test self.theclass, not datetime. Regression introduced by manual tests.
2015-09-18 14:52:15 +02:00
Victor Stinner 84ff4abd79 Merge 3.4 (datetime rounding) 2015-09-18 14:50:18 +02:00
Victor Stinner 511491ade0 Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methods
of datetime.datetime: microseconds are now rounded to nearest with ties going
to nearest even integer (ROUND_HALF_EVEN), instead of being rounding towards
zero (ROUND_DOWN). It's important that these methods use the same rounding
mode than datetime.timedelta to keep the property:

   (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t)

It also the rounding mode used by round(float) for example.

Add more unit tests on the rounding mode in test_datetime.
2015-09-18 14:42:05 +02:00
Victor Stinner ec26f83f2e Issue #25155: Fix _PyTime_Divide() rounding
_PyTime_Divide() rounding was wrong: copy code from Python default which has
now much better unit tests.
2015-09-18 14:21:14 +02:00