'Test conversion of Bikram Samvat date to JD and Gregorian date
(low-level routines)'

def testJDConversion(self):

    test_dates = self.test_dates
    assertEqual = self.assertEqual
    c = S3Calendar('Nepali')
    gregorian_to_jd = c._gregorian_to_jd
    jd_to_gregorian = c._jd_to_gregorian
    from_jd = c.calendar.from_jd
    to_jd = c.calendar.to_jd
    for (gdate, jd, cdate) in test_dates:
        jd_ = gregorian_to_jd(gdate[0], gdate[1], gdate[2])
        assertEqual(jd_, jd)
        cd_ = from_jd(jd_)
        assertEqual(cd_, cdate)
        jd_ = to_jd(cd_[0], cd_[1], cd_[2])
        assertEqual(jd_, jd)
        gd_ = jd_to_gregorian(jd_)
        assertEqual(gd_, gdate)
