def test_usages(): """Check usages search works.""" usages = anaconda_mode.usages(''' import json json.dumps ''', 3, 10, 'test.py') assert set(['test', 'json']) <= set(usage['module'] for usage in usages)
def test_usages(): """Check usages search works.""" usages = anaconda_mode.usages( """ import json json.dumps """, 3, 10, "test.py", ) result = (usage["module-name"] for usage in usages) assert set(["test", "json"]) == set(result)