Project Directory Structure Best Practices | Generated by AI

Home 2025.08

Good question.

The general convention is:

So if you’re adding a new test file, it should normally go under tests/llm/, not scripts/.

For example:

scripts/
  llm/
    main.py
    utils.py
tests/
  llm/
    test_main.py
    test_utils.py

That way, your tests are separate from your implementation, and tools like pytest can easily discover them.

👉 You can now add something like:

# tests/llm/test_basic.py
import pytest
from scripts.llm import utils

def test_addition():
    assert utils.add(2, 3) == 5

Then run:

pytest tests/llm/

Would you like me to also show you how to set up a conftest.py so you can share fixtures across your tests/llm/ files?


Back Donate