From 2b1daf8b6dd57ce723fde4e2746cf22f4ffaf5ea Mon Sep 17 00:00:00 2001 From: Thomas Bean <47thomasj@gmail.com> Date: Wed, 8 Apr 2026 14:44:46 -0600 Subject: [PATCH 1/5] version --- _version.py | 1 + 1 file changed, 1 insertion(+) diff --git a/_version.py b/_version.py index e69de29..b3c06d4 100644 --- a/_version.py +++ b/_version.py @@ -0,0 +1 @@ +__version__ = "0.0.1" \ No newline at end of file From f81d3d6da5bd9bcbba42cc511681bf1939c65688 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 8 Apr 2026 20:57:33 +0000 Subject: [PATCH 2/5] Auto-updated version from 1.0.2 to 1.0.3 --- _version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_version.py b/_version.py index 34c1db3..77139f6 100644 --- a/_version.py +++ b/_version.py @@ -1 +1 @@ -__version__ = '1.0.2' \ No newline at end of file +__version__ = '1.0.3' \ No newline at end of file From 69ef0f659c7ca9c3ab7233e820f6846f7b3303c8 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 8 Apr 2026 20:57:43 +0000 Subject: [PATCH 3/5] Auto-updated version from 1.0.3 to 1.0.4 --- _version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_version.py b/_version.py index 77139f6..7ce86c9 100644 --- a/_version.py +++ b/_version.py @@ -1 +1 @@ -__version__ = '1.0.3' \ No newline at end of file +__version__ = '1.0.4' \ No newline at end of file From cdcf2526eadb3f4f9ddd2b0757afedd2f9411076 Mon Sep 17 00:00:00 2001 From: Emaniacinator Date: Tue, 21 Apr 2026 15:21:14 -0600 Subject: [PATCH 4/5] Made it so it supports unusual characters, minor improvements to make code more pythonic --- src/pyscripttestutils/PyScriptTestRunner.py | 10 +++++----- tests/utils/test_py_script_test_runner_coverage.py | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/pyscripttestutils/PyScriptTestRunner.py b/src/pyscripttestutils/PyScriptTestRunner.py index 45bea43..23d6ec3 100644 --- a/src/pyscripttestutils/PyScriptTestRunner.py +++ b/src/pyscripttestutils/PyScriptTestRunner.py @@ -254,7 +254,7 @@ def _call_typescript_function( request = {"method": function_name, "args": args, "mocks": mocks} result = subprocess.run( - ["node", str(self.ts_bridge_path), json.dumps(request)], + ["node", str(self.ts_bridge_path), json.dumps(request, ensure_ascii=False).encode('utf-8')], capture_output=True, text=True, cwd=str(self.package_root), @@ -306,7 +306,7 @@ def compare_results(self, py_result: Any, ts_result: Any) -> bool: if py_result != ts_result: return False - if type(py_result) != type(ts_result): + if type(py_result) is not type(ts_result): return False if isinstance(py_result, dict) and isinstance(ts_result, dict): @@ -335,7 +335,7 @@ def _compare_dicts(self, py_result: Dict[str, Any], ts_result: Dict[str, Any]) - py_value = py_result[key] ts_value = ts_result[key] - if type(py_value) != type(ts_value): + if type(py_value) is not type(ts_value): return False if isinstance(py_value, dict) and isinstance(ts_value, dict) and not self.compare_results(py_value, ts_value): @@ -380,7 +380,7 @@ def assert_strict_parity(self, py_result: Any, ts_result: Any, context: str = "" if py_result != ts_result or not self.compare_results(py_result, ts_result): error_details.append(f"Value mismatch: Python={py_result}, TypeScript={ts_result}") - if type(py_result) != type(ts_result): + if type(py_result) is not type(ts_result): error_details.append( f"Type mismatch: Python={type(py_result).__name__}, " f"TypeScript={type(ts_result).__name__}" @@ -400,7 +400,7 @@ def assert_strict_parity(self, py_result: Any, ts_result: Any, context: str = "" error_details.append(f"Fields missing in Python: {missing_in_py}") for key in py_keys & ts_keys: - if type(py_result[key]) != type(ts_result[key]): + if type(py_result[key]) is not type(ts_result[key]): error_details.append(f"Field '{key}' type mismatch: Python={type(py_result[key]).__name__}, TypeScript={type(ts_result[key]).__name__}") if len(error_details) == 0: diff --git a/tests/utils/test_py_script_test_runner_coverage.py b/tests/utils/test_py_script_test_runner_coverage.py index ce960fb..d778e56 100644 --- a/tests/utils/test_py_script_test_runner_coverage.py +++ b/tests/utils/test_py_script_test_runner_coverage.py @@ -272,7 +272,7 @@ def test_call_typescript_stderr_triggers_debug_banner(self, capsys): mock_proc = Mock( returncode=0, stderr="console.log debug info", - stdout=json.dumps({"success": True, "result": 50}), + stdout=json.dumps({"success": True, "result": 50}, ensure_ascii=False).encode('utf-8'), ) with patch(SUBPROCESS_PATH, return_value=mock_proc): result = runner._call_typescript_function("multiplyByTen", 5, {}) @@ -296,7 +296,7 @@ def test_call_typescript_success_applies_serializer_and_deserializer(self): mock_proc = Mock( returncode=0, stderr="", - stdout=json.dumps({"success": True, "result": {"value": 1, "myName": "a"}}), + stdout=json.dumps({"success": True, "result": {"value": 1, "myName": "a"}}, ensure_ascii=False).encode('utf-8'), ) with patch(SUBPROCESS_PATH, return_value=mock_proc): result = runner._call_typescript_function("createCustomClass", [1, "a"], {}) @@ -310,7 +310,7 @@ def test_call_typescript_scalar_input_wrapped_in_list(self): def fake_run(cmd, **_kwargs): captured["args"] = json.loads(cmd[2])["args"] - return Mock(returncode=0, stderr="", stdout=json.dumps({"success": True, "result": 50})) + return Mock(returncode=0, stderr="", stdout=json.dumps({"success": True, "result": 50}, ensure_ascii=False).encode('utf-8')) with patch(SUBPROCESS_PATH, side_effect=fake_run): runner._call_typescript_function("multiplyByTen", 5, {}) @@ -344,7 +344,7 @@ def test_call_typescript_ts_pack_input_wraps_list_into_single_arg(self): def fake_run(cmd, **_kwargs): captured["args"] = json.loads(cmd[2])["args"] - return Mock(returncode=0, stderr="", stdout=json.dumps({"success": True, "result": 30})) + return Mock(returncode=0, stderr="", stdout=json.dumps({"success": True, "result": 30}, ensure_ascii=False).encode('utf-8')) with patch(SUBPROCESS_PATH, side_effect=fake_run): runner._call_typescript_function("multiplyByTen", [3], {}) From 3b9de60247770131334decd68d4af3b766ecdc5c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Tue, 21 Apr 2026 21:37:58 +0000 Subject: [PATCH 5/5] Auto-updated version from 1.0.4 to 1.0.5 --- _version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_version.py b/_version.py index 7ce86c9..8412cb1 100644 --- a/_version.py +++ b/_version.py @@ -1 +1 @@ -__version__ = '1.0.4' \ No newline at end of file +__version__ = '1.0.5' \ No newline at end of file