Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move tests alongside code modules? #36

Closed
7yl4r opened this issue Jul 21, 2022 · 1 comment
Closed

move tests alongside code modules? #36

7yl4r opened this issue Jul 21, 2022 · 1 comment
Assignees
Labels
discussion needed open discussion. your input is needed!

Comments

@7yl4r
Copy link
Collaborator

7yl4r commented Jul 21, 2022

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?

@7yl4r 7yl4r added the discussion needed open discussion. your input is needed! label Jul 21, 2022
@ocefpaf
Copy link
Collaborator

ocefpaf commented Jul 21, 2022

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.

@7yl4r 7yl4r self-assigned this Aug 9, 2022
7yl4r added a commit to 7yl4r/pyobis that referenced this issue Aug 31, 2022
7yl4r added a commit to 7yl4r/pyobis that referenced this issue Sep 1, 2022
@7yl4r 7yl4r closed this as completed in 7d9ecba Sep 1, 2022
@7yl4r 7yl4r closed this as completed Sep 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed open discussion. your input is needed!
Projects
None yet
Development

No branches or pull requests

2 participants