示例#1
0
def test_import_attribute_import_error():
    with pytest.raises((ImportError, AttributeError)):
        helpers.import_attribute('tabulator.bad_name')
def test_import_attribute():
    assert helpers.import_attribute('tabulator.helpers') == helpers
示例#3
0
def test_import_attribute():
    assert helpers.import_attribute('tabulator.helpers') == helpers
def test_import_attribute_import_error():
    with pytest.raises((ImportError, AttributeError)):
        helpers.import_attribute('tabulator.bad_name')