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