Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: check that subtest are also successful #11

Merged
merged 1 commit into from
Sep 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/test_copie.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ def test_valid_fixture(copie):

# run pytest with the following cmd args
result = testdir.runpytest("-v")

# fnmatch_lines does an assertion internally
test_check(result, "test_valid_fixture")

# make sure that that we get a '0' exit code for the testsuite
assert result.ret == 0


Expand All @@ -40,6 +36,7 @@ def test_copie_project(copie):

result = testdir.runpytest("-v", f"--template={copier_template}")
test_check(result, "test_copie_project")
assert result.ret == 0


def test_copie_copie_with_template_kwarg(testdir, copier_template, test_check):
Expand All @@ -66,6 +63,7 @@ def test_copie_project(copie):
# run pytest without the template cli arg
result = testdir.runpytest("-v")
test_check(result, "test_copie_project")
assert result.ret == 0


def test_copie_fixture_removes_directories(testdir, copier_template, test_check):
Expand All @@ -87,6 +85,7 @@ def test_previous_directory_is_removed(copie):
result = testdir.runpytest("-v", f"--template={copier_template}")
test_check(result, "test_create_result")
test_check(result, "test_previous_directory_is_removed")
assert result.ret == 0


def test_copie_fixture_keeps_directories(testdir, copier_template, test_check):
Expand All @@ -110,3 +109,4 @@ def test_previous_directory_is_kept(copie):
)
test_check(result, "test_create_result")
test_check(result, "test_previous_directory_is_kept")
assert result.ret == 0