Organization of Python tests

I’m not completely happy with the organization of the Python tests. is to big, the flat structure of the tests doesn’t mirror the rest of the code which makes it harder to navigate, and it seems wrong for the tests to be in the main code directory. I suggest the following new organization:

  hail/ - the main Python source
  test/ - test file for hail module, or
    test_hail/ - test file for hail.stats module

The tests for module a.b.c will be in test/test_a/test_b/ You can have and a test_hail directory if you need to test hail submodules. I’m also open to having it be in test/a/b/

Each file should have a single class Test(unittest.TestCase) .

Is there a technical reason why we have to prefix the files in test with test_?

pytest won’t run it otherwise, I think :confused:

unless we decorate them instead, or something

ah, the files. I think by convention.

I’ll take a stab at this.

I’d guess there are some potential annoyances in having files with the same name, only disambiguated by path.

doing this is pretty horrible. I think I’m halfway done though.