Пример #1
0
    def test_coincident_horizontal_lines_are_coincident(self):
        l1 = Line(Vector([0, 1]), 1)
        l2 = Line(Vector([0, 5]), 5)

        self.assertTrue(l1.coincidentTo(l2))
Пример #2
0
    def test_non_coincident_lines_are_not_coincident(self):
        l1 = Line(Vector([1, 1]), 1)
        l2 = Line(Vector([1, 1]), 2)

        self.assertFalse(l1.coincidentTo(l2))
        self.assertFalse(l2.coincidentTo(l1))
Пример #3
0
    def test_coincident_vertical_lines_are_coincident(self):
        l1 = Line(Vector([1, 0]), 1)
        l2 = Line(Vector([5, 0]), 5)

        self.assertTrue(l1.coincidentTo(l2))
Пример #4
0
    def test_coincident_lines_are_coincident(self):
        l1 = Line(Vector([1, 1]), 1)
        l2 = Line(Vector([-3, -3]), -3)

        self.assertTrue(l1.coincidentTo(l2))
        self.assertTrue(l2.coincidentTo(l1))
Пример #5
0
    def test_coincident_horizontal_lines_are_coincident(self):
        l1 = Line(Vector([0,1]), 1)
        l2 = Line(Vector([0,5]), 5)

        self.assertTrue(l1.coincidentTo(l2))
Пример #6
0
    def test_coincident_vertical_lines_are_coincident(self):
        l1 = Line(Vector([1,0]), 1)
        l2 = Line(Vector([5,0]), 5)

        self.assertTrue(l1.coincidentTo(l2))
Пример #7
0
    def test_non_coincident_lines_are_not_coincident(self):
        l1 = Line(Vector([1,1]), 1)
        l2 = Line(Vector([1,1]), 2)

        self.assertFalse(l1.coincidentTo(l2))
        self.assertFalse(l2.coincidentTo(l1))
Пример #8
0
    def test_coincident_lines_are_coincident(self):
        l1 = Line(Vector([1,1]), 1)
        l2 = Line(Vector([-3,-3]), -3)

        self.assertTrue(l1.coincidentTo(l2))
        self.assertTrue(l2.coincidentTo(l1))