You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm Vic. I'd like to contribute to the fplan project but I'm deathly afraid of breaking something. I think adding a unit test framework and some simple tests is a start toward building up a robust test environment where I and others will feel more comfortable making changes and having some knowledge that the wheels aren't coming off the train.
I've got experience with pytest so that's an easy place to start. I'm open to other testing frameworks but hope to keep this change simple.
I'm proposing that we create a test top level directory and that it mirrors src and looks something like this:
$ ls -R src test
src:
fplan
src/fplan:
fplan.py
test:
fplan
test/fplan:
test_load_file
test/fplan/test_load_file:
test1.toml test_load_file.py
pytest runs everything named test_*.py and *_test.py so the test source files can be simple and isolated from each other. There can be multiple directories in test/fplan for specific tests and their data. The example above contains some simple tests for the Data class load_file() function. Adding some solver tests seems like an obvious next step. Repeat as necessary until we have good coverage.
The text was updated successfully, but these errors were encountered:
Hi, I'm Vic. I'd like to contribute to the
fplan
project but I'm deathly afraid of breaking something. I think adding a unit test framework and some simple tests is a start toward building up a robust test environment where I and others will feel more comfortable making changes and having some knowledge that the wheels aren't coming off the train.I've got experience with
pytest
so that's an easy place to start. I'm open to other testing frameworks but hope to keep this change simple.I'm proposing that we create a
test
top level directory and that it mirrorssrc
and looks something like this:pytest
runs everything namedtest_*.py
and*_test.py
so the test source files can be simple and isolated from each other. There can be multiple directories intest/fplan
for specific tests and their data. The example above contains some simple tests for theData
classload_file()
function. Adding some solver tests seems like an obvious next step. Repeat as necessary until we have good coverage.The text was updated successfully, but these errors were encountered: