Skip to content

Commit

Permalink
Move QA tests for tests to qa sub-directory
Browse files Browse the repository at this point in the history
  • Loading branch information
jo-basevi committed Aug 26, 2024
1 parent 0f1676d commit ad524eb
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
5 changes: 5 additions & 0 deletions tests/common.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import os
from pathlib import Path

HERE = os.path.dirname(__file__)
RESOURCES_DIR = Path(f"{HERE}/resources")
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import os
import shlex
import subprocess
from pathlib import Path

HERE = os.path.dirname(__file__)
RESOURCES_DIR = Path(f"{HERE}/resources")
from tests.common import RESOURCES_DIR


def test_test_access_esm1p5_config_release_release_preindustrial():
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import os
import shlex
import shutil
import subprocess
from pathlib import Path

import yaml

HERE = os.path.dirname(__file__)
RESOURCES_DIR = Path(f"{HERE}/resources")
from tests.common import RESOURCES_DIR


def test_test_access_om2_config_release_1deg_jra55_ryf():
Expand Down
5 changes: 1 addition & 4 deletions tests/test_test_config.py → tests/qa/test_test_config.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import os
import shlex
import subprocess
from pathlib import Path

HERE = os.path.dirname(__file__)
RESOURCES_DIR = Path(f"{HERE}/resources")
from tests.common import RESOURCES_DIR


def test_test_config_access_om2():
Expand Down
4 changes: 1 addition & 3 deletions tests/test_model_extract_checksums.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import json
import os
from pathlib import Path
from unittest.mock import Mock

Expand All @@ -8,10 +7,9 @@
import requests

from model_config_tests.models import index as model_index
from tests.common import RESOURCES_DIR

MODEL_NAMES = model_index.keys()
HERE = os.path.dirname(__file__)
RESOURCES_DIR = Path(f"{HERE}/resources")


@pytest.mark.parametrize("model_name", MODEL_NAMES)
Expand Down
5 changes: 1 addition & 4 deletions tests/test_test_bit_reprodubility.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Test for bit reproducibility tests"""

import os
import shlex
import shutil
import subprocess
Expand All @@ -10,9 +9,7 @@
import pytest
import yaml

# Resources of pre-generated output and checksums for tests
HERE = os.path.dirname(__file__)
RESOURCES_DIR = Path(f"{HERE}/resources")
from tests.common import RESOURCES_DIR

# Importing the test file test_bit_reproducibility.py, will run all the
# tests in the current pytest session. So to run only one test, and to
Expand Down

0 comments on commit ad524eb

Please sign in to comment.