From 74f2e8810ca64b1f65a890283a79aca99b0c9522 Mon Sep 17 00:00:00 2001 From: Roland Mas Date: Wed, 18 Sep 2024 19:21:23 +0200 Subject: [PATCH] Allow running testsuite on installed system Gbp-Pq: Name 0002-Allow-running-testsuite-on-installed-system.patch --- src/freesas/test/test_align.py | 6 +++--- src/freesas/test/test_autorg.py | 8 ++++---- src/freesas/test/test_average.py | 4 ++-- src/freesas/test/test_bift.py | 4 ++-- src/freesas/test/test_cormap.py | 2 +- src/freesas/test/test_distance.py | 2 +- src/freesas/test/test_dnn.py | 6 +++--- src/freesas/test/test_fitting.py | 6 +++--- src/freesas/test/test_model.py | 4 ++-- src/freesas/test/test_resources.py | 2 +- src/freesas/test/test_sas_argparser.py | 4 ++-- src/freesas/test/test_sasio.py | 2 +- 12 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/freesas/test/test_align.py b/src/freesas/test/test_align.py index 93bea7a..c3535d2 100644 --- a/src/freesas/test/test_align.py +++ b/src/freesas/test/test_align.py @@ -8,9 +8,9 @@ import numpy import unittest from .utilstest import get_datafile -from ..model import SASModel -from ..align import AlignModels -from ..transformations import translation_matrix, euler_matrix +from freesas.model import SASModel +from freesas.align import AlignModels +from freesas.transformations import translation_matrix, euler_matrix import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger("AlignModels_test") diff --git a/src/freesas/test/test_autorg.py b/src/freesas/test/test_autorg.py index 0de7f4c..4945094 100644 --- a/src/freesas/test/test_autorg.py +++ b/src/freesas/test/test_autorg.py @@ -35,16 +35,16 @@ from scipy.stats import linregress from .utilstest import get_datafile -from ..autorg import ( +from freesas.autorg import ( autoRg, RG_RESULT, linear_fit, auto_gpa, auto_guinier, ) -from .._autorg import curate_data # pylint: disable=E0401 -from ..invariants import calc_Rambo_Tainer -from .._bift import distribution_sphere # pylint: disable=E0401 +from freesas._autorg import curate_data # pylint: disable=E0401 +from freesas.invariants import calc_Rambo_Tainer +from freesas._bift import distribution_sphere # pylint: disable=E0401 logger = logging.getLogger(__name__) diff --git a/src/freesas/test/test_average.py b/src/freesas/test/test_average.py index ddd6b80..cfd4ca4 100644 --- a/src/freesas/test/test_average.py +++ b/src/freesas/test/test_average.py @@ -9,8 +9,8 @@ import numpy import unittest from .utilstest import get_datafile -from ..model import SASModel -from ..average import Grid, AverModels +from freesas.model import SASModel +from freesas.average import Grid, AverModels import logging logging.basicConfig(level=logging.INFO) diff --git a/src/freesas/test/test_bift.py b/src/freesas/test/test_bift.py index 36c3043..16e8a61 100644 --- a/src/freesas/test/test_bift.py +++ b/src/freesas/test/test_bift.py @@ -30,8 +30,8 @@ import numpy import unittest from .utilstest import get_datafile -from ..bift import auto_bift -from .._bift import BIFT, distribution_parabola, distribution_sphere, \ +from freesas.bift import auto_bift +from freesas._bift import BIFT, distribution_parabola, distribution_sphere, \ ensure_edges_zero, smooth_density import logging logger = logging.getLogger(__name__) diff --git a/src/freesas/test/test_cormap.py b/src/freesas/test/test_cormap.py index 7f8233f..d5d7892 100644 --- a/src/freesas/test/test_cormap.py +++ b/src/freesas/test/test_cormap.py @@ -12,7 +12,7 @@ import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger("test_cormap") -from .. import cormap +from freesas import cormap class TestCormap(unittest.TestCase): diff --git a/src/freesas/test/test_distance.py b/src/freesas/test/test_distance.py index d02a30a..6c8585e 100644 --- a/src/freesas/test/test_distance.py +++ b/src/freesas/test/test_distance.py @@ -10,7 +10,7 @@ import numpy import unittest from .utilstest import get_datafile -from ..model import SASModel +from freesas.model import SASModel import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger("cdistance_test") diff --git a/src/freesas/test/test_dnn.py b/src/freesas/test/test_dnn.py index 046c936..5e34f14 100644 --- a/src/freesas/test/test_dnn.py +++ b/src/freesas/test/test_dnn.py @@ -33,9 +33,9 @@ import io import numpy as np from .utilstest import get_datafile -from ..resources import resource_filename -from ..sasio import load_scattering_data -from ..dnn import * +from freesas.resources import resource_filename +from freesas.sasio import load_scattering_data +from freesas.dnn import * logger = logging.getLogger(__name__) diff --git a/src/freesas/test/test_fitting.py b/src/freesas/test/test_fitting.py index cb9d651..a2797aa 100644 --- a/src/freesas/test/test_fitting.py +++ b/src/freesas/test/test_fitting.py @@ -21,7 +21,7 @@ from typing import Callable from errno import ENOENT import numpy -from ..fitting import ( +from freesas.fitting import ( set_logging_level, get_output_destination, get_guinier_header, @@ -29,8 +29,8 @@ get_linesep, run_guinier_fit, ) -from ..autorg import RG_RESULT, InsufficientDataError, NoGuinierRegionError -from ..sas_argparser import GuinierParser +from freesas.autorg import RG_RESULT, InsufficientDataError, NoGuinierRegionError +from freesas.sas_argparser import GuinierParser if sys.version_info.minor > 6: from unittest.mock import mock_open diff --git a/src/freesas/test/test_model.py b/src/freesas/test/test_model.py index b8e1e19..cd6e671 100644 --- a/src/freesas/test/test_model.py +++ b/src/freesas/test/test_model.py @@ -11,8 +11,8 @@ import os import tempfile from .utilstest import get_datafile -from ..model import SASModel -from ..transformations import translation_from_matrix, euler_from_matrix +from freesas.model import SASModel +from freesas.transformations import translation_from_matrix, euler_from_matrix import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger("SASModel_test") diff --git a/src/freesas/test/test_resources.py b/src/freesas/test/test_resources.py index c660a8f..d9376c5 100644 --- a/src/freesas/test/test_resources.py +++ b/src/freesas/test/test_resources.py @@ -30,7 +30,7 @@ import unittest import logging import os -from ..resources import resource_filename +from freesas.resources import resource_filename logger = logging.getLogger(__name__) class TestResources(unittest.TestCase): diff --git a/src/freesas/test/test_sas_argparser.py b/src/freesas/test/test_sas_argparser.py index c9a9b4d..2a7a55f 100644 --- a/src/freesas/test/test_sas_argparser.py +++ b/src/freesas/test/test_sas_argparser.py @@ -13,8 +13,8 @@ import io import contextlib from pathlib import Path -from .. import dated_version as freesas_version -from ..sas_argparser import SASParser, GuinierParser +from freesas import dated_version as freesas_version +from freesas.sas_argparser import SASParser, GuinierParser logger = logging.getLogger(__name__) diff --git a/src/freesas/test/test_sasio.py b/src/freesas/test/test_sasio.py index c897b21..9a956b4 100644 --- a/src/freesas/test/test_sasio.py +++ b/src/freesas/test/test_sasio.py @@ -31,7 +31,7 @@ import logging import io from numpy import array, allclose -from ..sasio import parse_ascii_data, load_scattering_data, \ +from freesas.sasio import parse_ascii_data, load_scattering_data, \ convert_inverse_angstrom_to_nanometer logger = logging.getLogger(__name__)