Blob Blame History Raw
From f698c728cb726a22a5fda09a9ef7cb7f402bcc13 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 16 Jul 2018 02:00:16 -0400
Subject: [PATCH 2/2] Use correct pytest executable.

Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
 tests/test_pytest_mpl.py | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/tests/test_pytest_mpl.py b/tests/test_pytest_mpl.py
index 1439eaf..522d6d0 100644
--- a/tests/test_pytest_mpl.py
+++ b/tests/test_pytest_mpl.py
@@ -87,11 +87,11 @@ def test_fails(tmpdir):
         f.write(TEST_FAILING)
 
     # If we use --mpl, it should detect that the figure is wrong
-    code = subprocess.call('py.test --mpl {0}'.format(test_file), shell=True)
+    code = subprocess.call('pytest-3 --mpl {0}'.format(test_file), shell=True)
     assert code != 0
 
     # If we don't use --mpl option, the test should succeed
-    code = subprocess.call('py.test {0}'.format(test_file), shell=True)
+    code = subprocess.call('pytest-3 {0}'.format(test_file), shell=True)
     assert code == 0
 
 
@@ -114,7 +114,7 @@ def test_output_dir(tmpdir):
 
     # When we run the test, we should get output images where we specify
     output_dir = tmpdir.join('test_output_dir').strpath
-    code = subprocess.call('py.test --mpl-results-path={0} --mpl {1}'.format(output_dir, test_file),
+    code = subprocess.call('pytest-3 --mpl-results-path={0} --mpl {1}'.format(output_dir, test_file),
                            shell=True)
 
     assert code != 0
@@ -151,13 +151,13 @@ def test_generate(tmpdir):
     gen_dir = tmpdir.mkdir('spam').mkdir('egg').strpath
 
     # If we don't generate, the test will fail
-    p = subprocess.Popen('py.test --mpl {0}'.format(test_file), shell=True,
+    p = subprocess.Popen('pytest-3 --mpl {0}'.format(test_file), shell=True,
                          stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     p.wait()
     assert b'Image file not found for comparison test' in p.stdout.read()
 
     # If we do generate, the test should succeed and a new file will appear
-    code = subprocess.call('py.test --mpl-generate-path={0} {1}'.format(gen_dir, test_file), shell=True)
+    code = subprocess.call('pytest-3 --mpl-generate-path={0} {1}'.format(gen_dir, test_file), shell=True)
     assert code == 0
     assert os.path.exists(os.path.join(gen_dir, 'test_gen.png'))
 
-- 
2.17.1