Skip to content

pytest has no documented way for the user to point it at local source files. #1937

Closed
@skylarjhdownes

Description

@skylarjhdownes

From the digging I've been doing, it seems like the way to get pytest to add your local code to sys.path is to place a conftets.py and pytests.ini file in the base directory of your project. Since I haven't been able to find a mention of this in the documentation I'm hoping a dev can shed some light on whether this is a supported feature or not, and if there's a more canonical way of doing it.

Relevant SO posts:
http://stackoverflow.com/questions/34466027/in-py-test-what-is-the-use-of-conftest-py-files
http://stackoverflow.com/questions/39499937/is-there-a-standard-way-to-tell-py-test-to-run-against-specific-code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions