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

Cleanup tests #722

Merged
merged 1 commit into from
Dec 18, 2022
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,4 @@ markers = [
"reddit: tests require a connection to Reddit",
"slow: test is slow to run",
"authenticated: test requires an authenticated Reddit instance",
"testing: incomplete tests",
]
10 changes: 2 additions & 8 deletions tests/integration_tests/test_archive_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,8 @@ def test_cli_archive_soft_fail(test_args: list[str], tmp_path: Path):
@pytest.mark.parametrize(
("test_args", "response"),
(
(
["--user", "nasa", "--submitted"],
502,
),
(
["--user", "nasa", "--submitted"],
504,
),
(["--user", "nasa", "--submitted"], 502),
(["--user", "nasa", "--submitted"], 504),
),
)
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
Expand Down
10 changes: 2 additions & 8 deletions tests/integration_tests/test_clone_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,8 @@ def test_cli_scrape_soft_fail(test_args: list[str], tmp_path: Path):
@pytest.mark.parametrize(
("test_args", "response"),
(
(
["--user", "nasa", "--submitted"],
502,
),
(
["--user", "nasa", "--submitted"],
504,
),
(["--user", "nasa", "--submitted"], 502),
(["--user", "nasa", "--submitted"], 504),
),
)
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
Expand Down
16 changes: 5 additions & 11 deletions tests/integration_tests/test_download_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@


def copy_test_config(run_path: Path):
shutil.copy(Path("./tests/test_config.cfg"), Path(run_path, "./test_config.cfg"))
shutil.copy(Path("./tests/test_config.cfg"), Path(run_path, "test_config.cfg"))


def create_basic_args_for_download_runner(test_args: list[str], run_path: Path):
Expand All @@ -25,7 +25,7 @@ def create_basic_args_for_download_runner(test_args: list[str], run_path: Path):
str(run_path),
"-v",
"--config",
str(Path(run_path, "./test_config.cfg")),
str(Path(run_path, "test_config.cfg")),
"--log",
str(Path(run_path, "test_log.txt")),
] + test_args
Expand Down Expand Up @@ -279,7 +279,7 @@ def test_cli_download_hard_fail(test_args: list[str], tmp_path: Path):

def test_cli_download_use_default_config(tmp_path: Path):
runner = CliRunner()
test_args = ["download", "-vv", str(tmp_path)]
test_args = ["download", "-vv", str(tmp_path), "--log", str(Path(tmp_path, "test_log.txt"))]
result = runner.invoke(cli, test_args)
assert result.exit_code == 0

Expand Down Expand Up @@ -404,14 +404,8 @@ def test_cli_download_score_filter(test_args: list[str], was_filtered: bool, tmp
@pytest.mark.parametrize(
("test_args", "response"),
(
(
["--user", "nasa", "--submitted"],
502,
),
(
["--user", "nasa", "--submitted"],
504,
),
(["--user", "nasa", "--submitted"], 502),
(["--user", "nasa", "--submitted"], 504),
),
)
def test_user_serv_fail(test_args: list[str], response: int, tmp_path: Path):
Expand Down