From 72cafaf58faa41415ae64bd89f6ae905313ef5ab Mon Sep 17 00:00:00 2001 From: zmsdev Date: Tue, 9 Jul 2024 20:11:02 +0200 Subject: [PATCH] assertEqual --- tests/test_standard.py | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tests/test_standard.py b/tests/test_standard.py index c1f04f0b9..d2b059d00 100644 --- a/tests/test_standard.py +++ b/tests/test_standard.py @@ -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'))