summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_genericpath.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-19 08:00:07 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-19 08:00:07 (GMT)
commit5bfc03f430ab13ed84c2c30f2c87e9800b5670a4 (patch)
tree65bd9f3891193717f61424862ad75b423281d066 /Lib/test/test_genericpath.py
parent6baa0a53b05d580d21d260c5d7d6ee2d3ff005ee (diff)
downloadcpython-5bfc03f430ab13ed84c2c30f2c87e9800b5670a4.zip
cpython-5bfc03f430ab13ed84c2c30f2c87e9800b5670a4.tar.gz
cpython-5bfc03f430ab13ed84c2c30f2c87e9800b5670a4.tar.bz2
Issue #23780: Improved error message in os.path.join() with single argument.
Idea by R. David Murray.
Diffstat (limited to 'Lib/test/test_genericpath.py')
-rw-r--r--Lib/test/test_genericpath.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_genericpath.py b/Lib/test/test_genericpath.py
index f2722bc..6ba55df 100644
--- a/Lib/test/test_genericpath.py
+++ b/Lib/test/test_genericpath.py
@@ -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'))