Beispiel #1
0
    def test_overlaps_doctest(self):
        record1 = BinaryRecord(0, None, b'abc')
        record2 = BinaryRecord(1, None, b'def')
        assert record1.overlaps(record2)

        record1 = BinaryRecord(0, None, b'abc')
        record2 = BinaryRecord(3, None, b'def')
        assert not record1.overlaps(record2)
Beispiel #2
0
    def test_overlaps(self):
        record1 = BinaryRecord(0, None, b'abc')
        record1.address = None
        record2 = BinaryRecord(3, None, b'def')
        assert not record1.overlaps(record2)

        record1 = BinaryRecord(0, None, b'abc')
        record2 = BinaryRecord(3, None, b'def')
        record2.address = None
        assert not record1.overlaps(record2)