Skip to content

Commit

Permalink
Update tests to pytest
Browse files Browse the repository at this point in the history
Updates the relative imports in several test, to make it compatible with
the pytest library.
  • Loading branch information
hannahlanzrath committed Aug 6, 2024
1 parent efa5ff6 commit 9c569e7
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/test_cadet_reactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from CADETProcess.simulator import Cadet


from test_cadet_adapter import found_cadet
from tests.test_cadet_adapter import found_cadet


def setup_process(unit_type):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_optimization_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Structure, Float, List, SizedList, SizedNdArray, Polynomial, NdPolynomial
)
from CADETProcess.optimization import OptimizationProblem
from optimization_problem_fixtures import (
from tests.optimization_problem_fixtures import (
LinearConstraintsSooTestProblem2,
LinearEqualityConstraintsSooTestProblem
)
Expand Down Expand Up @@ -330,7 +330,7 @@ def test_transform(self):
)


from test_events import TestHandler
from tests.test_events import TestHandler
class Test_OptimizationVariableEvents(unittest.TestCase):

def __init__(self, methodName='runTest'):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_optimization_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from CADETProcess.optimization import OptimizationResults
from CADETProcess.optimization import U_NSGA3

from test_population import setup_population
from test_optimization_problem import setup_optimization_problem
from tests.test_population import setup_population
from tests.test_optimization_problem import setup_optimization_problem


def setup_optimization_results(
Expand Down
4 changes: 2 additions & 2 deletions tests/test_parallelization_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from CADETProcess.simulator import Cadet
from CADETProcess.optimization import SequentialBackend

from test_cadet_adapter import detect_cadet
from test_optimization_problem import setup_optimization_problem
from tests.test_cadet_adapter import detect_cadet
from tests.test_optimization_problem import setup_optimization_problem


parallel_backends_module = importlib.import_module(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_population.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from CADETProcess import CADETProcessError
from CADETProcess.optimization import Individual, Population, ParetoFront
from test_individual import setup_individual
from tests.test_individual import setup_individual
enable_plot = False


Expand Down
2 changes: 1 addition & 1 deletion tests/test_pymoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from CADETProcess.optimization import U_NSGA3

from test_optimization_problem import setup_optimization_problem
from tests.test_optimization_problem import setup_optimization_problem


class Test_OptimizationProblemSimple(unittest.TestCase):
Expand Down

0 comments on commit 9c569e7

Please sign in to comment.