8000 STY: formatting and import sorting · matplotlib/matplotlib@0515861 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0515861

Browse files
committed
STY: formatting and import sorting
1 parent cc845e7 commit 0515861

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

lib/matplotlib/tests/test_backend_nbagg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
22
from pathlib import Path
3-
43
from tempfile import TemporaryDirectory
54

65
import pytest

lib/matplotlib/tests/test_backend_webagg.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os
22
import sys
33
import pytest
4-
import matplotlib.backends.backend_webagg_core
54

5+
import matplotlib.backends.backend_webagg_core
66
from matplotlib.testing import subprocess_run_for_testing
77

88

@@ -24,9 +24,7 @@ def test_webagg_fallback(backend):
2424
+ "print(plt.get_backend());"
2525
f"assert '{backend}' == plt.get_backend().lower();"
2626
)
27-
subprocess_run_for_testing(
28-
[sys.executable, "-c", test_code], env=env, check=True
29-
)
27+
subprocess_run_for_testing([sys.executable, "-c", test_code], env=env, check=True)
3028

3129

3230
def test_webagg_core_no_toolbar():

lib/matplotlib/tests/test_determinism.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44

55
import os
6-
import subprocess
76
import sys
87

98
import pytest

lib/matplotlib/tests/test_font_manager.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,7 @@ def bad_idea(n):
277277
def test_fontcache_thread_safe():
278278
pytest.importorskip('threading')
279279

280-
proc = subprocess_run_helper(
281-
_test_threading,
282-
timeout=10
283-
)
284-
if proc.returncode:
285-
pytest.fail("The subprocess returned with non-zero exit status "
286-
f"{proc.returncode}.")
280+
subprocess_run_helper(_test_threading, timeout=10)
287281

288282

289283
def test_fontentry_dataclass():

lib/matplotlib/tests/test_matplotlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def test_importable_with__OO():
7474
"import matplotlib.cbook as cbook; "
7575
"import matplotlib.patches as mpatches"
7676
)
77-
cmd = [sys.executable, "-OO", "-c", program]
7877
subprocess_run_for_testing(
79-
cmd, env={**os.environ, "MPLBACKEND": ""}, check=True
78+
[sys.executable, "-OO", "-c", program],
79+
env={**os.environ, "MPLBACKEND": ""}, check=True
8080
)

lib/matplotlib/tests/test_texmanager.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import os
22
from pathlib import Path
33
import re
4-
54
import sys
65

7-
import matplotlib.pyplot as plt
8-
from matplotlib.texmanager import TexManager
9-
from matplotlib.testing._markers import needs_usetex
106
import pytest
117

8+
import matplotlib.pyplot as plt
129
from matplotlib.testing import subprocess_run_for_testing
10+
from matplotlib.testing._markers import needs_usetex
11+
from matplotlib.texmanager import TexManager
1312

1413

1514
def test_fontconfig_preamble():

0 commit comments

Comments
 (0)
0