Esempio n. 1
0
def test_module_is_imported_uses_caller_globals_by_default():
    assert module_is_imported('pytest')
    assert not module_is_imported('pkgutil')
    assert not module_is_imported('does_not_even_exist')
Esempio n. 2
0
def test_module_is_imported():
    globs = globals()
    assert module_is_imported('pytest', scope=globs)
    assert not module_is_imported('pkgutil', scope=globs)
    assert not module_is_imported('does_not_even_exist', scope=globs)
Esempio n. 3
0
def test_module_is_imported():
    globs = globals()
    assert module_is_imported('pytest', scope=globs)
    assert not module_is_imported('pkgutil', scope=globs)
    assert not module_is_imported('does_not_even_exist', scope=globs)
Esempio n. 4
0
def test_module_is_imported_uses_caller_globals_by_default():
    assert module_is_imported('pytest')
    assert not module_is_imported('pkgutil')
    assert not module_is_imported('does_not_even_exist')
Esempio n. 5
0
def test_module_is_imported():
    globs = globals()
    assert module_is_imported("pytest", scope=globs)
    assert not module_is_imported("pkgutil", scope=globs)
    assert not module_is_imported("does_not_even_exist", scope=globs)