# Path: pycc/asttools/references.py
# def add_parent_references(node):
# def add_sibling_references(node):
# def copy_location(new_node, old_node):
# def get_top_node(node):


import ast
import pytest
from pycc.asttools import references
"""Test suite for asttools.references."""

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals





@pytest.fixture
def node():
    """Get an ast.Assign node of 'x = 1'."""
    return ast.Assign(
        targets=[ast.Name(id='x', ctx=ast.Store())],
        value=ast.Num(n=1)
    )


def test_parent_references(node):
    """Test that parent references are added to child nodes."""

# Path: pycc/asttools/references.py
# def add_parent_references(node):
# def add_sibling_references(node):
# def copy_location(new_node, old_node):
# def get_top_node(node):


# Path: tests/asttools/test_references.py
import ast
import pytest
from pycc.asttools import references

"""Test suite for asttools.references."""

from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals





@pytest.fixture
def node():
    """Get an ast.Assign node of 'x = 1'."""
    return ast.Assign(
        targets=[ast.Name(id='x', ctx=ast.Store())],
        value=ast.Num(n=1)
    )


def test_parent_references(node):
    """Test that parent references are added to child nodes."""

    references.add_parent_references(node)