Changes between Version 14 and Version 15 of pyrunner
- Timestamp:
- 12/18/23 12:35:45 (16 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pyrunner
v14 v15 40 40 The PythonVenv will run completely in its own venv. The zip file is installed with {{{pip}}} and thus respects all the setup including pip installing dependencies (which may be downloaded from the web). 41 41 42 ==== results 43 To determine the result(s), stdin and stderr are collected and checked. 44 * If the deadline is exceeded, an InterruptedException is thrown 45 * If there is content in stderr, the result is a PythonError containing the stderr message. 46 * otherwise, the call was a success and the value in stdin is returned. This will normally contain all the text that was printed to stdout in python. Your program can decide then what to do with that. 47 42 48 === Running python unit tests 43 49 PythonVenv also has support to run unit tests with discovery. … … 60 66 When using a zipped python resource you can not use python unittest directly (using {{{python -m unittest discover}}}) because the pip install procedure will remove all the {{{__init__.py}}} files that are essential for discover. 61 67 }}} 68 69 ==== results 70 When a test is run, the stdin and stderr are used to collect the test results. Therefore any message to stderr will be interpreted as a test failure. When the python program finishes, it wraps the collected python TestResult in a json-stringified object which is then sent to stdout, which is then collected on the java side and converted into a java Testresult. 71 72 {{{#!td style="background: #fee" 73 Your tests should NOT write to stdout, as this will mess up the TestResult 74 }}} 75 76 77 78