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