def test_import_finder_matches_nested_module(line, module): fn = "show" match = seeker._imports_function(line, fn) importer = match.groups()[0] assert importer == module
def test_importer_finder_doesnt_match_substr(): line = "import Wumpus exposing (ajoinb)" fn = "join" match = seeker._imports_function(line, fn) assert match is None
def test_importer_finder(line): fn = "join" match = seeker._imports_function(line, fn) print(match.groups()) importer = match.groups()[0] assert importer == "String"