Change _py_abc to workaround current issue, and run test with PYTHONPATH

linking to Lib directory.
This commit is contained in:
ben committed 2019-04-04 20:11:53 +13:00
1 parent 39d4d64a4c
commit 0bd08618af
3 files changed
+3 -5

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ class ABCMeta(type):
_abc_invalidation_counter = 0
def __new__(mcls, name, bases, namespace, **kwargs):
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
cls = type.__new__(mcls, name, bases, namespace, **kwargs)
# Compute set of abstract method names
abstracts = {name
for name, value in namespace.items()
-3
View File
@@ -1,4 +1 @@
import sys
sys.path.append('Lib')
import abc
+2 -1
View File
@@ -27,7 +27,7 @@ TEST_DIRS = {
}
CPYTHON_RUNNER_DIR = os.path.abspath(os.path.join(ROOT_DIR, 'py_code_object'))
RUSTPYTHON_RUNNER_DIR = os.path.abspath(os.path.join(ROOT_DIR))
RUSTPYTHON_LIB_DIR = os.path.abspath(os.path.join(ROOT_DIR, "Lib"))
@contextlib.contextmanager
def pushd(path):
@@ -73,6 +73,7 @@ def run_via_rustpython(filename, test_type):
env = os.environ.copy()
env['RUST_LOG'] = 'info,cargo=error,jobserver=error'
env['RUST_BACKTRACE'] = '1'
env['PYTHONPATH'] = RUSTPYTHON_LIB_DIR
target = 'release'
if env.get('CODE_COVERAGE', 'false') == 'true':