Skip to content

Commit

Permalink
assertEqual
Browse files Browse the repository at this point in the history
  • Loading branch information
zmsdev committed Jul 9, 2024
1 parent 76bbc69 commit 72cafaf
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/test_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,26 +102,26 @@ def test_httpimport(self):

def test_date_api(self):
from DateTime.DateTime import DateTime
self.assertEquals(35, standard.daysBetween((2024,1,1,12,0,0,0,0,0), (2024,2,5,12,0,0,0,0,0)))
self.assertEquals(0, standard.daysBetween((2024,1,1,12,0,0,0,0,0), (2024,1,1,12,0,0,0,0,0)))
self.assertEquals(-50, standard.daysBetween((2024,1,1,12,0,0,0,0,0), (2023,11,12,12,0,0,0,0,0)))
self.assertEquals(1, standard.compareDate((2024,1,1,12,0,0,0,0,0), (2024,2,5,12,0,0,0,0,0)))
self.assertEquals(0, standard.compareDate((2024,1,1,12,0,0,0,0,0), (2024,1,1,12,0,0,0,0,0)))
self.assertEquals(-1, standard.compareDate((2024,1,1,12,0,0,0,0,0), (2023,11,12,12,0,0,0,0,0)))
self.assertEqual(35, standard.daysBetween((2024,1,1,12,0,0,0,0,0), (2024,2,5,12,0,0,0,0,0)))
self.assertEqual(0, standard.daysBetween((2024,1,1,12,0,0,0,0,0), (2024,1,1,12,0,0,0,0,0)))
self.assertEqual(-50, standard.daysBetween((2024,1,1,12,0,0,0,0,0), (2023,11,12,12,0,0,0,0,0)))
self.assertEqual(1, standard.compareDate((2024,1,1,12,0,0,0,0,0), (2024,2,5,12,0,0,0,0,0)))
self.assertEqual(0, standard.compareDate((2024,1,1,12,0,0,0,0,0), (2024,1,1,12,0,0,0,0,0)))
self.assertEqual(-1, standard.compareDate((2024,1,1,12,0,0,0,0,0), (2023,11,12,12,0,0,0,0,0)))

def test_operator_api(self):
self.assertEquals(int, standard.operator_gettype(1))
self.assertEquals(str, standard.operator_gettype('foo'))
self.assertEquals(str, standard.operator_gettype(u'foo'))
self.assertEqual(int, standard.operator_gettype(1))
self.assertEqual(str, standard.operator_gettype('foo'))
self.assertEqual(str, standard.operator_gettype(u'foo'))
d = {'john':'doe'}
self.assertFalse('foo' in d)
self.assertIsNone(d.get('foo'))
standard.operator_setitem(d, 'foo', 'bar')
self.assertTrue('foo' in d)
self.assertEquals('bar', d.get('foo'))
self.assertEquals('bar', standard.operator_getitem(d, 'foo'))
self.assertEquals('bar', standard.operator_getitem(d, 'Foo'))
self.assertEquals('bar', standard.operator_getitem(d, 'FOO'))
self.assertEqual('bar', d.get('foo'))
self.assertEqual('bar', standard.operator_getitem(d, 'foo'))
self.assertEqual('bar', standard.operator_getitem(d, 'Foo'))
self.assertEqual('bar', standard.operator_getitem(d, 'FOO'))
standard.operator_delitem(d, 'foo')
self.assertFalse('foo' in d)
self.assertIsNone(d.get('foo'))
Expand Down

0 comments on commit 72cafaf

Please sign in to comment.