zhan7236 opened a new pull request, #2953:
URL: https://github.com/apache/fory/pull/2953
## Why?
On Windows 11 PowerShell, the escaped double quotes `\"pyfory\"` in the
Python command get processed and removed, causing Python to receive `pyfory` as
a variable name instead of the string `"pyfory"`. This results in a `NameError`:
```
NameError: name 'pyfory' is not defined
```
Since Python syntax errors and "pyfory found" both produce the same non-zero
exit code, the test incorrectly proceeds instead of being skipped when `pyfory`
is not installed.
## What does this PR do?
Replace escaped double quotes `\"pyfory\"` with single quotes `'pyfory'` in
the Python command within `verifyPyforyInstalled()` method. Single quotes work
correctly on both Windows and Unix systems.
**Changes:**
- Modified
`java/fory-test-core/src/main/java/org/apache/fory/test/TestUtils.java`
- Changed `find_spec(\"pyfory\")` to `find_spec('pyfory')`
## Related issues
Fixes #2833
## Does this PR introduce any user-facing change?
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
No user-facing changes. This is an internal test utility fix.
## Benchmark
Not applicable. This change does not affect performance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]