Changes between Version 14 and Version 15 of pyrunner


Ignore:
Timestamp:
12/18/23 12:35:45 (16 months ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pyrunner

    v14 v15  
    4040The 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).
    4141
     42==== results
     43To 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
    4248=== Running python unit tests
    4349PythonVenv also has support to run unit tests with discovery.
     
    6066When 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.
    6167}}}
     68
     69==== results
     70When 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"
     73Your tests should NOT write to stdout, as this will mess up the TestResult
     74}}}
     75
     76
     77
     78