Skip to content

pytest --pdb is no longer working with Flask_testing #1932

Closed
@tricosmo

Description

@tricosmo

Hi All

Recently we have problem to run "pytest --pdb" with our flask testcases. The testcases were fine until this change(4eeb475). The case is when we add --pdb option all the case failed with the same reason. "self.app is None", but if no "--pdb" then all tests pass.

By debugging, we found that this pre_setup function
https://github.com/jarus/flask-testing/blob/master/flask_testing/utils.py#L102 is called to setup _self.app.
But since the change, it calls the debug function instead of the Testcase which will skip the whole pre_setup function.

I tried to customise our own debug function to call pre_setup, but failed with further issues(request mocker). So I am wondering if I am doing right, or this is an issue I can address with flask_testing.

For now we just use previous version(3.0.1) of pytest, but we like to be as close as possible to the latest. Any advise will be appreciated. Thanks

Niansheng

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: criticalgrave problem or usability issue that affects lots of userstype: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions