Skip to content

Commit

Permalink
Apply @Czaki's suggestions
Browse files Browse the repository at this point in the history
Co-authored-by: Grzegorz Bokota <bokota+github@gmail.com>
  • Loading branch information
jni and Czaki authored Feb 20, 2024
1 parent 21abfb9 commit 531066c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/test_create_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,18 @@ def test_run_cookiecutter_and_plugin_tests(cookies, capsys, include_reader_plugi
assert result.project_path.joinpath("src").is_dir()
assert result.project_path.joinpath("src", "foo_bar", "__init__.py").is_file()

test_path = result.project_path.joinpath("src", "foo_bar", "_tests")
if include_reader_plugin == "y":
assert result.project_path.joinpath("src", "foo_bar", "_tests", "test_reader.py").is_file()
assert (test_path / "test_reader.py").is_file()
if include_writer_plugin == "y":
assert result.project_path.joinpath("src", "foo_bar", "_tests", "test_writer.py").is_file()
assert (test_path / "test_writer.py").is_file()
if include_sample_data_plugin == "y":
assert result.project_path.joinpath("src", "foo_bar", "_tests", "test_sample_data.py").is_file()
assert (test_path / test_sample_data.py").is_file()
if include_widget_plugin == "y":
assert result.project_path.joinpath("src", "foo_bar", "_tests", "test_widget.py").is_file()
assert (test_path / "test_widget.py").is_file()

# if all are `n` there are no modules or tests
if not (include_reader_plugin == "n" and include_writer_plugin == "n" and include_sample_data_plugin == "n" and include_widget_plugin == "n"):
if "y" in {include_reader_plugin, include_writer_plugin, include_sample_data_plugin, include_widget_plugin}:
run_tox(str(result.project_path))


Expand Down

0 comments on commit 531066c

Please sign in to comment.