mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #23780: Improved error message in os.path.join() with single argument.
Idea by R. David Murray.
This commit is contained in:
parent
6baa0a53b0
commit
5bfc03f430
5 changed files with 12 additions and 0 deletions
|
@ -448,6 +448,10 @@ class CommonTest(GenericTest):
|
|||
self.pathmodule.join(42, 'str')
|
||||
with self.assertRaisesRegex(TypeError, errmsg % 'int'):
|
||||
self.pathmodule.join('str', 42)
|
||||
with self.assertRaisesRegex(TypeError, errmsg % 'int'):
|
||||
self.pathmodule.join(42)
|
||||
with self.assertRaisesRegex(TypeError, errmsg % 'list'):
|
||||
self.pathmodule.join([])
|
||||
with self.assertRaisesRegex(TypeError, errmsg % 'bytearray'):
|
||||
self.pathmodule.join(bytearray(b'foo'), bytearray(b'bar'))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue