92f10f2c34
So this was quite a journey: - We want relative depdendencies (using the `path` argument) whenever developing locally. Otherwise we would have to install each dependency every time we change a single character, which undoubtedly would cause us to waste time trying to debug an issue just because we forgot to install. - When publishing however we want to rely on the version number, since the repo context gets lost upon publishing, and path dependencies cause failures. The solution then it seems is to use `dev-dependencies` (not that surprising once you find it) with relative paths, so that `poetry install` uses these over the normal dependencies (no idea how they dedup them) and use `dependencies` when publishing. The paths are still in there when publishing, but `pip install` ignores them. I checked that `poetry install` from an unrelated project doesn't accidentally use the path dependencies, even when adding them as dev-dependencies. This should hopefully also allow installing them as a repo link, though I can't test that right now. |
||
---|---|---|
.. | ||
pyln/testing | ||
tests | ||
.gitignore | ||
Makefile | ||
pyproject.toml | ||
README.md |
pyln-testing: A library to write tests against Core Lightning
This library implements a number of utilities that help building tests for Core Lightning nodes. In particular it provides a number of pytest fixtures that allow the management of a test network of a given topology and then execute a test scenarion.
pyln-testing
is used by Core Lightning for its internal tests, and by the
community plugin directory to exercise the plugins.
Installation
pyln-testing
is available on pip
:
pip install pyln-testing
Alternatively you can also install the development version to get access to currently unreleased features by checking out the Core Lightning source code and installing into your python3 environment:
git clone https://github.com/ElementsProject/lightning.git
cd lightning/contrib/pyln-testing
python3 setup.py develop
This will add links to the library into your environment so changing the checked out source code will also result in the environment picking up these changes. Notice however that unreleased versions may change API without warning, so test thoroughly with the released version.