Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8d01eb49
Commit
8d01eb49
authored
Feb 19, 2019
by
Serhiy Storchaka
Committed by
GitHub
Feb 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix syntax warnings in tests introduced in bpo-35942. (GH-11934)
parent
8e79e6e5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
12 deletions
+4
-12
Lib/test/test_os.py
Lib/test/test_os.py
+4
-12
No files found.
Lib/test/test_os.py
View file @
8d01eb49
...
...
@@ -3358,20 +3358,12 @@ class PathTConverterTests(unittest.TestCase):
fn
(
fd
,
*
extra_args
)
def
test_path_t_converter_and_custom_class
(
self
):
with
self
.
assertRaisesRegex
(
TypeError
,
'__fspath__
\
(
\
) to return str or bytes, not int'
):
msg
=
r'__fspath__\
(
\) to return str or bytes, not %s'
with
self
.
assertRaisesRegex
(
TypeError
,
msg
%
r'int'
):
os
.
stat
(
FakePath
(
2
))
with
self
.
assertRaisesRegex
(
TypeError
,
'__fspath__
\
(
\
) to return str or bytes, not float'
):
with
self
.
assertRaisesRegex
(
TypeError
,
msg
%
r'float'
):
os
.
stat
(
FakePath
(
2.34
))
with
self
.
assertRaisesRegex
(
TypeError
,
'__fspath__
\
(
\
) to return str or bytes, not object'
):
with
self
.
assertRaisesRegex
(
TypeError
,
msg
%
r'object'
):
os
.
stat
(
FakePath
(
object
()))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment