diff --git a/prepare_solution_win.bat b/prepare_solution_win.bat index 7771b0f..410b7a7 100644 --- a/prepare_solution_win.bat +++ b/prepare_solution_win.bat @@ -8,7 +8,7 @@ REM set platform=win set architecture=x64 -set generator="Visual Studio 16 2019" +set generator="Visual Studio 17 2022" set curr_dir=%~dp0 set src_path=%curr_dir%\src diff --git a/test.and.py b/test.and.py index 1fe7ee4..3ea1a8b 100644 --- a/test.and.py +++ b/test.and.py @@ -20,7 +20,7 @@ import re import importlib sys.path.append("tests") -from clr import * +from tests.clr import * testList = ['Syntax', 'Semantic', 'Advanced', 'Samples'] diff --git a/tests/testapp.py b/tests/testapp.py index 43396f0..5532211 100644 --- a/tests/testapp.py +++ b/tests/testapp.py @@ -11,7 +11,15 @@ import io from argparse import ArgumentParser from os.path import join, normpath, basename -from clr import * +import inspect +clrpath = os.path.join(os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))), "clr.py") +print(f"clr path is {clrpath}") +import importlib.util +spec = importlib.util.spec_from_file_location("clr", clrpath) +clrmodule = importlib.util.module_from_spec(spec) +sys.modules["clr"] = clrmodule +spec.loader.exec_module(clrmodule) +globals().update({v: vars(clrmodule)[v] for v in ["fg", "bg", "style"]}) import re import testfuncs import importlib