Skip to content

Commit

Permalink
fix doctest
Browse files Browse the repository at this point in the history
We need to pass -s to pytest.
I've also passed --durations=0 to show test duration for all tests
  • Loading branch information
kwk committed Mar 22, 2024
1 parent b8c45e1 commit 24d9554
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ log_cli: true
log_cli_level: info

; Extra command line options
addopts: --showlocals --doctest-modules
addopts: --showlocals --doctest-modules --durations=0 -s

; Directories to search for tests when no files or directories are given on the
; command line
Expand Down
5 changes: 2 additions & 3 deletions snapshot_manager/snapshot_manager/copr_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@ def has_all_good_builds(
Example: Check with a not existing copr project
>>> CoprClient().has_all_good_builds(copr_ownername="non-existing-owner", copr_projectname="non-existing-project", required_packages=[], required_chroots=[])
Traceback (most recent call last):
ValueError: copr project non-existing-owner/non-existing-project does not exist
False
"""
logging.info(
f"Checking for all good builds in {copr_ownername}/{copr_projectname}..."
Expand All @@ -192,7 +191,7 @@ def has_all_good_builds(
if not self.project_exists(
copr_ownername=copr_ownername, copr_projectname=copr_projectname
):
logging.warn(
logging.warning(
f"copr project {copr_ownername}/{copr_projectname} does not exist"
)
return False
Expand Down

0 comments on commit 24d9554

Please sign in to comment.