Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4ff3d45

Browse files
authored
Merge pull request#26585 from meeseeksmachine/auto-backport-of-pr-26576-on-v3.8.x
Backport PR#26576 on branch v3.8.x (Use sys.platform over os.name)
2 parentsb9ea667 +0b81f6c commit4ff3d45

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

‎lib/matplotlib/dviread.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ def find_tex_file(filename):
10861086
iflk:
10871087
path=lk.search(filename)
10881088
else:
1089-
ifos.name=='nt':
1089+
ifsys.platform=='win32':
10901090
# On Windows only, kpathsea can use utf-8 for cmd args and output.
10911091
# The `command_line_encoding` environment variable is set to force
10921092
# it to always use utf-8 encoding. See Matplotlib issue #11848.

‎lib/matplotlib/tests/test_animation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
frompathlibimportPath
33
importplatform
44
importre
5+
importshutil
56
importsubprocess
67
importsys
78
importweakref
@@ -318,7 +319,7 @@ def test_cleanup_temporaries(method_name, tmpdir, anim):
318319
assertlist(Path(str(tmpdir)).iterdir())== []
319320

320321

321-
@pytest.mark.skipif(os.name!="posix",reason="requires a POSIX OS")
322+
@pytest.mark.skipif(shutil.which("/bin/sh")isNone,reason="requires a POSIX OS")
322323
deftest_failing_ffmpeg(tmpdir,monkeypatch,anim):
323324
"""
324325
Test that we correctly raise a CalledProcessError when ffmpeg fails.

‎lib/matplotlib/tests/test_backend_webagg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def test_webagg_fallback(backend):
1111
ifbackend=="nbagg":
1212
pytest.importorskip("IPython")
1313
env=dict(os.environ)
14-
ifos.name!="nt":
14+
ifsys.platform!="win32":
1515
env["DISPLAY"]=""
1616

1717
env["MPLBACKEND"]=backend

‎lib/matplotlib/tests/test_backends_interactive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def test_cross_Qt_imports():
473473

474474
@pytest.mark.skipif('TF_BUILD'inos.environ,
475475
reason="this test fails an azure for unknown reasons")
476-
@pytest.mark.skipif(os.name=="nt",reason="Cannot send SIGINT on Windows.")
476+
@pytest.mark.skipif(sys.platform=="win32",reason="Cannot send SIGINT on Windows.")
477477
deftest_webagg():
478478
pytest.importorskip("tornado")
479479
proc=subprocess.Popen(

‎lib/matplotlib/tests/test_matplotlib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def test_parse_to_version_info(version_str, version_tuple):
1717
assertmatplotlib._parse_to_version_info(version_str)==version_tuple
1818

1919

20-
@pytest.mark.skipif(
21-
os.name=="nt",reason="chmod() doesn't work as is on Windows")
22-
@pytest.mark.skipif(os.name!="nt"andos.geteuid()==0,
20+
@pytest.mark.skipif(sys.platform=="win32",
21+
reason="chmod() doesn't work as is on Windows")
22+
@pytest.mark.skipif(sys.platform!="win32"andos.geteuid()==0,
2323
reason="chmod() doesn't work as root")
2424
deftest_tmpconfigdir_warning(tmpdir):
2525
"""Test that a warning is emitted if a temporary configdir must be used."""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp