From 1a816915afc703da2a2c73bd6050833d0c7502bf Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Wed, 21 Aug 2024 18:46:05 +0530 Subject: [PATCH] Reformat using Ruff and Black --- tardis/conftest.py | 4 ++-- tardis/gui/tests/test_gui.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tardis/conftest.py b/tardis/conftest.py index cba3edfd830..8d5f6ad78b7 100644 --- a/tardis/conftest.py +++ b/tardis/conftest.py @@ -1,16 +1,15 @@ import os from pathlib import Path -import pandas as pd import pytest from astropy.version import version as astropy_version +from tardis import run_tardis from tardis.io.configuration.config_reader import Configuration from tardis.io.util import YAMLLoader, yaml_load_file from tardis.simulation import Simulation from tardis.tests.fixtures.atom_data import * from tardis.tests.fixtures.regression_data import regression_data -from tardis import run_tardis # ensuring that regression_data is not removed by ruff assert regression_data is not None @@ -165,6 +164,7 @@ def tardis_snapshot_path(request): os.path.expandvars(os.path.expanduser(tardis_snapshot_path)) ) + @pytest.fixture(scope="function") def tardis_config_verysimple(): return yaml_load_file( diff --git a/tardis/gui/tests/test_gui.py b/tardis/gui/tests/test_gui.py index 99a685bebcc..80cec6e5ee4 100644 --- a/tardis/gui/tests/test_gui.py +++ b/tardis/gui/tests/test_gui.py @@ -1,13 +1,15 @@ import os + import pytest + from tardis.io.configuration.config_reader import Configuration from tardis.simulation import Simulation -import astropy.units as u if "QT_API" in os.environ: from PyQt5 import QtWidgets - from tardis.gui.widgets import Tardis + from tardis.gui.datahandler import SimpleTableModel + from tardis.gui.widgets import Tardis @pytest.fixture(scope="module") @@ -18,9 +20,7 @@ def config(): @pytest.fixture(scope="module") -def simulation_one_loop( - atomic_data_fname, config -): +def simulation_one_loop(atomic_data_fname, config): config.atom_data = atomic_data_fname config.montecarlo.iterations = 2 config.montecarlo.no_of_packets = int(4e4)