Skip to content

[Bug]: [Low Priority] Cannot run tests from a test's local folder. conftest is not found. #1120

@afourney

Description

@afourney

Describe the bug

Prior to #1110, it was possible to run the tests from a test's local directory. E.g.

cd autogen/test/agentchat/contrib
python test_compressible_agent.py

or

cd autogen/test/agentchat/contrib
pytest test_compressible_agent.py

But now, doing so raises the error:

ModuleNotFoundError: No module named 'conftest'

Now, tests need to be run from the test root folder:

cd autogen/test
pytest agentchat/contrib/test_compressible_agent.py

This isn't a real problem, but it is a change in prior behavior, and it took me a minute to understand what was going on despite considerable prior experience with the tests.

Steps to reproduce

No response

Expected Behavior

No response

Screenshots and logs

No response

Additional Information

No response

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