Skip to content

Commit 1b5b2dc

Browse files
Make plot helper compatible with Python 3.13 (#549)
1 parent 8f9bf8c commit 1b5b2dc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pySDC/helpers/plot_helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import matplotlib as mpl
22
import matplotlib.pyplot as plt
3-
from distutils.spawn import find_executable
3+
import shutil
44

55
default_mpl_params = mpl.rcParams.copy()
66

@@ -100,7 +100,7 @@ def setup_mpl(font_size=8, reset=False):
100100

101101
mpl.rcParams.update(style_options)
102102

103-
if find_executable('latex'):
103+
if shutil.which('latex'):
104104
latex_support = {
105105
"pgf.texsystem": "pdflatex", # change this if using xetex or lautex
106106
"text.usetex": True, # use LaTeX to write all text
@@ -125,7 +125,7 @@ def newfig(textwidth, scale, ratio=0.6180339887):
125125

126126

127127
def savefig(filename, save_pdf=True, save_pgf=True, save_png=True):
128-
if save_pgf and find_executable('latex'):
128+
if save_pgf and shutil.which('latex'):
129129
plt.savefig('{}.pgf'.format(filename), bbox_inches='tight')
130130
if save_pdf:
131131
plt.savefig('{}.pdf'.format(filename), bbox_inches='tight')

pySDC/tests/test_benchmarks/test_collocation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def wrapper():
2525
benchmark(wrapper)
2626

2727

28+
@pytest.mark.base
2829
@pytest.mark.parametrize("node_type", node_types)
2930
@pytest.mark.parametrize("quad_type", quad_types)
3031
def test_canintegratepolynomials(node_type, quad_type):
@@ -61,6 +62,7 @@ def test_canintegratepolynomials(node_type, quad_type):
6162
)
6263

6364

65+
@pytest.mark.base
6466
@pytest.mark.parametrize("node_type", node_types)
6567
@pytest.mark.parametrize("quad_type", quad_types)
6668
def test_relateQandSmat(node_type, quad_type):
@@ -82,6 +84,7 @@ def test_relateQandSmat(node_type, quad_type):
8284
)
8385

8486

87+
@pytest.mark.base
8588
@pytest.mark.parametrize("node_type", node_types)
8689
@pytest.mark.parametrize("quad_type", quad_types)
8790
def test_partialquadraturewithQ(node_type, quad_type):
@@ -104,6 +107,7 @@ def test_partialquadraturewithQ(node_type, quad_type):
104107
)
105108

106109

110+
@pytest.mark.base
107111
@pytest.mark.parametrize("node_type", node_types)
108112
@pytest.mark.parametrize("quad_type", quad_types)
109113
def test_partialquadraturewithS(node_type, quad_type):

0 commit comments

Comments
 (0)