Skip to content

Commit

Permalink
Remove redundant test arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
nat-n committed Sep 22, 2023
1 parent d019262 commit 8602959
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/test_cmd_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_cmd_alias_env_var(run_poe_subproc):
assert result.stderr == ""


def test_cmd_task_with_multiple_value_arg(run_poe_subproc, is_windows):
def test_cmd_task_with_multiple_value_arg(run_poe_subproc):
result = run_poe_subproc("multiple-value-arg", "hey", "1", "2", "3", project="cmds")
assert result.capture == "Poe => poe_test_echo first: hey second: 1 2 3\n"
assert result.stdout == "first: hey second: 1 2 3\n"
Expand Down
6 changes: 3 additions & 3 deletions tests/test_envfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pathlib import Path


def test_global_envfile_and_default(run_poe_subproc, is_windows):
def test_global_envfile_and_default(run_poe_subproc):
result = run_poe_subproc("deploy-dev", project="envfile")
assert (
"Poe => poe_test_echo deploying to admin:12345@dev.example.com:8080\n"
Expand All @@ -13,7 +13,7 @@ def test_global_envfile_and_default(run_poe_subproc, is_windows):
assert result.stderr == ""


def test_task_envfile_and_default(run_poe_subproc, is_windows):
def test_task_envfile_and_default(run_poe_subproc):
result = run_poe_subproc("deploy-prod", project="envfile")
assert (
"Poe => poe_test_echo deploying to admin:12345@prod.example.com/app\n"
Expand All @@ -23,7 +23,7 @@ def test_task_envfile_and_default(run_poe_subproc, is_windows):
assert result.stderr == ""


def test_multiple_envfiles(run_poe_subproc, projects, is_windows):
def test_multiple_envfiles(run_poe_subproc, projects):
result = run_poe_subproc(
f'--root={projects["envfile/multiple_envfiles"]}', "show_me_the_vals"
)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_poe_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def test_setting_default_array_item_task_type(run_poe_subproc):
assert result.stderr == ""


def test_setting_global_env_vars(run_poe_subproc, is_windows):
def test_setting_global_env_vars(run_poe_subproc):
result = run_poe_subproc("travel", env=no_venv)
assert result.capture == f"Poe => poe_test_echo from EARTH to\nPoe => travel[1]\n"
assert result.stdout == f"from EARTH to\nMARS\n"
Expand Down Expand Up @@ -73,7 +73,7 @@ def test_partially_decrease_verbosity(run_poe_subproc, high_verbosity_project_pa
assert result.stderr == ""


def test_decrease_verbosity(run_poe_subproc, is_windows):
def test_decrease_verbosity(run_poe_subproc):
result = run_poe_subproc(
"-q",
"part1",
Expand Down
4 changes: 1 addition & 3 deletions tests/test_poetry_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ def test_task_with_cli_dependency(


@pytest.mark.slow
def test_task_with_lib_dependency(
run_poetry, projects, setup_poetry_project, is_windows
):
def test_task_with_lib_dependency(run_poetry, projects, setup_poetry_project):
result = run_poetry(["poe", "cow-cheese"], cwd=projects["poetry_plugin"])
assert result.stdout == (
"Poe => from cowpy import cow; print(list(cow.COWACTERS)[5])\ncheese\n"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_sequence_tasks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
def test_sequence_task(run_poe_subproc, esc_prefix, is_windows):
def test_sequence_task(run_poe_subproc, esc_prefix):
result = run_poe_subproc("composite_task", project="sequences")
assert (
result.capture
Expand All @@ -8,7 +8,7 @@ def test_sequence_task(run_poe_subproc, esc_prefix, is_windows):
assert result.stderr == ""


def test_another_sequence_task(run_poe_subproc, esc_prefix, is_windows):
def test_another_sequence_task(run_poe_subproc, esc_prefix):
# This should be exactly the same as calling the composite_task task directly
result = run_poe_subproc("also_composite_task", project="sequences")
assert (
Expand Down
4 changes: 2 additions & 2 deletions tests/test_shell_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ def test_interpreter_bash(run_poe_subproc):


@pytest.mark.skipif(not shutil.which("pwsh"), reason="No pwsh available")
def test_interpreter_pwsh(run_poe_subproc, is_windows):
def test_interpreter_pwsh(run_poe_subproc):
result = run_poe_subproc("echo_pwsh", project="shells")
assert result.capture == (f"Poe => poe_test_echo $ENV:test_var\n")
assert "roflcopter" in result.stdout
assert result.stderr == ""


@pytest.mark.skipif(not shutil.which("powershell"), reason="No powershell available")
def test_interpreter_pwsh(run_poe_subproc, is_windows):
def test_interpreter_pwsh(run_poe_subproc):
result = run_poe_subproc("echo_powershell", project="shells")
assert result.capture == (f"Poe => poe_test_echo $ENV:test_var\n")
assert "roflcopter" in result.stdout
Expand Down

0 comments on commit 8602959

Please sign in to comment.