nixpkgs/pkgs/applications/misc/pytrainer/fix-test-tz.patch
2017-09-30 19:06:27 +02:00

34 lines
2.3 KiB
Diff

diff -Nurp pytrainer-v1.11.0-a/pytrainer/test/core/test_activity.py pytrainer-v1.11.0-b/pytrainer/test/core/test_activity.py
--- pytrainer-v1.11.0-a/pytrainer/test/core/test_activity.py 1980-01-02 00:00:00.000000000 +0100
+++ pytrainer-v1.11.0-b/pytrainer/test/core/test_activity.py 2017-09-30 18:56:43.127016847 +0200
@@ -69,7 +69,7 @@ class ActivityTest(unittest.TestCase):
self.assertEquals(self.activity.time, self.activity.duration)
def test_activity_starttime(self):
- self.assertEquals(self.activity.starttime, '12:58:23 PM')
+ self.assertEquals(self.activity.starttime, '12:58:23')
def test_activity_time_tuple(self):
self.assertEquals(self.activity.time_tuple, (2, 3, 46))
diff -Nurp pytrainer-v1.11.0-a/pytrainer/test/imports/test_garmintcxv2.py pytrainer-v1.11.0-b/pytrainer/test/imports/test_garmintcxv2.py
--- pytrainer-v1.11.0-a/pytrainer/test/imports/test_garmintcxv2.py 1980-01-02 00:00:00.000000000 +0100
+++ pytrainer-v1.11.0-b/pytrainer/test/imports/test_garmintcxv2.py 2017-09-30 18:55:45.078128980 +0200
@@ -23,7 +23,7 @@ class GarminTCXv2Test(unittest.TestCase)
self.fail()
def test_workout_summary(self):
- summary = [(0, False, '2012-10-14T12:02:42', '10.12', '00:39:51', 'Running')]
+ summary = [(0, False, '2012-10-14T10:02:42', '10.12', '00:39:51', 'Running')]
try:
current_path = os.path.dirname(os.path.abspath(__file__))
data_path = os.path.dirname(os.path.dirname(os.path.dirname(current_path))) + "/"
diff -Nurp pytrainer-v1.11.0-a/pytrainer/test/lib/test_date.py pytrainer-v1.11.0-b/pytrainer/test/lib/test_date.py
--- pytrainer-v1.11.0-a/pytrainer/test/lib/test_date.py 1980-01-02 00:00:00.000000000 +0100
+++ pytrainer-v1.11.0-b/pytrainer/test/lib/test_date.py 2017-09-30 18:56:23.448720166 +0200
@@ -45,4 +45,4 @@ class DateFunctionTest(unittest.TestCase
def test_getDateTime(self):
utctime, localtime = getDateTime('Tue Nov 24 17:29:05 UTC 2015')
self.assertEqual(datetime.datetime(2015, 11, 24, 17, 29, 5, tzinfo=tzutc()), utctime)
- self.assertEqual(datetime.datetime(2015, 11, 24, 19, 29, 5, tzinfo=tzlocal()), localtime)
+ self.assertEqual(datetime.datetime(2015, 11, 24, 17, 29, 5, tzinfo=tzlocal()), localtime)