Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cb1983e

Browse files
authored
Merge pull request #14964 from meeseeksmachine/auto-backport-of-pr-14649-on-v2.2.x
Backport Python 3 fixes on branch v2.2.x
2 parents 180a87c + 66c9dfa commit cb1983e

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

.appveyor.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ environment:
1919
# theoretically the CONDA_INSTALL_LOCN could be only two: one for 32bit,
2020
# one for 64bit because we construct envs anyway. But using one for the
2121
# right python version is hopefully making it fast due to package caching.
22-
- PYTHON_VERSION: "2.7"
23-
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
24-
TEST_ALL: "no"
2522
- PYTHON_VERSION: "3.5"
2623
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
2724
TEST_ALL: "no"
2825
- PYTHON_VERSION: "3.6"
2926
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
3027
TEST_ALL: "no"
28+
- PYTHON_VERSION: "2.7"
29+
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
30+
TEST_ALL: "no"
3131

3232
# We always use a 64-bit machine, but can build x86 distributions
3333
# with the PYTHON_ARCH variable
@@ -53,6 +53,7 @@ install:
5353
- conda config --set show_channel_urls yes
5454
- conda config --prepend channels conda-forge
5555
# this is now the downloaded conda...
56+
- activate
5657
- conda info -a
5758

5859
# For building, use a new environment which only includes the requirements for mpl

lib/matplotlib/tests/test_figure.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,11 @@ def test_subplots_shareax_loglabels():
366366

367367
def test_savefig():
368368
fig = plt.figure()
369-
msg = "savefig() takes 2 positional arguments but 3 were given"
370-
with pytest.raises(TypeError, message=msg):
369+
if sys.version_info[0] == 3:
370+
msg = r"savefig\(\) takes 2 positional arguments but 3 were given"
371+
else:
372+
msg = r"savefig\(\) takes exactly 2 arguments \(3 given\)"
373+
with pytest.raises(TypeError, match=msg):
371374
fig.savefig("fname1.png", "fname2.png")
372375

373376

0 commit comments

Comments
 (0)