forked from phillipdwright/pyp-w1-gw-extensible-calculator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
output
78 lines (67 loc) · 2.99 KB
/
output
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[0;32m### Running tests ### [0m
PYTHONPATH=. py.test tests
============================= test session starts ==============================
platform linux2 -- Python 2.7.6, pytest-2.9.2, py-1.4.31, pluggy-0.3.1
rootdir: /home/ubuntu/workspace, inifile:
plugins: cov-2.2.1
collected 19 items
tests/test_main.py ....F.........F
tests/test_operations.py ....
=================================== FAILURES ===================================
_______________________ TestCalculator.test_get_history ________________________
self = <tests.test_main.TestCalculator testMethod=test_get_history>
@freeze_time('2016-05-20T12:00:00Z')
def test_get_history(self):
perform_operation(self.calc, 'add', (1, 2))
perform_operation(self.calc, 'add', (5, 10))
expected = [
('2016-05-20 12:00:00', 'add', (1, 2), 3),
('2016-05-20 12:00:00', 'add', (5, 10), 15),
]
> self.assertEqual(get_history(self.calc), expected)
E AssertionError: Lists differ: [[FakeDatetime(2016, 5, 20, 12... != [('2016-05-20 12:00:00', 'add'...
E
E First differing element 0:
E [FakeDatetime(2016, 5, 20, 12, 0), 'add', (1, 2), <function <lambda> at 0x2b6dfc80c8c0>]
E ('2016-05-20 12:00:00', 'add', (1, 2), 3)
E
E + [('2016-05-20 12:00:00', 'add', (1, 2), 3),
E + ('2016-05-20 12:00:00', 'add', (5, 10), 15)]
E - [[FakeDatetime(2016, 5, 20, 12, 0),
E - 'add',
E - (1, 2),
E - <function <lambda> at 0x2b6dfc80c8c0>],
E - [FakeDatetime(2016, 5, 20, 12, 0),
E - 'add',
E - (5, 10),
E - <function <lambda> at 0x2b6dfc80c8c0>]]
tests/test_main.py:86: AssertionError
______________________ TestCalculator.test_reset_history _______________________
self = <tests.test_main.TestCalculator testMethod=test_reset_history>
@freeze_time('2016-05-20T12:00:00Z')
def test_reset_history(self):
perform_operation(self.calc, 'add', (1, 2))
perform_operation(self.calc, 'add', (5, 10))
expected = [
('2016-05-20 12:00:00', 'add', (1, 2), 3),
('2016-05-20 12:00:00', 'add', (5, 10), 15),
]
> self.assertEqual(get_history(self.calc), expected)
E AssertionError: Lists differ: [[FakeDatetime(2016, 5, 20, 12... != [('2016-05-20 12:00:00', 'add'...
E
E First differing element 0:
E [FakeDatetime(2016, 5, 20, 12, 0), 'add', (1, 2), <function <lambda> at 0x2b6dfce16aa0>]
E ('2016-05-20 12:00:00', 'add', (1, 2), 3)
E
E + [('2016-05-20 12:00:00', 'add', (1, 2), 3),
E + ('2016-05-20 12:00:00', 'add', (5, 10), 15)]
E - [[FakeDatetime(2016, 5, 20, 12, 0),
E - 'add',
E - (1, 2),
E - <function <lambda> at 0x2b6dfce16aa0>],
E - [FakeDatetime(2016, 5, 20, 12, 0),
E - 'add',
E - (5, 10),
E - <function <lambda> at 0x2b6dfce16aa0>]]
tests/test_main.py:106: AssertionError
===================== 2 failed, 17 passed in 1.22 seconds ======================