Skip to content

Commit

Permalink
add new 'warnings' opt
Browse files Browse the repository at this point in the history
Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
  • Loading branch information
giampaolo committed May 31, 2024
1 parent caa1465 commit b394ae4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ window.run_command("unit_testing", {"package": "$package_name", "coverage": Fals
| pattern | the pattern to discover tests | "test*.py" |
| deferred | whether to use deferred test runner | true |
| condition_timeout | default timeout in ms for callables invoked via `yield` | 4000 |
| warnings | the warnings level (defaults to print warnings in console) | "default" |
| failfast | stop early if a test fails | false |
| output | name of the test output instead of showing <br> in the panel | null |
| verbosity | verbosity level | 2 |
Expand Down
1 change: 1 addition & 0 deletions unittesting/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"deferred": True,
"condition_timeout": 4000,
"failfast": False,
"warnings": "default",
# output
"output": None,
"verbosity": 2,
Expand Down
2 changes: 2 additions & 0 deletions unittesting/unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def run_tests(self, stream, package, settings, cleanup_hooks=[]):
testRunner = DeferringTextTestRunner(
stream=stream,
verbosity=settings["verbosity"],
warnings=settings["warnings"],
failfast=settings["failfast"],
condition_timeout=settings["condition_timeout"],
)
Expand All @@ -231,6 +232,7 @@ def run_tests(self, stream, package, settings, cleanup_hooks=[]):
testRunner = TextTestRunner(
stream,
verbosity=settings["verbosity"],
warnings=settings["warnings"],
failfast=settings["failfast"],
)

Expand Down

0 comments on commit b394ae4

Please sign in to comment.