iobis / pyobis

OBIS Python client

Home Page:https://iobis.github.io/pyobis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

move tests alongside code modules?

7yl4r opened this issue · comments

commented

This is a matter of preference, but I prefer to have the test code in the same directories as the module code. Would it be okay with everyone to move the tests alongside the code instead of in a /test/ directory? Here is a demonstration of the options:

  1. tests separate
    .
    ├── /pyobis/
    │   ├── occurrences
    │   │   └── occurrences.py
    │   ├── obisutils.py
    └── tests
        ├── test_occurrence.py
        └── test_obisutils.py
    
  2. tests alongside
    .
    ├── /pyobis/
        ├── occurrences
        │   ├── occurrences.py
        │   └── occurrences_test.py
        ├── obisutils.py
        └── obisutils_test.py
    

I prefer (2). What do ya'll think?

I don't have a strong preference. Usually, for compiled code, I do prefer open (2)*. For non-compiled code I OK with both (1) or (2).

* IMO compiled code must ship the tests with the code so it can be tested in the end user machine. Option (2) makes that easier.