Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Bradley Dice <[email protected]>
  • Loading branch information
ajschmidt8 and bdice authored Sep 2, 2022
1 parent ac8288e commit d2f89bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def make_dependency_file(


def get_file_types_to_generate(generate_value):
if type(generate_value) != list:
if not isinstance(generate_value, list):
generate_value = [generate_value]

if generate_value == [str(GeneratorTypes.NONE)]:
Expand Down
10 changes: 5 additions & 5 deletions tests/test_rapids_dependency_file_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,13 @@ def test_get_file_types_to_generate():
)
assert result == [str(GeneratorTypes.REQUIREMENTS), str(GeneratorTypes.CONDA)]

with pytest.raises(Exception):
get_file_types_to_generate("asdas")
with pytest.raises(ValueError):
get_file_types_to_generate("invalid_value")

with pytest.raises(Exception):
get_file_types_to_generate(["asdas"])
with pytest.raises(ValueError):
get_file_types_to_generate(["invalid_value"])

with pytest.raises(Exception):
with pytest.raises(ValueError):
get_file_types_to_generate(
[str(GeneratorTypes.NONE), str(GeneratorTypes.CONDA)]
)

0 comments on commit d2f89bc

Please sign in to comment.