def test_sameMajorBothHaveMinorsOnDifferentBranches_returnsMajor(self):
        lineage = Lineage(major="4", minor="8.9")
        other = Lineage(major="4", minor="4.7.6")

        actual = lineage.mrca(other)
        expected = Lineage(major="4")

        assert actual == expected
    def test_sameMajorBothHaveMinorsOnSameBranches_returnsSecondMinor(self):
        lineage = Lineage(major="4", minor="8.7.8")
        other = Lineage(major="4", minor="8.7.6")

        actual = lineage.mrca(other)
        expected = Lineage(major="4", minor="8.7")

        assert actual == expected
    def test_sameMajorOneHasMinors_returnsMajor(self):
        lineage = Lineage(major="4", minor="8.9")
        other = Lineage(major="4")

        actual = lineage.mrca(other)
        expected = other

        assert actual == expected
    def test_sameMajorAndMinors_returnsSame(self):
        lineage = Lineage(major="4", minor="3.4.5.8")
        other = Lineage(major="4", minor="3.4.5.8")

        actual = lineage.mrca(other)
        expected = lineage

        assert actual == expected
    def test_sameMajorNoMinors_returnsMajor(self):
        lineage = Lineage(major="4")
        other = Lineage(major="4")

        actual = lineage.mrca(other)
        expected = lineage

        assert actual == expected
    def test_differentMajor_returnsNone(self):
        lineage = Lineage(major="4", minor="3.2")
        other = Lineage(major="3", minor="3.2")

        assert lineage.mrca(other) is None