Repository: boto/boto3
File: tests/unit/dynamodb/test_conditions.py (Python)

Code before:
        self.assertEqual(
            self.attr.gt(self.value), GreaterThan(self.attr, self.value))

    def test_gte(self):
        self.assertEqual(
            self.attr.gte(self.value),
            GreaterThanEquals(self.attr, self.value))

    def test_begins_with(self):
        self.assertEqual(self.attr.begins_with(self.value),
                         BeginsWith(self.attr, self.value))

    def test_between(self):
        self.assertEqual(self.attr.between(self.value, self.value2),
                         Between(self.attr, self.value, self.value2))

    def test_attribute_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        self.assertIsNot(self.attr, attr_copy)
        self.assertEqual(self.attr, attr_copy)
        
    def test_eq_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.eq(self.value)
        comp2 = attr_copy.eq(self.value)
        self.assertEqual(comp, comp2)

    def test_lt_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.lt(self.value)
        comp2 = attr_copy.lt(self.value)
        self.assertEqual(comp, comp2)

    def test_lte_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.lte(self.value)
        comp2 = attr_copy.lte(self.value)
        self.assertEqual(comp, comp2)

    def test_gt_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.gt(self.value)
        comp2 = attr_copy.gt(self.value)
        self.assertEqual(comp, comp2)

    def test_gte_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.gte(self.value)
        comp2 = attr_copy.gte(self.value)
        self.assertEqual(comp, comp2)


Review comment (suggestion):
I realize we do not do this in the previous tests that we have for attributes and condition expressions, but would it be possible to test the not equal side as well? So something like:
```python
    def test_eq_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        self.assertEqual(attr.eq(self.value), attr_copy.eq(self.value))
        self.assertNotEqual(attr.eq(self.value), attr_copy.eq(self.value2))
```
That would give us a little more confidence about the functionality.

Code after:
        self.assertEqual(
            self.attr.gt(self.value), GreaterThan(self.attr, self.value))

    def test_gte(self):
        self.assertEqual(
            self.attr.gte(self.value),
            GreaterThanEquals(self.attr, self.value))

    def test_begins_with(self):
        self.assertEqual(self.attr.begins_with(self.value),
                         BeginsWith(self.attr, self.value))

    def test_between(self):
        self.assertEqual(self.attr.between(self.value, self.value2),
                         Between(self.attr, self.value, self.value2))

    def test_attribute_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        self.assertIsNot(self.attr, attr_copy)
        self.assertEqual(self.attr, attr_copy)

    def test_eq_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.eq(self.value)
        comp2 = attr_copy.eq(self.value)
        self.assertEqual(comp, comp2)

    def test_eq_inequality(self):
        attr_copy = copy.deepcopy(self.attr)
        self.assertNotEqual(self.attr.eq(self.value),
                            attr_copy.eq(self.value2))

    def test_lt_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.lt(self.value)
        comp2 = attr_copy.lt(self.value)
        self.assertEqual(comp, comp2)

    def test_lte_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.lte(self.value)
        comp2 = attr_copy.lte(self.value)
        self.assertEqual(comp, comp2)

    def test_gt_equality(self):
        attr_copy = copy.deepcopy(self.attr)
        comp = self.attr.gt(self.value)
        comp2 = attr_copy.gt(self.value)
        self.assertEqual(comp, comp2)

    def test_gte_equality(self):