Skip to content

py.test doesn't reimport changed modules #762

Closed
@pytestbot

Description

@pytestbot

Originally reported by: BitBucket: caryoscelus, GitHub: caryoscelus


Test case:

#!python

#module.py
def fail():
    raise Exception('fail')
#!python

#test_a.py
import module

def do_nothing():
    pass

module.fail = do_nothing

def test_nofail():
    module.fail()
#!python

#test_b.py
import module
import pytest

def test_fail():
    with pytest.raises(Exception):
        module.fail()

pytest test_b.py runs fine, but just pytest fails


Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugproblem that needs to be addressed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions