|
|
b45913 |
From 9c7d865e17ec16a847090a3e0d1498b698b99756 Mon Sep 17 00:00:00 2001
|
|
|
b45913 |
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
|
|
b45913 |
Date: Mon, 14 Nov 2022 12:30:12 +0100
|
|
|
b45913 |
Subject: [PATCH 1/2] Drop py.code usage from tests, no longer depend on the
|
|
|
b45913 |
deprecated py package
|
|
|
b45913 |
|
|
|
b45913 |
--HG--
|
|
|
b45913 |
branch : py.code
|
|
|
b45913 |
---
|
|
|
b45913 |
README.md | 2 +-
|
|
|
b45913 |
requirements.txt | 1 -
|
|
|
b45913 |
testing/cffi0/test_zintegration.py | 3 ++-
|
|
|
b45913 |
testing/cffi1/test_dlopen_unicode_literals.py | 4 ++--
|
|
|
b45913 |
4 files changed, 5 insertions(+), 5 deletions(-)
|
|
|
b45913 |
|
|
|
b45913 |
diff --git a/README.md b/README.md
|
|
|
b45913 |
index b4b84884..d39d88da 100644
|
|
|
b45913 |
--- a/README.md
|
|
|
b45913 |
+++ b/README.md
|
|
|
b45913 |
@@ -30,7 +30,7 @@ Testing/development tips
|
|
|
b45913 |
|
|
|
b45913 |
To run tests under CPython, run::
|
|
|
b45913 |
|
|
|
b45913 |
- pip install pytest py # if you don't have pytest and py already
|
|
|
b45913 |
+ pip install pytest # if you don't have pytest already
|
|
|
b45913 |
pip install pycparser
|
|
|
b45913 |
python setup.py build_ext -f -i
|
|
|
b45913 |
pytest c/ testing/
|
|
|
b45913 |
diff --git a/requirements.txt b/requirements.txt
|
|
|
b45913 |
index 881a093f..a97f0282 100644
|
|
|
b45913 |
--- a/requirements.txt
|
|
|
b45913 |
+++ b/requirements.txt
|
|
|
b45913 |
@@ -1,3 +1,2 @@
|
|
|
b45913 |
pycparser
|
|
|
b45913 |
pytest
|
|
|
b45913 |
-py
|
|
|
b45913 |
diff --git a/testing/cffi0/test_zintegration.py b/testing/cffi0/test_zintegration.py
|
|
|
b45913 |
index d6a02ce0..ca2d4642 100644
|
|
|
b45913 |
--- a/testing/cffi0/test_zintegration.py
|
|
|
b45913 |
+++ b/testing/cffi0/test_zintegration.py
|
|
|
b45913 |
@@ -1,5 +1,6 @@
|
|
|
b45913 |
import py, os, sys, shutil
|
|
|
b45913 |
import subprocess
|
|
|
b45913 |
+import textwrap
|
|
|
b45913 |
from testing.udir import udir
|
|
|
b45913 |
import pytest
|
|
|
b45913 |
|
|
|
b45913 |
@@ -66,7 +67,7 @@ def really_run_setup_and_program(dirname, venv_dir_and_paths, python_snippet):
|
|
|
b45913 |
remove(os.path.join(basedir, '__pycache__'))
|
|
|
b45913 |
olddir = os.getcwd()
|
|
|
b45913 |
python_f = udir.join('x.py')
|
|
|
b45913 |
- python_f.write(py.code.Source(python_snippet))
|
|
|
b45913 |
+ python_f.write(textwrap.dedent(python_snippet))
|
|
|
b45913 |
try:
|
|
|
b45913 |
os.chdir(str(SNIPPET_DIR.join(dirname)))
|
|
|
b45913 |
if os.name == 'nt':
|
|
|
b45913 |
diff --git a/testing/cffi1/test_dlopen_unicode_literals.py b/testing/cffi1/test_dlopen_unicode_literals.py
|
|
|
b45913 |
index e792866e..dc955a57 100644
|
|
|
b45913 |
--- a/testing/cffi1/test_dlopen_unicode_literals.py
|
|
|
b45913 |
+++ b/testing/cffi1/test_dlopen_unicode_literals.py
|
|
|
b45913 |
@@ -1,4 +1,4 @@
|
|
|
b45913 |
-import py, os
|
|
|
b45913 |
+import os
|
|
|
b45913 |
|
|
|
b45913 |
s = """from __future__ import unicode_literals
|
|
|
b45913 |
"""
|
|
|
b45913 |
@@ -6,4 +6,4 @@ s = """from __future__ import unicode_literals
|
|
|
b45913 |
with open(os.path.join(os.path.dirname(__file__), 'test_dlopen.py')) as f:
|
|
|
b45913 |
s += f.read()
|
|
|
b45913 |
|
|
|
b45913 |
-exec(py.code.compile(s))
|
|
|
b45913 |
+exec(compile(s, filename='test_dlopen.py', mode='exec'))
|
|
|
b45913 |
--
|
|
|
b45913 |
GitLab
|
|
|
b45913 |
|
|
|
b45913 |
|
|
|
b45913 |
From 4c1551037965864cfe5494647af014e2390d077c Mon Sep 17 00:00:00 2001
|
|
|
b45913 |
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
|
|
b45913 |
Date: Mon, 14 Nov 2022 13:12:31 +0100
|
|
|
b45913 |
Subject: [PATCH 2/2] Make the space count consistent with the past
|
|
|
b45913 |
|
|
|
b45913 |
--HG--
|
|
|
b45913 |
branch : py.code
|
|
|
b45913 |
---
|
|
|
b45913 |
README.md | 2 +-
|
|
|
b45913 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
b45913 |
|
|
|
b45913 |
diff --git a/README.md b/README.md
|
|
|
b45913 |
index d39d88da..21c82b84 100644
|
|
|
b45913 |
--- a/README.md
|
|
|
b45913 |
+++ b/README.md
|
|
|
b45913 |
@@ -30,7 +30,7 @@ Testing/development tips
|
|
|
b45913 |
|
|
|
b45913 |
To run tests under CPython, run::
|
|
|
b45913 |
|
|
|
b45913 |
- pip install pytest # if you don't have pytest already
|
|
|
b45913 |
+ pip install pytest # if you don't have pytest already
|
|
|
b45913 |
pip install pycparser
|
|
|
b45913 |
python setup.py build_ext -f -i
|
|
|
b45913 |
pytest c/ testing/
|
|
|
b45913 |
--
|
|
|
b45913 |
GitLab
|
|
|
b45913 |
|