diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | requirements.txt | 1 | ||||
-rw-r--r-- | testing/cffi0/test_zintegration.py | 3 | ||||
-rw-r--r-- | testing/cffi1/test_dlopen_unicode_literals.py | 4 |
4 files changed, 5 insertions, 5 deletions
@@ -30,7 +30,7 @@ Testing/development tips To run tests under CPython, run:: - pip install pytest py # if you don't have pytest and py already + pip install pytest # if you don't have pytest already pip install pycparser python setup.py build_ext -f -i pytest c/ testing/ diff --git a/requirements.txt b/requirements.txt index 881a093..a97f028 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,2 @@ pycparser pytest -py diff --git a/testing/cffi0/test_zintegration.py b/testing/cffi0/test_zintegration.py index d6a02ce..ca2d464 100644 --- a/testing/cffi0/test_zintegration.py +++ b/testing/cffi0/test_zintegration.py @@ -1,5 +1,6 @@ import py, os, sys, shutil import subprocess +import textwrap from testing.udir import udir import pytest @@ -66,7 +67,7 @@ def really_run_setup_and_program(dirname, venv_dir_and_paths, python_snippet): remove(os.path.join(basedir, '__pycache__')) olddir = os.getcwd() python_f = udir.join('x.py') - python_f.write(py.code.Source(python_snippet)) + python_f.write(textwrap.dedent(python_snippet)) try: os.chdir(str(SNIPPET_DIR.join(dirname))) if os.name == 'nt': diff --git a/testing/cffi1/test_dlopen_unicode_literals.py b/testing/cffi1/test_dlopen_unicode_literals.py index e792866..dc955a5 100644 --- a/testing/cffi1/test_dlopen_unicode_literals.py +++ b/testing/cffi1/test_dlopen_unicode_literals.py @@ -1,4 +1,4 @@ -import py, os +import os s = """from __future__ import unicode_literals """ @@ -6,4 +6,4 @@ s = """from __future__ import unicode_literals with open(os.path.join(os.path.dirname(__file__), 'test_dlopen.py')) as f: s += f.read() -exec(py.code.compile(s)) +exec(compile(s, filename='test_dlopen.py', mode='exec')) |