Skip to content

Commit

Permalink
Fill in Python example repo
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballhat committed Sep 19, 2018
1 parent 2777cf8 commit 637a1e8
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: python
sudo: false
python:
- 2.7
- 3.4
script: py.test -v
6 changes: 6 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import os
import sys

HERE = os.path.dirname(os.path.abspath(__file__))

sys.path.insert(0, HERE)
19 changes: 19 additions & 0 deletions hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from __future__ import print_function
import sys


def hello(what):
print('Hello, {}!'.format(what))


def say_what():
return 'world'


def main():
hello(say_what())
return 0


if __name__ == '__main__':
sys.exit(main())
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest
5 changes: 5 additions & 0 deletions tests/test_hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import hello


def test_says_world():
assert hello.say_what() == 'world'

0 comments on commit 637a1e8

Please sign in to comment.