diff --git a/tests/test_api_accounts.py b/tests/accounts/test_api_accounts.py similarity index 100% rename from tests/test_api_accounts.py rename to tests/accounts/test_api_accounts.py diff --git a/tests/test_dashboard.py b/tests/core/test_dashboard.py similarity index 95% rename from tests/test_dashboard.py rename to tests/core/test_dashboard.py index 7538a61..20192f8 100644 --- a/tests/test_dashboard.py +++ b/tests/core/test_dashboard.py @@ -7,7 +7,7 @@ of polls (the non-leader workers) would cry DOWN for a perfectly healthy notifie import importlib.util import os -REPO = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) +REPO = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) _spec = importlib.util.spec_from_file_location( "dashboard", os.path.join(REPO, "scripts", "dashboard.py")) dashboard = importlib.util.module_from_spec(_spec) diff --git a/tests/test_metrics.py b/tests/core/test_metrics.py similarity index 100% rename from tests/test_metrics.py rename to tests/core/test_metrics.py diff --git a/tests/test_singleton.py b/tests/core/test_singleton.py similarity index 100% rename from tests/test_singleton.py rename to tests/core/test_singleton.py diff --git a/tests/test_climate.py b/tests/data/test_climate.py similarity index 100% rename from tests/test_climate.py rename to tests/data/test_climate.py diff --git a/tests/test_grading.py b/tests/data/test_grading.py similarity index 100% rename from tests/test_grading.py rename to tests/data/test_grading.py diff --git a/tests/test_grid.py b/tests/data/test_grid.py similarity index 100% rename from tests/test_grid.py rename to tests/data/test_grid.py diff --git a/tests/test_places.py b/tests/data/test_places.py similarity index 100% rename from tests/test_places.py rename to tests/data/test_places.py diff --git a/tests/test_scoring.py b/tests/data/test_scoring.py similarity index 100% rename from tests/test_scoring.py rename to tests/data/test_scoring.py diff --git a/tests/test_store.py b/tests/data/test_store.py similarity index 100% rename from tests/test_store.py rename to tests/data/test_store.py diff --git a/tests/test_digest.py b/tests/notifications/test_digest.py similarity index 100% rename from tests/test_digest.py rename to tests/notifications/test_digest.py diff --git a/tests/test_discord.py b/tests/notifications/test_discord.py similarity index 100% rename from tests/test_discord.py rename to tests/notifications/test_discord.py diff --git a/tests/test_discord_dm.py b/tests/notifications/test_discord_dm.py similarity index 100% rename from tests/test_discord_dm.py rename to tests/notifications/test_discord_dm.py diff --git a/tests/test_discord_interactions.py b/tests/notifications/test_discord_interactions.py similarity index 100% rename from tests/test_discord_interactions.py rename to tests/notifications/test_discord_interactions.py diff --git a/tests/test_discord_link.py b/tests/notifications/test_discord_link.py similarity index 100% rename from tests/test_discord_link.py rename to tests/notifications/test_discord_link.py diff --git a/tests/test_notify.py b/tests/notifications/test_notify.py similarity index 100% rename from tests/test_notify.py rename to tests/notifications/test_notify.py diff --git a/tests/test_api.py b/tests/web/test_api.py similarity index 100% rename from tests/test_api.py rename to tests/web/test_api.py diff --git a/tests/test_content.py b/tests/web/test_content.py similarity index 99% rename from tests/test_content.py rename to tests/web/test_content.py index f0db506..f6b3db1 100644 --- a/tests/test_content.py +++ b/tests/web/test_content.py @@ -374,7 +374,7 @@ def test_measure_conversion_constants_match_the_frontend(): # Same drift risk as the country list: two hand-maintained copies. import os import content - units_js = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + units_js = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), os.pardir, "frontend", "units.js") with open(units_js, encoding="utf-8") as f: src = f.read() @@ -413,7 +413,7 @@ def test_f_country_list_matches_the_frontend(): # what a first-time visitor should see. import os import content - units_js = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + units_js = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))), os.pardir, "frontend", "units.js") with open(units_js, encoding="utf-8") as f: src = f.read() diff --git a/tests/test_homepage.py b/tests/web/test_homepage.py similarity index 99% rename from tests/test_homepage.py rename to tests/web/test_homepage.py index dfe19de..ec76b61 100644 --- a/tests/test_homepage.py +++ b/tests/web/test_homepage.py @@ -215,7 +215,7 @@ def test_homepage_brand_keeps_the_lockup_styling(client, no_feed): assert 'class="site-name"' in html assert "