Lets allow the helpers to be helpfull

I had problems transissioning form python 2 to 3 due to imports failing
when running tests. This shows (what i hope) is the correct way of
dealing with imports.
This commit is contained in:
Simon Albinsson 2017-02-01 13:20:02 +01:00
parent 9bce61d247
commit 983ab0fe41
3 changed files with 9 additions and 3 deletions

View File

@ -1,9 +1,12 @@
# -*- coding: utf-8 -*-
from . import helpers
def get_hmm():
"""Get a thought."""
return 'hmmm...'
def hmm():
"""Contemplation..."""
print get_hmm()
if helpers.get_answer():
print(get_hmm())

View File

@ -0,0 +1,3 @@
def get_answer():
"""Get an answer."""
return True

View File

@ -9,7 +9,7 @@ class AdvancedTestSuite(unittest.TestCase):
"""Advanced test cases."""
def test_thoughts(self):
sample.hmm()
self.assertIsNone(sample.hmm())
if __name__ == '__main__':