Пример #1
0
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)
Пример #2
0
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)
Пример #3
0
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)