this post was submitted on 24 Jul 2023
15 points (100.0% liked)

Python

6347 readers
12 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

πŸ“… Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
πŸ’“ Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS
 

Where do your unit tests live? Does is vary, depending on project size? Do you like a flat structure, with test files living alongside everything else? Are you a nested folders person?

I'm curious the practice of others, because I still don't feel like I've found a testing directory structure that satisfies me.

you are viewing a single comment's thread
view the rest of the comments
[–] CodeBlooded@programming.dev 3 points 1 year ago* (last edited 1 year ago)

My projects are usually laid out like this at work:

src/
  β€” module_1/
    β€” some_file.py
test/
  β€” module_1/
    β€” some_file_test.py