mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-06-26 10:54:28 +02:00
Replace assertEquals
with assertEqual
- #259 Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
7fa7ca5f04
commit
9dd8257cc0
7 changed files with 15 additions and 15 deletions
|
@ -175,7 +175,7 @@ class TestAnnotate(TestCase):
|
|||
|
||||
j = self.t.export()
|
||||
|
||||
self.assertEquals(len(j), 1)
|
||||
self.assertEqual(len(j), 1)
|
||||
self.assertClosedInterval(j[0], expectedAnnotation="foo")
|
||||
|
||||
def test_annotate_with_embedded_quotes(self):
|
||||
|
@ -188,7 +188,7 @@ class TestAnnotate(TestCase):
|
|||
|
||||
j = self.t.export()
|
||||
|
||||
self.assertEquals(len(j), 1)
|
||||
self.assertEqual(len(j), 1)
|
||||
self.assertClosedInterval(j[0], expectedAnnotation='bar "foo" bar')
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -58,7 +58,7 @@ class TestClock(TestCase):
|
|||
|
||||
j = self.t.export()
|
||||
|
||||
self.assertEquals(len(j), 1)
|
||||
self.assertEqual(len(j), 1)
|
||||
self.assertOpenInterval(j[0], expectedTags=["tag1", "tag2"])
|
||||
|
||||
def test_start_stop(self):
|
||||
|
@ -74,7 +74,7 @@ class TestClock(TestCase):
|
|||
|
||||
j = self.t.export()
|
||||
|
||||
self.assertEquals(len(j), 1)
|
||||
self.assertEqual(len(j), 1)
|
||||
self.assertClosedInterval(j[0], expectedTags=["tag1", "tag2"])
|
||||
|
||||
code, out, err = self.t.runError("")
|
||||
|
@ -94,7 +94,7 @@ class TestClock(TestCase):
|
|||
|
||||
j = self.t.export()
|
||||
|
||||
self.assertEquals(len(j), 2)
|
||||
self.assertEqual(len(j), 2)
|
||||
self.assertClosedInterval(j[0], expectedTags=["tag1", "tag2"])
|
||||
self.assertOpenInterval(j[1], expectedTags=["tag3"])
|
||||
|
||||
|
|
|
@ -50,13 +50,13 @@ class TestHelp(TestCase):
|
|||
"""timew --help should print usage"""
|
||||
code, out1, err1 = self.t("help")
|
||||
code, out2, err2 = self.t("--help")
|
||||
self.assertEquals(out1, out2)
|
||||
self.assertEqual(out1, out2)
|
||||
|
||||
def test_help_short_option_should_print_usage(self):
|
||||
"""timew -h should print usage"""
|
||||
code, out1, err1 = self.t("help")
|
||||
code, out2, err2 = self.t("-h")
|
||||
self.assertEquals(out1, out2)
|
||||
self.assertEqual(out1, out2)
|
||||
|
||||
def test_help_with_command_should_show_man_page(self):
|
||||
"""timew help with command should show man page"""
|
||||
|
@ -75,13 +75,13 @@ class TestHelp(TestCase):
|
|||
"""timew command with --help should show help page"""
|
||||
code, out1, err1 = self.t("help track")
|
||||
code, out2, err2 = self.t("track --help")
|
||||
self.assertEquals(out1, out2)
|
||||
self.assertEqual(out1, out2)
|
||||
|
||||
def test_command_with_help_short_option_should_show_help_page(self):
|
||||
"""timew command with -h should show help page"""
|
||||
code, out1, err1 = self.t("help track")
|
||||
code, out2, err2 = self.t("track -h")
|
||||
self.assertEquals(out1, out2)
|
||||
self.assertEqual(out1, out2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -60,7 +60,7 @@ class TestModify(TestCase):
|
|||
code, out, err = self.t("modify start @1 {:%Y-%m-%dT%H:%M:%S}Z".format(one_hour_before_utc))
|
||||
|
||||
j = self.t.export()
|
||||
self.assertEquals(len(j), 1)
|
||||
self.assertEqual(len(j), 1)
|
||||
self.assertOpenInterval(j[0],
|
||||
expectedStart="{:%Y%m%dT%H%M%S}Z".format(one_hour_before_utc))
|
||||
|
||||
|
@ -96,7 +96,7 @@ class TestModify(TestCase):
|
|||
code, out, err = self.t("modify end @2 {:%Y-%m-%dT%H:%M:%S}Z".format(now_utc - timedelta(hours=2)))
|
||||
|
||||
j = self.t.export()
|
||||
self.assertEquals(len(j), 2)
|
||||
self.assertEqual(len(j), 2)
|
||||
self.assertClosedInterval(j[0],
|
||||
expectedStart="{:%Y%m%dT%H%M%S}Z".format(now_utc - timedelta(hours=3)),
|
||||
expectedEnd="{:%Y%m%dT%H%M%S}Z".format(now_utc - timedelta(hours=2)))
|
||||
|
@ -137,7 +137,7 @@ class TestModify(TestCase):
|
|||
code, out, err = self.t("modify start @2 {:%Y-%m-%dT%H:%M:%S}Z".format(now_utc - timedelta(hours=2)))
|
||||
|
||||
j = self.t.export()
|
||||
self.assertEquals(len(j), 2)
|
||||
self.assertEqual(len(j), 2)
|
||||
self.assertClosedInterval(j[0],
|
||||
expectedStart="{:%Y%m%dT%H%M%S}Z".format(now_utc - timedelta(hours=2)),
|
||||
expectedEnd="{:%Y%m%dT%H%M%S}Z".format(now_utc - timedelta(hours=1)))
|
||||
|
|
|
@ -116,7 +116,7 @@ class TestMove(TestCase):
|
|||
|
||||
j = self.t.export()
|
||||
|
||||
self.assertEquals(len(j), 2)
|
||||
self.assertEqual(len(j), 2)
|
||||
self.assertClosedInterval(j[0],
|
||||
expectedStart="20170301T110000Z",
|
||||
expectedEnd="20170301T133000Z",
|
||||
|
|
|
@ -217,7 +217,7 @@ class TestTag(TestCase):
|
|||
|
||||
j = self.t.export()
|
||||
|
||||
self.assertEquals(len(j), 1)
|
||||
self.assertEqual(len(j), 1)
|
||||
self.assertClosedInterval(j[0], expectedTags=["foo"])
|
||||
|
||||
def test_tag_with_new_tag(self):
|
||||
|
|
|
@ -216,7 +216,7 @@ class TestUntag(TestCase):
|
|||
|
||||
j = self.t.export()
|
||||
|
||||
self.assertEquals(len(j), 1)
|
||||
self.assertEqual(len(j), 1)
|
||||
self.assertClosedInterval(j[0], expectedTags=["bar"])
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue