File tree Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Expand file tree Collapse file tree 5 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ language : python
2
+ sudo : false
3
+ python :
4
+ - 2.7
5
+ - 3.4
6
+ script : py.test -v
Original file line number Diff line number Diff line change
1
+ import os
2
+ import sys
3
+
4
+ HERE = os .path .dirname (os .path .abspath (__file__ ))
5
+
6
+ sys .path .insert (0 , HERE )
Original file line number Diff line number Diff line change
1
+ from __future__ import print_function
2
+ import sys
3
+
4
+
5
+ def hello (what ):
6
+ print ('Hello, {}!' .format (what ))
7
+
8
+
9
+ def say_what ():
10
+ return 'world'
11
+
12
+
13
+ def main ():
14
+ hello (say_what ())
15
+ return 0
16
+
17
+
18
+ if __name__ == '__main__' :
19
+ sys .exit (main ())
Original file line number Diff line number Diff line change
1
+ pytest
Original file line number Diff line number Diff line change
1
+ import hello
2
+
3
+
4
+ def test_says_world ():
5
+ assert hello .say_what () == 'world'
You can’t perform that action at this time.
0 commit comments