summaryrefslogtreecommitdiff
path: root/testing/cffi0/test_zintegration.py
diff options
context:
space:
mode:
authorLucia Li <luciali@google.com>2021-11-08 21:45:14 +0800
committerLucia Li <luciali@google.com>2021-11-09 11:01:46 +0800
commit6aa63b08263172a979012747497f4207cc341bb0 (patch)
tree64f8c90740adbe25c30379d6567fd2acafcbd2dd /testing/cffi0/test_zintegration.py
parent3e013ad5e4325c9a301ddde47e997bfd797167cd (diff)
downloadcffi-6aa63b08263172a979012747497f4207cc341bb0.tar.gz
Upgrade cffi from 1.12.2 to 1.15.0
Source is fetched from https://foss.heptapod.net/pypy/cffi/-/archive/branch/release-1.15/cffi-branch-release-1.15.zip Build cffi manually and update Android.bp Bug: 205265538 Test: None Change-Id: I91a5ed3b96029b3988602aba6a00c0e0748d0600
Diffstat (limited to 'testing/cffi0/test_zintegration.py')
-rw-r--r--testing/cffi0/test_zintegration.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/testing/cffi0/test_zintegration.py b/testing/cffi0/test_zintegration.py
index d56dac2..ce925b8 100644
--- a/testing/cffi0/test_zintegration.py
+++ b/testing/cffi0/test_zintegration.py
@@ -1,11 +1,13 @@
import py, os, sys, shutil
import subprocess
from testing.udir import udir
+import pytest
if sys.platform == 'win32':
- py.test.skip('snippets do not run on win32')
+ pytestmark = pytest.mark.skip('snippets do not run on win32')
if sys.version_info < (2, 7):
- py.test.skip('fails e.g. on a Debian/Ubuntu which patches virtualenv'
+ pytestmark = pytest.mark.skip(
+ 'fails e.g. on a Debian/Ubuntu which patches virtualenv'
' in a non-2.6-friendly way')
def create_venv(name):
@@ -75,7 +77,10 @@ def really_run_setup_and_program(dirname, venv_dir_and_paths, python_snippet):
env = os.environ.copy()
env['PYTHONPATH'] = paths
subprocess.check_call((vp, 'setup.py', 'clean'), env=env)
- subprocess.check_call((vp, 'setup.py', 'install'), env=env)
+ # there's a setuptools/easy_install bug that causes this to fail when the build/install occur together and
+ # we're in the same directory with the build (it tries to look up dependencies for itself on PyPI);
+ # subsequent runs will succeed because this test doesn't properly clean up the build- use pip for now.
+ subprocess.check_call((vp, '-m', 'pip', 'install', '.'), env=env)
subprocess.check_call((vp, str(python_f)), env=env)
finally:
os.chdir(olddir)