Skip to content

Commit 530a3bd

Browse files
committed
Found something breaks python2. Doing some testing
1 parent 446a29d commit 530a3bd

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ clean:
1414

1515
test:
1616
python3 tests.py
17+
test2:
18+
python tests.py
1719

1820
all:
1921
make clean build test run

tests.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ def test_setSecondAccounts():
7878
, 'secondAccounts' : [("acc1", "20.00"), ("acc2", "")]}
7979
return(newLineData == expected)
8080

81+
def test_headTail():
82+
l = [1,2,3]
83+
head, *tail = l
84+
return(head == 1 and tail == [2,3])
85+
8186

8287
# Just until I write real ones
8388
def testTrue():
@@ -91,7 +96,8 @@ def testTrue():
9196
,["entryInfo", test_entryInfo()]
9297
,["modifyData", test_modifyData()]
9398
,["setMainAccount", test_setMainAccount()]
94-
,["setSecondAccounts", test_setSecondAccounts()]]
99+
,["setSecondAccounts", test_setSecondAccounts()]
100+
,["Head *Tail", test_headTail()]]
95101
failedTests = []
96102

97103
largestTestName = functools.reduce(max, map(lambda x: len(x[0]), testList))

0 commit comments

Comments
 (0)