Running the testsΒΆ
Running the unit tests will probably only be of interest to other developers. There is a test module that tests interoperability with the JavaScript library (pypond/tests/interop_test.py
) that will require some additional setup.
- It will check to find the
node
executable somewhere in the path. If it is not found, those tests will fail. - The Pond source will need to be checked out at the same level “alongside” of the pypond source and then execute
npm install
followed bynpm run build
at the root level of the pond source. (Runningnpm run build
should be a formality, but is included just in case thepond/lib
directory was not properly regenerated frompond/src
) - Execute
pip install -r dev-requirements.txt
and then runnosetests
from either the source root or test directory (pypond/
orpypond/tests/
). Thepip
command will also install pypond in “develop” mode.
That particular test sends the data on a round trip by:
- generating the wire format using the Python structures
- sends it to an external script run by
node
as an arg - which reconstitutes the wire format as a JS structure
- then the JS structure is used to generate the wire format again
- wire format is returned to the calling unit test over stdout
- a new Python structure is created with the incoming wire format
- that structure is checked against the original data the first TimeSeries was created from.
All of the other tests are just standard-issue Python unit tests.
The tests can also be referred to as a fairly complete set of examples as well.