Commit graph

3 commits

Author SHA1 Message Date
Candice Bentéjac
98fbfae013 [tests] Plugins: Add a sleep between file rewrites
On some systems such as GitHub's Windows CI, the `write` operation
is too fast and does not cause a change in the timestamp of the
file we're reloading, hence causing the test to fail for external
reasons.

Adding a sleep does not change anything to the test functionally, but
on the contrary ensures that we are actually testing the feature.

https://stackoverflow.com/questions/19059877/python-os-path-getmtime-time-not-changing
2025-06-05 16:54:03 +02:00
Candice Bentéjac
3c57afb4d0 [tests] Simplify registration/unregistration of nodes in tests
Add two methods that are local to tests, `registerNodeDesc` and
`unregisterNodeDesc`, which handle the registration and unregistration
of `NodePlugins` from a node description. This reduces the amount of
code in tests whenever `NodePlugin` need to be instantiated prior
to their registration and so on.
2025-06-05 14:40:14 +02:00
Candice Bentéjac
aa4d9ad92b [tests] Add initial set of unit tests for plugins
Tests cover loading/unloading plugins, registering/unregistering
node plugins, and reloading them.
2025-06-05 14:40:13 +02:00