Skip to content

Fail when working directory is not project root #9

@nicolasmatet

Description

@nicolasmatet

Example setup:

/resources
    tests.py
conftest.py

tests.py uses sqlguard fixture defined in conftest.py and emit sqlalchemy query on runtime

Steps to reproduce:

cd resources
pytest

Expected behavior:

pytest is able to run tests defined in tests.py
pytest-sqlguard is able to create a query reference file tests.queries.yaml

Observed behavior:

pytest is able to run tests defined in tests.py
BUT test fail because of pytest-sqlguard with error:

 FileNotFoundError: [Errno 2] No such file or directory: 'resources/test_consumer.queries.yaml'

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