Skip to content
ParticleDB

Test Particles

Save the function from your first Particle as tools.py, then run this alongside it:

from tools import priority
assert abs(priority(0.9, 0.8) - 0.72) < 1e-10
assert priority(0.0, 1.0) == 0.0

Load the module in a disposable server, then run:

SELECT priority(0.9, 0.8) AS score;
SELECT priority(NULL, 0.8) AS missing_score;

Check that the first result is approximately 0.72 and the second is NULL.

Include boundary values, invalid types, dependency failures and realistic input sizes. Check the client’s error handling as well as successful output.

Restart with the same configuration and data directory. Call the function again. This confirms that your selected loading or deployment method matches how the application will run.

Documentation home · Troubleshooting