Skip to content

Commit f04cc3f

Browse files
committed
Working - now do some improvements.
1 parent 68983f3 commit f04cc3f

File tree

4 files changed

+12
-14
lines changed

4 files changed

+12
-14
lines changed

.travis.yml

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
# https://github.com/CocoMake7/CocoBlockly/blob/master/.travis.yml
2-
3-
# before_install:
41
install:
5-
# - brew update
6-
# - brew install python
72
- sudo apt-get install python3 -y
83

94
language: python
105
python:
116
- "2.7"
12-
# command to install dependencies
13-
# install: "pip install -r requirements.txt"
14-
# command to run tests
7+
158
script: bash unit.sh

unit.sh

+2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
echo 'Hello from travis..'
22
pwd
3+
echo "Running Python 3 Unit Tests"
34
cd unit3
45
python3 unit.py
56
rm cover*jpg
67

8+
echo "Running Python 2 Unit Tests"
79
cd ../unit2
810
python3 unit.py
911
rm cover*jpg

unit2/unit.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@
7878
continue
7979

8080
fail = fail + 1
81-
print (cmd)
81+
print ('*** FAIL2 ***',cmd)
8282

83-
print('Tests passed:',success)
84-
print('Tests failed:',fail)
83+
print('Tests 2 passed:',success)
84+
print('Tests 2 failed:',fail)
8585
if ( len(failures) > 0 ) : print('Unit Test TODO:',failures)
8686
os.system("rm *.sqlite")
8787

unit3/unit.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
fail = 0
3434
codefolder = '../code3'
3535

36+
print('======== Starting Python 3 Tests ==============')
37+
38+
3639
for i in os.listdir(codefolder):
3740
if not i.endswith(".py"):
3841
continue
@@ -71,10 +74,10 @@
7174
continue
7275

7376
fail = fail + 1
74-
print (cmd)
77+
print ('*** FAIL3 ***',cmd)
7578

76-
print('Tests passed:',success)
77-
print('Tests failed:',fail)
79+
print('Tests 3 passed:',success)
80+
print('Tests 3 failed:',fail)
7881
if ( len(failures) > 0 ) : print('Unit Test TODO:',failures)
7982
os.system("rm *.sqlite")
8083
os.system("rm cover3.jpg")

0 commit comments

Comments
 (0)