mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
Change _py_abc to workaround current issue, and run test with PYTHONPATH
linking to Lib directory.
This commit is contained in:
1 parent
39d4d64a4c
commit
0bd08618af
3 files changed
+3
-5
No files matched your search
+1
-1
@@ -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()
|
||||
|
||||
@@ -1,4 +1 @@
|
||||
import sys
|
||||
sys.path.append('Lib')
|
||||
|
||||
import abc
|
||||
@@ -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':
|
||||
|
||||
Reference in new issue
Block a user