コード例 #1
0
 def test_ge(self):
     test_month = Month(4, 2020)
     self.assertTrue(self._month >= self._month)
     self.assertTrue(self._month >= test_month)
     self.assertFalse(test_month >= self._month)
コード例 #2
0
 def setUpClass(cls):
     cls._month = Month(month=5, year=2020)
コード例 #3
0
 def test_ne(self):
     test_month = Month(6, 2020)
     self.assertFalse(self._month != self._month)
     self.assertTrue(self._month != test_month)
コード例 #4
0
 def test_le(self):
     test_month = Month(6, 2020)
     self.assertTrue(self._month <= self._month)
     self.assertTrue(self._month <= test_month)
     self.assertFalse(test_month <= self._month)
コード例 #5
0
 def test_from_summary_string(self):
     test_month = Month.from_summary_string('May 2020')
     self.assertEqual(self._month, test_month)