Esempio n. 1
0
    def test__radd__string(self):
        """
        Test the addition
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('yza', 'b', 'c')

        p_added = 'yz' + p
        self.assertEqual(p_added, p_truth)
Esempio n. 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)
Esempio n. 3
0
    def test__add__ep(self):
        """
        EP + EP
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'cde')

        p_added = p + EP('de')
        self.assertEqual(p_added, p_truth)
Esempio n. 4
0
    def test__itruediv__path(self):
        """
        test EP / Path
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'd', 'e')

        p /= Path('d', 'e')
        self.assertEqual(p, p_truth)
Esempio n. 5
0
    def test__add__string(self):
        """
        Test the addition
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'cde')

        p_added = p + 'de'
        self.assertEqual(p_added, p_truth)
Esempio n. 6
0
    def test__iadd__string(self):
        """
        Test the iaddition
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'cde')

        p += 'de'
        self.assertEqual(p, p_truth)
Esempio n. 7
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)
Esempio n. 8
0
    def test__rtruediv__string(self):
        """
        Test the truedivition
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('yz', 'a', 'b', 'c')

        p_truedived = 'yz' / p
        self.assertEqual(p_truedived, p_truth)
Esempio n. 9
0
    def test__rtruediv__path(self):
        """
        test EP / Path
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('y', 'z', 'a', 'b', 'c')

        p_truedived = Path('y', 'z') // p
        self.assertEqual(p_truedived, p_truth)
Esempio n. 10
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)
Esempio n. 11
0
    def test__truediv__ep(self):
        """
        EP / EP
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'd', 'e')

        p_truedived = p / EP('d', 'e')
        self.assertEqual(p_truedived, p_truth)
Esempio n. 12
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)
Esempio n. 13
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)
Esempio n. 14
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)
Esempio n. 15
0
    def test__radd__path(self):
        """
        test EP + Path
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('yza', 'b', 'c')

        p_added = Path('yz') + p
        self.assertEqual(p_added, p_truth)
Esempio n. 16
0
    def test__rtruediv__ep(self):
        """
        EP / EP
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('y', 'z', 'a', 'b', 'c')

        p_truedived = EP('y', 'z') / p
        self.assertEqual(p_truedived, p_truth)
Esempio n. 17
0
    def test__radd__ep(self):
        """
        EP + EP
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('yza', 'b', 'c')

        p_added = EP('yz') + p
        self.assertEqual(p_added, p_truth)
Esempio n. 18
0
    def test__itruediv__string(self):
        """
        Test the itruedivition
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'c', 'de')

        p /= 'de'
        self.assertEqual(p, p_truth)
Esempio n. 19
0
    def test__iadd__path(self):
        """
        test EP + Path
        :return:
        """
        p = EP('a', 'b', 'c')
        p_truth = EP('a', 'b', 'cde')

        p += Path('de')
        self.assertEqual(p, p_truth)
Esempio n. 20
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)