Skip to content

Commit

Permalink
Relocate the submodule & fix relative test paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ktnlvr committed Jun 4, 2023
1 parent 2fb8653 commit 980769c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "ext/cpython"]
path = ext/cpython
path = pystd/ext/cpython
url = https://github.com/python/cpython.git
10 changes: 9 additions & 1 deletion pystd/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,21 @@
import importlib.util
from typing import List
from unittest import TestSuite, TextTestRunner
from os.path import join as join_paths, pardir, normpath

from . import random


def load_cpython_tests() -> List[TestSuite]:
full_path = normpath(
join_paths(
__file__,
pardir,
"ext/cpython/Lib/test/test_random.py",
)
)
spec = importlib.util.spec_from_file_location(
"test_random", "ext/cpython/Lib/test/test_random.py"
"test_random", full_path
)
test_random = importlib.util.module_from_spec(spec)
spec.loader.exec_module(test_random)
Expand Down

0 comments on commit 980769c

Please sign in to comment.