Skip to content

Commit

Permalink
Remove try/except
Browse files Browse the repository at this point in the history
  • Loading branch information
twangboy committed May 15, 2024
1 parent 06bd9d1 commit 75126a7
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions tests/pytests/functional/modules/test_chocolatey.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,19 @@ def test_bootstrap(chocolatey, clean):
# if the test fails
result = chocolatey.bootstrap()
# Let's run it outside the try/except to see what the error is
try:
chocolatey_version = chocolatey.chocolatey_version(refresh=True)
except CommandExecutionError:
chocolatey_version = None
chocolatey_version = chocolatey.chocolatey_version(refresh=True)
# try:
# chocolatey_version = chocolatey.chocolatey_version(refresh=True)
# except CommandExecutionError:
# chocolatey_version = None
assert chocolatey_version is not None


def test_bootstrap_version(chocolatey, clean):
chocolatey.bootstrap(version="1.4.0")
try:
chocolatey_version = chocolatey.chocolatey_version(refresh=True)
except CommandExecutionError:
chocolatey_version = None
chocolatey_version = chocolatey.chocolatey_version(refresh=True)
# try:
# chocolatey_version = chocolatey.chocolatey_version(refresh=True)
# except CommandExecutionError:
# chocolatey_version = None
assert chocolatey_version == "1.4.0"

0 comments on commit 75126a7

Please sign in to comment.