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

Ensures consistency across codebase to ensure consistent codestyle #2951

Merged
merged 13 commits into from
Feb 10, 2025
2 changes: 1 addition & 1 deletion tardis/io/model/readers/tests/test_arepo_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from tardis.io.model.readers import arepo


@pytest.fixture()
@pytest.fixture
def arepo_snapshot_fname(tardis_regression_path):
return Path(tardis_regression_path) / "arepo_data" / "arepo_snapshot.json"

Expand Down
4 changes: 2 additions & 2 deletions tardis/plasma/tests/test_tardis_model_density_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ def tardis_model_density_config(example_model_file_dir):
)


@pytest.fixture()
@pytest.fixture
def raw_simulation_state(tardis_model_density_config, kurucz_atomic_data):
return SimulationState.from_config(
tardis_model_density_config, atom_data=kurucz_atomic_data
)


@pytest.fixture()
@pytest.fixture
def raw_plasma(
tardis_model_density_config, raw_simulation_state, kurucz_atomic_data
):
Expand Down
4 changes: 2 additions & 2 deletions tardis/transport/montecarlo/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,15 @@ def static_packet():
)


@pytest.fixture()
@pytest.fixture
def set_seed_fixture():
def set_seed(value):
np.random.seed(value)

return njit(set_seed)


@pytest.fixture()
@pytest.fixture
def random_call_fixture():
def random_call():
np.random.random()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def interaction_type_in_use(
return interaction_type


@pytest.fixture()
@pytest.fixture
def shell_id_in_use(
nb_simulation_verysimple,
interaction_type_in_use,
Expand All @@ -32,7 +32,7 @@ def shell_id_in_use(
return shell_id[mask]


@pytest.fixture()
@pytest.fixture
def r_in_use(
nb_simulation_verysimple,
interaction_type_in_use,
Expand Down Expand Up @@ -65,7 +65,7 @@ def interaction_type_to_check(
return interaction_type


@pytest.fixture()
@pytest.fixture
def shell_id_to_check(
nb_simulation_verysimple,
interaction_type_to_check,
Expand All @@ -83,7 +83,7 @@ def shell_id_to_check(
return shell_id[mask]


@pytest.fixture()
@pytest.fixture
def r_to_check(
nb_simulation_verysimple,
interaction_type_to_check,
Expand All @@ -101,7 +101,7 @@ def r_to_check(
return r[mask]


@pytest.fixture()
@pytest.fixture
def nu_packet_collection(
nb_simulation_verysimple,
):
Expand All @@ -112,7 +112,7 @@ def nu_packet_collection(
return packet_collection.output_nus


@pytest.fixture()
@pytest.fixture
def nu_to_check(
nb_simulation_verysimple,
):
Expand Down
10 changes: 5 additions & 5 deletions tardis/transport/montecarlo/tests/test_rpacket_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from tardis.transport.montecarlo.r_packet import InteractionType


@pytest.fixture()
@pytest.fixture
def interaction_type_last_interaction_class(
simulation_rpacket_tracking,
):
Expand All @@ -20,7 +20,7 @@ def interaction_type_last_interaction_class(
return interaction_type


@pytest.fixture()
@pytest.fixture
def shell_id_last_interaction_class(
simulation_rpacket_tracking,
):
Expand All @@ -39,7 +39,7 @@ def shell_id_last_interaction_class(
return last_line_interaction_shell_id


@pytest.fixture()
@pytest.fixture
def nu_from_packet_collection(
simulation_rpacket_tracking,
):
Expand Down Expand Up @@ -73,7 +73,7 @@ def last_interaction_type_rpacket_tracker(rpacket_tracker):
return interaction_type


@pytest.fixture()
@pytest.fixture
def shell_id_rpacket_tracker(
rpacket_tracker, last_interaction_type_rpacket_tracker
):
Expand All @@ -92,7 +92,7 @@ def shell_id_rpacket_tracker(
return last_line_interaction_shell_id


@pytest.fixture()
@pytest.fixture
def nu_rpacket_tracker(rpacket_tracker):
"""Output nu of rpacket from RPacketTracker class"""
no_of_packets = len(rpacket_tracker)
Expand Down
2 changes: 1 addition & 1 deletion tardis/visualization/tools/tests/test_convergence_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def convergence_plots(request):
return convergence_plots


@pytest.fixture()
@pytest.fixture
def fetch_luminosity_data(convergence_plots):
"""Prepare data for t_inner and luminosity plot."""
for item in [2] * convergence_plots.iterations:
Expand Down
Loading