From 3d1bf184d4f20fbdbadd6274560ccd438939160e Mon Sep 17 00:00:00 2001 From: John Kurkowski Date: Wed, 13 Nov 2024 13:25:36 -0800 Subject: [PATCH] Consolidate 1-off test The "integration" test module has been shrinking over the years, and doesn't provide much distinction from the majority of the test suite. --- tests/integration_test.py | 13 ------------- tests/main_test.py | 8 ++++++++ 2 files changed, 8 insertions(+), 13 deletions(-) delete mode 100644 tests/integration_test.py diff --git a/tests/integration_test.py b/tests/integration_test.py deleted file mode 100644 index 09d47850..00000000 --- a/tests/integration_test.py +++ /dev/null @@ -1,13 +0,0 @@ -"""tldextract integration tests.""" - -import pytest - -import tldextract - - -def test_bad_kwargs_no_way_to_fetch() -> None: - """Test an impossible combination of kwargs that disable all ways to fetch data.""" - with pytest.raises(ValueError, match="disable all ways"): - tldextract.TLDExtract( - cache_dir=None, suffix_list_urls=(), fallback_to_snapshot=False - ) diff --git a/tests/main_test.py b/tests/main_test.py index a537502a..00946134 100644 --- a/tests/main_test.py +++ b/tests/main_test.py @@ -415,6 +415,14 @@ def test_ipv4_lookalike() -> None: ) +def test_bad_kwargs_no_way_to_fetch() -> None: + """Test an impossible combination of kwargs that disable all ways to fetch data.""" + with pytest.raises(ValueError, match="disable all ways"): + tldextract.TLDExtract( + cache_dir=None, suffix_list_urls=(), fallback_to_snapshot=False + ) + + def test_cache_permission( mocker: pytest_mock.MockerFixture, monkeypatch: pytest.MonkeyPatch, tmp_path: Path ) -> None: