Beispiel #1
0
def test_tracer_uninstall(fakesys):
    """
    Tracer's install method will uninstall itself as well.
    """
    t = Tracer()
    t.install()
    t.uninstall()
    assert fakesys.tracer is None
def test_tracer_uninstall(fakesys):
    """
    Tracer's install method will uninstall itself as well.
    """
    t = Tracer()
    t.install()
    t.uninstall()
    assert fakesys.tracer is None
Beispiel #3
0
def test_tracer_uninstall_with_other_hook_previously_installed(fakesys):
    """
    If another profile hook was installed before the Tracer was installed, then
    the profile hook will be restored to that profile hook.
    """
    t = Tracer()
    fakesys.tracer = sentinel = object()
    t.install()
    t.uninstall()
    assert fakesys.tracer is sentinel
Beispiel #4
0
def test_tracer_uninstall_with_other_hook(fakesys):
    """
    If another profile hook was installed after the Tracer was installed, then
    the profile hook will remain unchanged.
    """
    t = Tracer()
    t.install()
    fakesys.tracer = sentinel = object()
    t.uninstall()
    assert fakesys.tracer is sentinel
def test_tracer_uninstall_with_other_hook_previously_installed(fakesys):
    """
    If another profile hook was installed before the Tracer was installed, then
    the profile hook will be restored to that profile hook.
    """
    t = Tracer()
    fakesys.tracer = sentinel = object()
    t.install()
    t.uninstall()
    assert fakesys.tracer is sentinel
def test_tracer_uninstall_with_other_hook(fakesys):
    """
    If another profile hook was installed after the Tracer was installed, then
    the profile hook will remain unchanged.
    """
    t = Tracer()
    t.install()
    fakesys.tracer = sentinel = object()
    t.uninstall()
    assert fakesys.tracer is sentinel