-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Remove matplotlib in minimal test setting (#479)
* Remove matplotlib in minimal test setting * Skip examples test when matplotlib not installed * Do not require matplotlib for testing * Fix format * Do not require matplotlib for testing * Do not require matplotlib for testing
- Loading branch information
Showing
20 changed files
with
184 additions
and
92 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,32 @@ | ||
import unittest | ||
|
||
import matplotlib | ||
try: | ||
import matplotlib | ||
|
||
matplotlib.use("Agg") | ||
matplotlib.use("Agg") | ||
NO_MATPLOTLIB = False | ||
except: | ||
NO_MATPLOTLIB = True | ||
|
||
try: | ||
from smt.surrogate_models import RMTB, RMTC | ||
|
||
compiled_available = True | ||
NO_COMPILED = True | ||
except: | ||
compiled_available = False | ||
NO_COMPILED = False | ||
|
||
|
||
class Test(unittest.TestCase): | ||
@unittest.skipIf(not compiled_available, "C compilation failed") | ||
@unittest.skipIf( | ||
NO_COMPILED or NO_MATPLOTLIB, | ||
"C compilation failed or matplotlib not installed", | ||
) | ||
def test_rmtb(self): | ||
from smt.examples.one_D_step import run_one_D_step_rmtb | ||
|
||
@unittest.skipIf(not compiled_available, "C compilation failed") | ||
@unittest.skipIf( | ||
NO_COMPILED or NO_MATPLOTLIB, | ||
"C compilation failed or matplotlib not installed", | ||
) | ||
def test_rmtc(self): | ||
from smt.examples.one_D_step import run_one_D_step_rmtc |
Oops, something went wrong.