Example #1
0
    def test_month_delta(self):

        """Function:  test_month_delta

        Description:  Test month_delta function with a delta of zero.

        Arguments:

        """

        self.assertEqual(gen_libs.month_delta(datetime.datetime.strptime(
            self.date, self.date_mask), self.delta), (12, 2017))
Example #2
0
    def test_month_delta3(self):

        """Function:  test_month_delta3

        Description:  Test month_delta function for next month.

        Arguments:

        """

        self.delta = 1

        self.assertEqual(gen_libs.month_delta(datetime.datetime.strptime(
            self.date, self.date_mask), self.delta), (1, 2018))
Example #3
0
    def test_month_delta2(self):

        """Function:  test_month_delta2

        Description:  Test month_delta function for previous month.

        Arguments:

        """

        self.delta = -1

        self.assertEqual(gen_libs.month_delta(datetime.datetime.strptime(
            self.date, self.date_mask), self.delta), (11, 2017))
Example #4
0
    def test_month_delta8(self):

        """Function:  test_month_delta8

        Description:  Test month_delta function for 13 months future.

        Arguments:

        """

        self.delta = 13

        self.assertEqual(gen_libs.month_delta(datetime.datetime.strptime(
            self.date, self.date_mask), self.delta), (1, 2019))
Example #5
0
    def test_month_delta5(self):

        """Function:  test_month_delta5

        Description:  Test month_delta function for 12 months past.

        Arguments:

        """

        self.delta = -12

        self.assertEqual(gen_libs.month_delta(datetime.datetime.strptime(
            self.date, self.date_mask), self.delta), (12, 2016))