Changes between Version 10 and Version 11 of pyrunner
- Timestamp:
- 12/04/23 11:56:11 (17 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
pyrunner
v10 v11 27 27 === Usage 28 28 The PythonVenv usage is roughly like this: 29 * create a PythonVenv E, possibly already with the targz code you want to run 29 * create a PythonVenv E, possibly already with the targz code you want to run. You can use the usual {{{python3 setup.py sdist}}}, or another mechanism such as the java2python compiler. 30 30 * Pass your targz directly into the PythonVenv constructor 31 31 * or if you dont have a targz, copy the code into E. … … 36 36 === Running python unit tests 37 37 PythonVenv also has support to run unit tests with discovery. 38 Your java code is assumed to have ...Test.java files that are compiled into your PythonVenv, eg using java2python like this38 Your java code is assumed to have ...Test.java files that are compiled into your zip file, If you use java2python, you can keep the src and test java code separate and use something like 39 39 {{{ 40 40 PyProgram tests = PyProgram.fromDirectories(Arrays.asList(src, test)); 41 41 }}} 42 42 43 43 44 The src and test dir can have overlapping modules as usual in java (eg, you have {{{geniuswebsrc/issuevalue/Bid.java}}} and a matching {{{geniuswebtest/issuevalue/BidTest.java}}}. This results in the tests in the same directory in the compiled code, while being separate in the sources. Having it all in a single zip file allows for all dependencies, both for the code and for the testing, to be installed in one go.