Skip to content

Commit

Permalink
fix tests by changing expected Exception
Browse files Browse the repository at this point in the history
  • Loading branch information
donaldcampbelljr committed Mar 20, 2024
1 parent 089f9ee commit f300c83
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions looper/cli_pydantic.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ def run_looper(args: TopLevelParser, parser: ArgumentParser, test_args=None):
subcommand_args.ignore_flags = True

# Initialize project
if is_PEP_file_type(subcommand_args.config_file) and os.path.exists(subcommand_args.config_file):
if is_PEP_file_type(subcommand_args.config_file) and os.path.exists(
subcommand_args.config_file
):
try:
p = Project(
cfg=subcommand_args.config_file,
Expand Down Expand Up @@ -217,7 +219,6 @@ def run_looper(args: TopLevelParser, parser: ArgumentParser, test_args=None):
f"Cannot load PEP. Check file path or registry path to pep."
)


selected_compute_pkg = p.selected_compute_package or DEFAULT_COMPUTE_RESOURCES_NAME
if p.dcc is not None and not p.dcc.activate_package(selected_compute_pkg):
_LOGGER.info(
Expand Down
5 changes: 2 additions & 3 deletions tests/smoketests/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import pytest
from peppy import Project

from looper.const import FLAGS
from looper.exceptions import PipestatConfigurationException
from looper.exceptions import PipestatConfigurationException, MisconfigurationException
from tests.conftest import *
from looper.cli_pydantic import main
import pandas as pd
Expand Down Expand Up @@ -607,5 +606,5 @@ def test_inspect_config(self, prep_temp_pep, cmd):
def test_inspect_no_config_found(self, cmd):
"Checks inspect command"
x = [cmd]
with pytest.raises(ValueError):
with pytest.raises(MisconfigurationException):
results = main(test_args=x)
2 changes: 1 addition & 1 deletion tests/smoketests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def test_looper_cfg_required(self, cmd):

x = test_args_expansion("", cmd)

with pytest.raises(ValueError):
with pytest.raises(MisconfigurationException):
ff = main(test_args=x)
print(ff)

Expand Down

0 comments on commit f300c83

Please sign in to comment.