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
e7ef34f2
Commit
e7ef34f2
authored
Jan 23, 2019
by
Guilhem Saurel
Committed by
Wenzel Jakob
Feb 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
compatibility with pytest 4.0, fix #1670
Cf.
https://docs.pytest.org/en/latest/deprecations.html#pytest-namespace
parent
085a2943
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
14 deletions
+12
-14
tests/conftest.py
+12
-14
No files found.
tests/conftest.py
View file @
e7ef34f2
...
@@ -185,7 +185,7 @@ def gc_collect():
...
@@ -185,7 +185,7 @@ def gc_collect():
gc
.
collect
()
gc
.
collect
()
def
pytest_
namespac
e
():
def
pytest_
configur
e
():
"""Add import suppression and test requirements to `pytest` namespace"""
"""Add import suppression and test requirements to `pytest` namespace"""
try
:
try
:
import
numpy
as
np
import
numpy
as
np
...
@@ -202,19 +202,17 @@ def pytest_namespace():
...
@@ -202,19 +202,17 @@ def pytest_namespace():
pypy
=
platform
.
python_implementation
()
==
"PyPy"
pypy
=
platform
.
python_implementation
()
==
"PyPy"
skipif
=
pytest
.
mark
.
skipif
skipif
=
pytest
.
mark
.
skipif
return
{
pytest
.
suppress
=
suppress
'suppress'
:
suppress
,
pytest
.
requires_numpy
=
skipif
(
not
np
,
reason
=
"numpy is not installed"
)
'requires_numpy'
:
skipif
(
not
np
,
reason
=
"numpy is not installed"
),
pytest
.
requires_scipy
=
skipif
(
not
np
,
reason
=
"scipy is not installed"
)
'requires_scipy'
:
skipif
(
not
np
,
reason
=
"scipy is not installed"
),
pytest
.
requires_eigen_and_numpy
=
skipif
(
not
have_eigen
or
not
np
,
'requires_eigen_and_numpy'
:
skipif
(
not
have_eigen
or
not
np
,
reason
=
"eigen and/or numpy are not installed"
)
reason
=
"eigen and/or numpy are not installed"
),
pytest
.
requires_eigen_and_scipy
=
skipif
(
'requires_eigen_and_scipy'
:
skipif
(
not
have_eigen
or
not
scipy
,
not
have_eigen
or
not
scipy
,
reason
=
"eigen and/or scipy are not installed"
)
reason
=
"eigen and/or scipy are not installed"
),
pytest
.
unsupported_on_pypy
=
skipif
(
pypy
,
reason
=
"unsupported on PyPy"
)
'unsupported_on_pypy'
:
skipif
(
pypy
,
reason
=
"unsupported on PyPy"
),
pytest
.
unsupported_on_py2
=
skipif
(
sys
.
version_info
.
major
<
3
,
'unsupported_on_py2'
:
skipif
(
sys
.
version_info
.
major
<
3
,
reason
=
"unsupported on Python 2.x"
)
reason
=
"unsupported on Python 2.x"
),
pytest
.
gc_collect
=
gc_collect
'gc_collect'
:
gc_collect
}
def
_test_import_pybind11
():
def
_test_import_pybind11
():
...
...
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