Skip to content

Possible to just run pytest on open buffer without modifying is_test_file? #85

@dseravalli

Description

@dseravalli

If I have a python file like foo.py that does not end or start with test_ but contains test methods that start with test_, is there a way to just run pytest on the current buffer, like what !pytest "%" would do basically, but via Neotest. I understand I could provide my own is_test_file function that scans python files for test_ method but wondering if there is a way to force Neotest to consider the active buffer a test file and just run pytest on it on an as-needed basis.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions