예제 #1
0
    def test_add_path(self):
        """
        test EP + Path
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'cde')

        p.add(Path('de'))
        self.assertEqual(p, p_truth)
예제 #2
0
    def test_add_ep(self):
        """
        EP + EP
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'cde')

        p.add(EP('de'))
        self.assertEqual(p, p_truth)
예제 #3
0
    def test_extend_ep(self):
        """
        EP / EP
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'd', 'e', 'f', 'g')

        p.extend([EP('d', 'e'), EP('f')], EP('g'))
        self.assertEqual(p, p_truth)
예제 #4
0
    def test_add_string(self):
        """
        Test the iaddition
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'cde')

        p.add('de')
        self.assertEqual(p, p_truth)
예제 #5
0
    def test_extend_path(self):
        """
        test EP / Path
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'd', 'e', 'f', 'g')

        p.extend(Path('d', 'e'), Path('f', 'g'))
        self.assertEqual(p, p_truth)
예제 #6
0
    def test_extend_string(self):
        """
        Test the itruedivition
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'd', 'e')

        p.extend(['d', 'e'])
        self.assertEqual(p, p_truth)
예제 #7
0
    def test_append_ep(self):
        """
        EP / EP
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'd', 'e')

        p.append(EP('d', 'e'))
        self.assertEqual(p, p_truth)
예제 #8
0
    def test_append_path(self):
        """
        test EP / Path
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'd', 'e')

        p.append(Path('d', 'e'))
        self.assertEqual(p, p_truth)
예제 #9
0
    def test_append_string(self):
        """
        Test the itruedivition
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'de')

        p.append('de')
        self.assertEqual(p, p_truth)