From caec70b39bad125eee88940f3649060a36602fd5 Mon Sep 17 00:00:00 2001 From: Pim Nelissen Date: Wed, 28 Jan 2026 13:50:16 +0100 Subject: [PATCH] move test_objects.py to test_sources.py and update to reflect refactor --- tests/{test_objects.py => test_sources.py} | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) rename tests/{test_objects.py => test_sources.py} (64%) diff --git a/tests/test_objects.py b/tests/test_sources.py similarity index 64% rename from tests/test_objects.py rename to tests/test_sources.py index bde3dd3..156276a 100644 --- a/tests/test_objects.py +++ b/tests/test_sources.py @@ -1,28 +1,27 @@ import numpy as np import pytest -from pg_rad.objects import Source +from pg_rad.sources import PointSource @pytest.fixture def test_sources(): pos_a = np.random.rand(3) pos_b = np.random.rand(3) - a = Source(*tuple(pos_a), strength = None) - b = Source(*tuple(pos_b), strength = None) + a = PointSource(*tuple(pos_a), strength = None) + b = PointSource(*tuple(pos_b), strength = None) return pos_a, pos_b, a, b def test_if_distances_equal(test_sources): - """_Verify whether from object A to object B is the same as B to A._""" + """Verify whether from PointSource A to PointSource B is the same as B to A.""" _, _, a, b = test_sources assert a.distance_to(b) == b.distance_to(a) def test_distance_calculation(test_sources): - """_Verify whether distance between two static objects (e.g. sources) - is calculated correctly._""" + """Verify whether distance between two PointSources is calculated correctly.""" pos_a, pos_b, a, b = test_sources