Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
69b62466
Commit
69b62466
authored
Aug 25, 2016
by
Wenzel Jakob
Browse files
add reason attribute to pytest.mark.skipif
parent
9a777a26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tests/test_virtual_functions.py
tests/test_virtual_functions.py
+3
-2
No files found.
tests/test_virtual_functions.py
View file @
69b62466
...
@@ -151,14 +151,15 @@ def test_inheriting_repeat():
...
@@ -151,14 +151,15 @@ def test_inheriting_repeat():
assert
obj
.
unlucky_number
()
==
1234
assert
obj
.
unlucky_number
()
==
1234
assert
obj
.
lucky_number
()
==
-
4.25
assert
obj
.
lucky_number
()
==
-
4.25
@
pytest
.
mark
.
skipif
(
not
hasattr
(
pybind11_tests
,
'NCVirt'
))
@
pytest
.
mark
.
skipif
(
not
hasattr
(
pybind11_tests
,
'NCVirt'
),
reason
=
"NCVirt test broken on ICPC"
)
def
test_move_support
():
def
test_move_support
():
from
pybind11_tests
import
NCVirt
,
NonCopyable
,
Movable
from
pybind11_tests
import
NCVirt
,
NonCopyable
,
Movable
class
NCVirtExt
(
NCVirt
):
class
NCVirtExt
(
NCVirt
):
def
get_noncopyable
(
self
,
a
,
b
):
def
get_noncopyable
(
self
,
a
,
b
):
# Constructs and returns a new instance:
# Constructs and returns a new instance:
nc
=
NonCopyable
(
a
*
a
,
b
*
b
)
nc
=
NonCopyable
(
a
*
a
,
b
*
b
)
return
nc
return
nc
def
get_movable
(
self
,
a
,
b
):
def
get_movable
(
self
,
a
,
b
):
...
...
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