Open mrosemeier opened 8 years ago
in the old FUSED-Wind we had all tests in a test directory in the top primarily because the old OpenMDAO plugin test
command didn't allow for tests to be in sub-directories. Now I started adding tests to the turbine sub-directory, since it made good sense to keep things local to each part of FUSED-Wind. Pierre and I agree that we prefer to keep it this way rather than one single test directory. I agree with you that tests should refer to the filename the class is in. so you're welcome to make this renaming if you want.
accessing test data from other places in the distribution could be done this way:
PATH = pkg_resources.resource_filename('fusedwind', 'path', 'to', 'data')
In the examples directory I've added duplicate data since I was lazy, so that could be removed and replaced with the above...we'll add it to the todo list.
One remark on the test files: What do you think about having a proper test file naming convention so that a test file contains all tests for a respective python file, i.e.
test_structure.py
contains all the tests for the methods instructure.py
?Another option would be to have only one top test folder, so that we don't have to copy paste the test data around. Then, we could go for a naming convention like:
test_turbine_structure.py
ortest_turbine_layup.py
.