Skip to content

Commit ce98c4f

Browse files
committed
[run-ex] Snoozing plotting tests until July, due to machine dependent tiny differences in cartopy output
1 parent 4a71a9f commit ce98c4f

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

tests/plotting/test_norkyst.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
import pytest
22

3+
from datetime import datetime
34
from opendrift import test_data_folder as tdf
45
from opendrift.readers import reader_netCDF_CF_generic
56
from opendrift.models.oceandrift import OceanDrift
67

8+
snooze_time = datetime(2026, 7, 1)
9+
snooze_graphical = datetime.now() < snooze_time
10+
snooze_message = f'Snoozing graphical tests until {snooze_time}'
711

12+
@pytest.mark.skipif(snooze_graphical is True, reason=snooze_message)
813
@pytest.mark.slow
914
@pytest.mark.mpl_image_compare
1015
def test_fast_norkyst():
@@ -23,6 +28,7 @@ def test_fast_norkyst():
2328
return o.plot(fast=True, buffer=.2, land_zorder=0)[1]
2429

2530

31+
@pytest.mark.skipif(snooze_graphical is True, reason=snooze_message)
2632
@pytest.mark.slow
2733
@pytest.mark.mpl_image_compare
2834
def test_norkyst():

tests/readers/test_global_landmask.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import numpy as np
22
import pytest
33
from . import *
4+
from datetime import datetime
45
from opendrift.readers import reader_global_landmask
56
from opendrift.readers import reader_ROMS_native
67
from opendrift.models.oceandrift import OceanDrift
78

9+
snooze_time = datetime(2026, 7, 1)
10+
snooze_graphical = datetime.now() < snooze_time
11+
snooze_message = f'Snoozing graphical tests until {snooze_time}'
12+
13+
814
def test_global_setup(benchmark):
915
benchmark(reader_global_landmask.Reader)
1016

@@ -68,6 +74,7 @@ def test_plot(tmpdir):
6874
# plt.show()
6975
plt.savefig('%s/cartplot.png' % tmpdir)
7076

77+
@pytest.mark.skipif(snooze_graphical is True, reason=snooze_message)
7178
@pytest.mark.slow
7279
@pytest.mark.parametrize("fast", [False, True])
7380
@pytest.mark.parametrize("scale", ["auto", "c", "f"])

0 commit comments

Comments
 (0)