Skip to content

Commit

Permalink
tests: Automatically mark all example tests as example.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sbte committed Sep 17, 2024
1 parent b6214db commit 81cb30b
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tests/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,23 @@

matplotlib.use('Agg')

@pytest.mark.example
pytestmark = pytest.mark.example

def test_ldc_example():
from examples.ldc import main

main(nx=4)

@pytest.mark.example
def test_ldc2_example():
from examples.ldc2 import main

main(nx=4)

@pytest.mark.example
def test_ldc3_example():
from examples.ldc3 import main

main(nx=4)

@pytest.mark.example
def test_ldc_3d_example():
try:
from examples.ldc_3d import main
Expand All @@ -30,19 +28,16 @@ def test_ldc_3d_example():
except ImportError:
pytest.skip("HYMLS not found")

@pytest.mark.example
def test_dhc_example():
from examples.dhc import main

main(nx=16)

@pytest.mark.example
def test_qg_example():
from examples.qg import main

main()

@pytest.mark.example
def test_amoc_example():
from examples.amoc import main

Expand Down

0 comments on commit 81cb30b

Please sign in to comment.