コード例 #1
0
ファイル: test_optional.py プロジェクト: zaltoprofen/sacred
def test_optional_import():
    has_pytest, pyt = optional_import('pytest')
    assert has_pytest
    assert pyt == pytest
コード例 #2
0
ファイル: test_optional.py プロジェクト: zaltoprofen/sacred
def test_optional_import_nonexisting():
    has_nonex, nonex = optional_import('clearlynonexistingpackage')
    assert not has_nonex
    assert nonex is None