Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
df244884
Commit
df244884
authored
Feb 25, 2017
by
Jason Rhinelander
Committed by
Wenzel Jakob
Feb 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip .match on older pytest (pre-3.0)
Fixes test failure on Fedora 25.
parent
0861be05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
tests/test_kwargs_and_defaults.py
+4
-2
No files found.
tests/test_kwargs_and_defaults.py
View file @
df244884
...
@@ -34,8 +34,10 @@ def test_named_arguments(msg):
...
@@ -34,8 +34,10 @@ def test_named_arguments(msg):
with
pytest
.
raises
(
TypeError
)
as
excinfo
:
with
pytest
.
raises
(
TypeError
)
as
excinfo
:
# noinspection PyArgumentList
# noinspection PyArgumentList
kw_func2
(
x
=
5
,
y
=
10
,
z
=
12
)
kw_func2
(
x
=
5
,
y
=
10
,
z
=
12
)
assert
excinfo
.
match
(
if
hasattr
(
excinfo
,
"match"
):
# (pytest <3.0 doesn't have `.match()`)
r'(?s)^kw_func2\(\): incompatible.*Invoked with: kwargs: ((x=5|y=10|z=12)(, |$))'
+
'{3}$'
)
assert
excinfo
.
match
(
r'(?s)^kw_func2\(\): incompatible.*Invoked with: kwargs: ((x=5|y=10|z=12)(, |$))'
+
'{3}$'
)
assert
kw_func4
()
==
"{13 17}"
assert
kw_func4
()
==
"{13 17}"
assert
kw_func4
(
myList
=
[
1
,
2
,
3
])
==
"{1 2 3}"
assert
kw_func4
(
myList
=
[
1
,
2
,
3
])
==
"{1 2 3}"
...
...
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