forked from ESMCI/cime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin' into precommit
- Loading branch information
Showing
64 changed files
with
400 additions
and
344 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import os | ||
import sys | ||
|
||
CIMEROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "scripts", "lib")) | ||
sys.path.insert(0, CIMEROOT) | ||
|
||
import pytest | ||
|
||
from CIME import utils | ||
from CIME.tests import scripts_regression_tests | ||
|
||
os.environ["CIME_GLOBAL_WALLTIME"] = "0:05:00" | ||
|
||
|
||
def pytest_addoption(parser): | ||
# set addoption as add_argument to use common argument setup | ||
# pytest's addoption has same signature as add_argument | ||
setattr(parser, "add_argument", parser.addoption) | ||
|
||
scripts_regression_tests.setup_arguments(parser) | ||
|
||
# verbose and debug flags already exist | ||
parser.addoption("--silent", action="store_true", | ||
help="Disable all logging") | ||
|
||
|
||
def pytest_configure(config): | ||
kwargs = vars(config.option) | ||
|
||
utils.configure_logging(kwargs['verbose'], | ||
kwargs['debug'], | ||
kwargs['silent']) | ||
|
||
scripts_regression_tests.configure_tests(**kwargs) | ||
|
||
|
||
@pytest.fixture(scope="session", autouse=True) | ||
def setup(pytestconfig): | ||
os.chdir(CIMEROOT) |
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
Oops, something went wrong.