File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ import matplotlib
2+
3+ matplotlib .use ("Agg" )
Original file line number Diff line number Diff line change 1+ import unittest
2+ import pytest
3+ import sys
4+ from unittest import mock
5+
6+ # 1. Shield the imports
7+ try :
8+ from ezyrb .parallel import ReducedOrderModel as ParallelROM
9+ import tests .test_ae as original_module
10+ HAS_PARALLEL = True
11+ except ImportError :
12+ HAS_PARALLEL = False
13+
14+ if not HAS_PARALLEL :
15+ raise unittest .SkipTest ("Parallel dependencies missing" )
16+
17+ # 2. The "Lazy" Swap (Monkeypatching)
18+ # We replace the ROM in the original module's namespace
19+ # so that decorators like @pytest.mark.parametrize use the Parallel version.
20+ original_module .ROM = ParallelROM
21+ if hasattr (original_module , 'ReducedOrderModel' ):
22+ original_module .ReducedOrderModel = ParallelROM
23+
24+ # 3. Re-export the tests so pytest finds them here
25+ from tests .test_ae import *
Original file line number Diff line number Diff line change 1+ import unittest
2+ import pytest
3+ import sys
4+ from unittest import mock
5+
6+ # 1. Shield the imports
7+ try :
8+ from ezyrb .parallel import ReducedOrderModel as ParallelROM
9+ import tests .test_ann as original_module
10+ HAS_PARALLEL = True
11+ except ImportError :
12+ HAS_PARALLEL = False
13+
14+ if not HAS_PARALLEL :
15+ raise unittest .SkipTest ("Parallel dependencies missing" )
16+
17+ # 2. The "Lazy" Swap (Monkeypatching)
18+ # We replace the ROM in the original module's namespace
19+ # so that decorators like @pytest.mark.parametrize use the Parallel version.
20+ original_module .ROM = ParallelROM
21+ if hasattr (original_module , 'ReducedOrderModel' ):
22+ original_module .ReducedOrderModel = ParallelROM
23+
24+ # 3. Re-export the tests so pytest finds them here
25+ from tests .test_ann import *
Original file line number Diff line number Diff line change 1+ import unittest
2+ import pytest
3+ import sys
4+ from unittest import mock
5+
6+ # 1. Shield the imports
7+ try :
8+ from ezyrb .parallel import ReducedOrderModel as ParallelROM
9+ import tests .test_approximation as original_module
10+ HAS_PARALLEL = True
11+ except ImportError :
12+ HAS_PARALLEL = False
13+
14+ if not HAS_PARALLEL :
15+ raise unittest .SkipTest ("Parallel dependencies missing" )
16+
17+ # 2. The "Lazy" Swap (Monkeypatching)
18+ # We replace the ROM in the original module's namespace
19+ # so that decorators like @pytest.mark.parametrize use the Parallel version.
20+ original_module .ROM = ParallelROM
21+ if hasattr (original_module , 'ReducedOrderModel' ):
22+ original_module .ReducedOrderModel = ParallelROM
23+
24+ # 3. Re-export the tests so pytest finds them here
25+ from tests .test_approximation import *
Original file line number Diff line number Diff line change 1+ import unittest
2+ import pytest
3+ import sys
4+ from unittest import mock
5+
6+ # 1. Shield the imports
7+ try :
8+ from ezyrb .parallel import ReducedOrderModel as ParallelROM
9+ import tests .test_database as original_module
10+ HAS_PARALLEL = True
11+ except ImportError :
12+ HAS_PARALLEL = False
13+
14+ if not HAS_PARALLEL :
15+ raise unittest .SkipTest ("Parallel dependencies missing" )
16+
17+ # 2. The "Lazy" Swap (Monkeypatching)
18+ # We replace the ROM in the original module's namespace
19+ # so that decorators like @pytest.mark.parametrize use the Parallel version.
20+ original_module .ROM = ParallelROM
21+ if hasattr (original_module , 'ReducedOrderModel' ):
22+ original_module .ReducedOrderModel = ParallelROM
23+
24+ # 3. Re-export the tests so pytest finds them here
25+ from tests .test_database import *
Original file line number Diff line number Diff line change 1+ import unittest
2+ import pytest
3+ import sys
4+ from unittest import mock
5+
6+ # 1. Shield the imports
7+ try :
8+ from ezyrb .parallel import ReducedOrderModel as ParallelROM
9+ import tests .test_gpr as original_module
10+ HAS_PARALLEL = True
11+ except ImportError :
12+ HAS_PARALLEL = False
13+
14+ if not HAS_PARALLEL :
15+ raise unittest .SkipTest ("Parallel dependencies missing" )
16+
17+ # 2. The "Lazy" Swap (Monkeypatching)
18+ # We replace the ROM in the original module's namespace
19+ # so that decorators like @pytest.mark.parametrize use the Parallel version.
20+ original_module .ROM = ParallelROM
21+ if hasattr (original_module , 'ReducedOrderModel' ):
22+ original_module .ReducedOrderModel = ParallelROM
23+
24+ # 3. Re-export the tests so pytest finds them here
25+ from tests .test_gpr import *
Original file line number Diff line number Diff line change 1+ import unittest
2+ import pytest
3+ import sys
4+ from unittest import mock
5+
6+ # 1. Shield the imports
7+ try :
8+ from ezyrb .parallel import ReducedOrderModel as ParallelROM
9+ import tests .test_k_neighbors_regressor as original_module
10+ HAS_PARALLEL = True
11+ except ImportError :
12+ HAS_PARALLEL = False
13+
14+ if not HAS_PARALLEL :
15+ raise unittest .SkipTest ("Parallel dependencies missing" )
16+
17+ # 2. The "Lazy" Swap (Monkeypatching)
18+ # We replace the ROM in the original module's namespace
19+ # so that decorators like @pytest.mark.parametrize use the Parallel version.
20+ original_module .ROM = ParallelROM
21+ if hasattr (original_module , 'ReducedOrderModel' ):
22+ original_module .ReducedOrderModel = ParallelROM
23+
24+ # 3. Re-export the tests so pytest finds them here
25+ from tests .test_k_neighbors_regressor import *
Original file line number Diff line number Diff line change 1+ import unittest
2+ import pytest
3+ import sys
4+ from unittest import mock
5+
6+ # 1. Shield the imports
7+ try :
8+ from ezyrb .parallel import ReducedOrderModel as ParallelROM
9+ import tests .test_linear as original_module
10+ HAS_PARALLEL = True
11+ except ImportError :
12+ HAS_PARALLEL = False
13+
14+ if not HAS_PARALLEL :
15+ raise unittest .SkipTest ("Parallel dependencies missing" )
16+
17+ # 2. The "Lazy" Swap (Monkeypatching)
18+ # We replace the ROM in the original module's namespace
19+ # so that decorators like @pytest.mark.parametrize use the Parallel version.
20+ original_module .ROM = ParallelROM
21+ if hasattr (original_module , 'ReducedOrderModel' ):
22+ original_module .ReducedOrderModel = ParallelROM
23+
24+ # 3. Re-export the tests so pytest finds them here
25+ from tests .test_linear import *
Original file line number Diff line number Diff line change 1+ import unittest
2+ import pytest
3+ import sys
4+ from unittest import mock
5+
6+ # 1. Shield the imports
7+ try :
8+ from ezyrb .parallel import ReducedOrderModel as ParallelROM
9+ import tests .test_nnshift as original_module
10+ HAS_PARALLEL = True
11+ except ImportError :
12+ HAS_PARALLEL = False
13+
14+ if not HAS_PARALLEL :
15+ raise unittest .SkipTest ("Parallel dependencies missing" )
16+
17+ # 2. The "Lazy" Swap (Monkeypatching)
18+ # We replace the ROM in the original module's namespace
19+ # so that decorators like @pytest.mark.parametrize use the Parallel version.
20+ original_module .ROM = ParallelROM
21+ if hasattr (original_module , 'ReducedOrderModel' ):
22+ original_module .ReducedOrderModel = ParallelROM
23+
24+ # 3. Re-export the tests so pytest finds them here
25+ from tests .test_nnshift import *
You can’t perform that action at this time.
0 commit comments