Skip to content
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ We use [pytest](https://docs.pytest.org) to run our tests and
[pytest-cov](https://pytest-cov.readthedocs.io) to compute coverage.

* While developing, periodically check that changes do not break anything. For fast checks, use
`pytest -c dev_tools/conf/pytest.ini PATH`, where `PATH` is a directory or pytest file to test.
`pytest -m "not slow" PATH`, where `PATH` is a directory or pytest file to test.

* After finishing a task, run `check/pytest` to test all of the OpenFermion code.

Expand Down
5 changes: 2 additions & 3 deletions check/pytest
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ for arg in "$@"; do
done

if [ -z "${ACTUALLY_QUIET}" ]; then
pytest -c dev_tools/conf/pytest.ini --rootdir="$rootdir" "${PYTEST_ARGS[@]}"
pytest --rootdir="$rootdir" "${PYTEST_ARGS[@]}"
else
# Filter out lines like "...F....x... [ 42%]", with coloring.
pytest -c dev_tools/conf/pytest.ini \
--rootdir="$rootdir" -q --color=yes "${PYTEST_ARGS[@]}" | \
pytest --rootdir="$rootdir" -q --color=yes "${PYTEST_ARGS[@]}" | \
grep -Ev '^(\x1B\[0m)?[\.FEsx]+(\x1B\[36m)?[[:space:]]+\[[[:space:]]*[0-9]+%\](\x1B\[0m)?$'
exit "${PIPESTATUS[0]}"
fi
20 changes: 0 additions & 20 deletions dev_tools/conf/pytest.ini

This file was deleted.

18 changes: 12 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,23 @@ skip-magic-trailing-comma = true
core = "sysmon"
disable_warnings = ["no-sysmon"]

# Omit files outside the current working directory.
# Note: this means coverage must be run from the openfermion repo root.
# Failure to do so will result in false positives.
# Omit some paths. Note: this means coverage must be run from the OpenFermion
# repo root. Failure to do so will result in false positives.
omit = [
"./profiling/performance_benchmarks.py",
"./dev_tools/*",
"./git/*",
Comment thread
mhucka marked this conversation as resolved.
Outdated
"./github/*",
]

[tool.pytest.ini_options]
markers = [
"""slow: marks tests as slow (deselect with '-m "not slow"')""",
]
filterwarnings = [
"ignore:Skipped assert_qasm_is_consistent_with_unitary because qiskit.*:UserWarning",
]

[tool.mypy]
implicit_optional = true

# TODO: this is temporary for 1.7.0 release. Remove this & fix the errors.
ignore_errors = true

Expand Down
Loading