# Path: pycc/asttools/parse.py
# def parse(source, filename='<unknown>', mode='exec'):
#     """An ast.parse extension.
# 
#     This function behaves identically to the standard ast.parse except that it
#     adds parent and sibling references to each node.
#     """
#     node = ast.parse(source, filename, mode)
#     references.add_parent_references(node)
#     references.add_sibling_references(node)
# 
#     return node
# 
# Path: pycc/astwrappers/name.py
# class NameGenerator(visitortools.NodeVisitorIter, nametools.NameVisitorMixin):
# class Name(object):
#     def visit(self):
#     def __init__(self, node):
#     def node(self):
#     def declaration(self):
#     def source(self):
#     def token(self):
#     def uses(self):
#     def assignments(self):
#     def constant(self):
#     def __repr__(self):
#     def __lt__(self, other):
#     def __gt__(self, other):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __le__(self, other):
#     def __ge__(self, other):
#     def __hash__(self):


import functools
import pytest
from pycc.asttools import parse
from pycc.astwrappers import name
        'print',
        'read_with_global',
        'read_global',
        'write_with_global',
        'write_global',
        'global',
        'fake_module',
        'imported_name',
        'function_name',
        'ClassName',
        'object',
    ))
    difference = tokens.difference(expected_tokens)
    assert len(difference) == 0


def test_returns_uses(node):
    """Test that the wrapper can return all uses of a name."""
    name_wrap = functools.reduce(
        lambda p, n: n if n.token == 'reference_somewhere' else p,
        name.NameGenerator(node).visit(),
        None,
    )
    assert len(tuple(name_wrap.uses)) == 2


def test_returns_assignments(node):
    """Test that the wrapper can return all assignments of a name."""
    name_wrap = functools.reduce(
        lambda p, n: n if n.token == 'assign_multi' else p,

# Path: pycc/asttools/parse.py
# def parse(source, filename='<unknown>', mode='exec'):
#     """An ast.parse extension.
# 
#     This function behaves identically to the standard ast.parse except that it
#     adds parent and sibling references to each node.
#     """
#     node = ast.parse(source, filename, mode)
#     references.add_parent_references(node)
#     references.add_sibling_references(node)
# 
#     return node
# 
# Path: pycc/astwrappers/name.py
# class NameGenerator(visitortools.NodeVisitorIter, nametools.NameVisitorMixin):
# class Name(object):
#     def visit(self):
#     def __init__(self, node):
#     def node(self):
#     def declaration(self):
#     def source(self):
#     def token(self):
#     def uses(self):
#     def assignments(self):
#     def constant(self):
#     def __repr__(self):
#     def __lt__(self, other):
#     def __gt__(self, other):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __le__(self, other):
#     def __ge__(self, other):
#     def __hash__(self):


# Path: tests/astwrappers/test_name_wrapper.py
import functools
import pytest
from pycc.asttools import parse
from pycc.astwrappers import name

        'print',
        'read_with_global',
        'read_global',
        'write_with_global',
        'write_global',
        'global',
        'fake_module',
        'imported_name',
        'function_name',
        'ClassName',
        'object',
    ))
    difference = tokens.difference(expected_tokens)
    assert len(difference) == 0


def test_returns_uses(node):
    """Test that the wrapper can return all uses of a name."""
    name_wrap = functools.reduce(
        lambda p, n: n if n.token == 'reference_somewhere' else p,
        name.NameGenerator(node).visit(),
        None,
    )
    assert len(tuple(name_wrap.uses)) == 2


def test_returns_assignments(node):
    """Test that the wrapper can return all assignments of a name."""
    name_wrap = functools.reduce(
        lambda p, n: n if n.token == 'assign_multi' else p,

        name.NameGenerator(node).visit(),