[Python] VSCode - python unit test locations

Discussão em 'Python' iniciado por Stack, Novembro 30, 2024.

  1. Stack

    Stack Membro Participativo

    I have a large python project - it contains multiple parts, and a number of local "modules" that I put in modules directory.

    For each local module, I want to create a set of UNIT TESTs.

    I specifically do not want ALL unit tests for the entire project in one flat directory. Instead, I would like to have them split across a few sub directories.

    In ascii - I have this:

    +-- src <-- Main application source code
    +-- Modules
    + module1
    + module2
    + unit-tests <-- This is the problem directory.
    + mod1-tests <-- Module 1 Tests.
    + mod2-tests <-- Module 2 Tests.
    + tracking-test <-- Testing for the tracking feature
    + tlm-tests <-- Testing for the telemetry module


    The problem is - VSCODE - Unit Test - will ONLY allow me to choose 1 test directory, a top most directory, in my case 'unit-tests' has the Tests organized by subject area. My question is: How can make this scan recursively and/or organize the tests rather then a giant directory with hundreds of tests (it makes it hard to find things)

    Continue reading...

Compartilhe esta Página