Skip to content
Snippets Groups Projects
Verified Commit 1e2fbb63 authored by Jochen Sprickerhof's avatar Jochen Sprickerhof
Browse files

Rebase patches

parent 2dec58dc
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@ Build-Depends:
python3-pygments <!nocheck>,
python3-executing <!nocheck>,
python3-asttokens <!nocheck>,
python3-littleutils <!nocheck>,
python3-pure-eval <!nocheck>,
cython3 <!nocheck>,
python3-all-dev <!nocheck>,
......
From: Gordon Ball <gordon@chronitis.net>
Date: Thu, 13 Jan 2022 16:18:01 +0000
Subject: Patch out littleutils
This is a personal utility library only used for some trivial IO functions, so we can avoid depending on it.
---
setup.cfg | 4 ++--
tests/utils.py | 18 +++++++++++++-----
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index dc8b29b..cc16b3f 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,10 +25,10 @@ packages = stack_data
install_requires = executing; asttokens; pure_eval
setup_requires = setuptools>=44; setuptools_scm[toml]>=3.4.3
include_package_data = True
-tests_require = pytest; typeguard; pygments; littleutils
+tests_require = pytest; typeguard; pygments
[options.extras_require]
-tests = pytest; typeguard; pygments; littleutils; cython
+tests = pytest; typeguard; pygments; cython
[coverage:run]
relative_files = True
diff --git a/tests/utils.py b/tests/utils.py
index 7ba00e2..ac9d951 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -1,6 +1,6 @@
import os
-from littleutils import string_to_file, file_to_string, json_to_file, file_to_json
+import json
def compare_to_file(text, name):
@@ -10,9 +10,13 @@ def compare_to_file(text, name):
name + '.txt',
)
if os.environ.get('FIX_STACK_DATA_TESTS'):
- string_to_file(text, filename)
+ # string_to_file(text, filename)
+ with open(filename, "w") as f:
+ f.write(string)
else:
- expected_output = file_to_string(filename)
+ # expected_output = file_to_string(filename)
+ with open(filename) as f:
+ expected_output = f.read()
assert text == expected_output
@@ -23,7 +27,11 @@ def compare_to_file_json(data, name):
name + '.json',
)
if os.environ.get('FIX_STACK_DATA_TESTS'):
- json_to_file(data, filename, indent=4)
+ # json_to_file(data, filename, indent=4)
+ with open(filename) as f:
+ json.dump(data, f, intent=4)
else:
- expected_output = file_to_json(filename)
+ # expected_output = file_to_json(filename)
+ with open(filename) as f:
+ expected_output = json.load(f)
assert data == expected_output
......@@ -9,19 +9,19 @@ The available version is too old for the usage here
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/setup.cfg b/setup.cfg
index cc16b3f..bbf1ff6 100644
index 05f3dda..eec7437 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -25,10 +25,10 @@ packages = stack_data
install_requires = executing; asttokens; pure_eval
@@ -29,10 +29,10 @@ install_requires =
setup_requires = setuptools>=44; setuptools_scm[toml]>=3.4.3
include_package_data = True
-tests_require = pytest; typeguard; pygments
+tests_require = pytest; pygments
-tests_require = pytest; typeguard; pygments; littleutils
+tests_require = pytest; pygments; littleutils
[options.extras_require]
-tests = pytest; typeguard; pygments; cython
+tests = pytest; pygments; cython
-tests = pytest; typeguard; pygments; littleutils; cython
+tests = pytest; pygments; littleutils; cython
[coverage:run]
relative_files = True
......
0001-Patch-out-littleutils.patch
0002-Patch-out-typeguard.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment