# Path: snakeguice/annotation.py
# class Annotation(object):
#     """Base class for all annotations."""
# 
#     def __init__(self, value):
#         self._value = str(value)
# 
#     def __hash__(self):
#         return hash(self.__class__.__name__ + ":" + self._value)
# 
#     def __eq__(self, other):
#         return self.__hash__() == other.__hash__()
# 
#     def __ne__(self, other):
#         return not self == other


from snakeguice.annotation import Annotation
    def setup_class(cls):
        cls.annotation0 = Annotation('value here')
        cls.annotation1 = Annotation('value here')

    def test_hash_the_same(self):
        assert hash(self.annotation0) == hash(self.annotation1)

    def test_should_be_equal(self):
        assert self.annotation0 == self.annotation1


class test_Annotations_without_equal_values(object):

    @classmethod
    def setup_class(cls):
        cls.annotation0 = Annotation('value here0')
        cls.annotation1 = Annotation('value here1')

    def test_should_hash_differently(self):
        assert hash(self.annotation0) != hash(self.annotation1)

    def test_should_not_be_equal(self):
        assert self.annotation0 != self.annotation1


class test_comparing_different_Annotation_subclasses(
        test_Annotations_without_equal_values):

    @classmethod
    def setup_class(cls):

# Path: snakeguice/annotation.py
# class Annotation(object):
#     """Base class for all annotations."""
# 
#     def __init__(self, value):
#         self._value = str(value)
# 
#     def __hash__(self):
#         return hash(self.__class__.__name__ + ":" + self._value)
# 
#     def __eq__(self, other):
#         return self.__hash__() == other.__hash__()
# 
#     def __ne__(self, other):
#         return not self == other


# Path: tests/test_annotation.py
from snakeguice.annotation import Annotation

    def setup_class(cls):
        cls.annotation0 = Annotation('value here')
        cls.annotation1 = Annotation('value here')

    def test_hash_the_same(self):
        assert hash(self.annotation0) == hash(self.annotation1)

    def test_should_be_equal(self):
        assert self.annotation0 == self.annotation1


class test_Annotations_without_equal_values(object):

    @classmethod
    def setup_class(cls):
        cls.annotation0 = Annotation('value here0')
        cls.annotation1 = Annotation('value here1')

    def test_should_hash_differently(self):
        assert hash(self.annotation0) != hash(self.annotation1)

    def test_should_not_be_equal(self):
        assert self.annotation0 != self.annotation1


class test_comparing_different_Annotation_subclasses(
        test_Annotations_without_equal_values):

    @classmethod
    def setup_class(cls):

        class Annotation0(Annotation): pass