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
635e3fc9
Unverified
Commit
635e3fc9
authored
Dec 23, 2020
by
Eric Cousineau
Committed by
GitHub
Dec 23, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CONTRIBUTING: Add suggestion about passing pytest flags (#2738)
parent
79b0e2c0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
+13
-1
.github/CONTRIBUTING.md
+13
-1
No files found.
.github/CONTRIBUTING.md
View file @
635e3fc9
...
@@ -126,7 +126,8 @@ cmake --build build --target check
...
@@ -126,7 +126,8 @@ cmake --build build --target check
`--target`
can be spelled
`-t`
in CMake 3.15+. You can also run individual
`--target`
can be spelled
`-t`
in CMake 3.15+. You can also run individual
tests with these targets:
tests with these targets:
*
`pytest`
: Python tests only
*
`pytest`
: Python tests only, using the
[
pytest
](
https://docs.pytest.org/en/stable/
)
framework
*
`cpptest`
: C++ tests only
*
`cpptest`
: C++ tests only
*
`test_cmake_build`
: Install / subdirectory tests
*
`test_cmake_build`
: Install / subdirectory tests
...
@@ -134,6 +135,17 @@ If you want to build just a subset of tests, use
...
@@ -134,6 +135,17 @@ If you want to build just a subset of tests, use
`-DPYBIND11_TEST_OVERRIDE="test_callbacks.cpp;test_pickling.cpp"`
. If this is
`-DPYBIND11_TEST_OVERRIDE="test_callbacks.cpp;test_pickling.cpp"`
. If this is
empty, all tests will be built.
empty, all tests will be built.
You may also pass flags to the
`pytest`
target by editing
`tests/pytest.ini`
or
by using the
`PYTEST_ADDOPTS`
environment variable
(see
[
`pytest` docs
](
https://docs.pytest.org/en/2.7.3/customize.html#adding-default-options
)
). As an example:
```
bash
env
PYTEST_ADDOPTS
=
"--capture=no --exitfirst"
\
cmake
--build
build
--target
pytest
# Or using abbreviated flags
env
PYTEST_ADDOPTS
=
"-s -x"
cmake
--build
build
--target
pytest
```
### Formatting
### Formatting
All formatting is handled by pre-commit.
All formatting is handled by pre-commit.
...
...
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