Skip to content

Commit

Permalink
Allow running testsuite on installed system
Browse files Browse the repository at this point in the history
Gbp-Pq: Name 0002-Allow-running-testsuite-on-installed-system.patch
  • Loading branch information
Roland Mas committed Sep 18, 2024
1 parent 5d7f472 commit 74f2e88
Show file tree
Hide file tree
Showing 12 changed files with 25 additions and 25 deletions.
6 changes: 3 additions & 3 deletions src/freesas/test/test_align.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
8 changes: 4 additions & 4 deletions src/freesas/test/test_autorg.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
4 changes: 2 additions & 2 deletions src/freesas/test/test_average.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions src/freesas/test/test_bift.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
2 changes: 1 addition & 1 deletion src/freesas/test/test_cormap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion src/freesas/test/test_distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions src/freesas/test/test_dnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
6 changes: 3 additions & 3 deletions src/freesas/test/test_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
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,
rg_result_to_output_line,
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
Expand Down
4 changes: 2 additions & 2 deletions src/freesas/test/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
2 changes: 1 addition & 1 deletion src/freesas/test/test_resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions src/freesas/test/test_sas_argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
2 changes: 1 addition & 1 deletion src/freesas/test/test_sasio.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down

0 comments on commit 74f2e88

Please sign in to comment.