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:
parent
9bce61d247
commit
983ab0fe41
|
@ -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())
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
def get_answer():
|
||||
"""Get an answer."""
|
||||
return True
|
|
@ -9,8 +9,8 @@ class AdvancedTestSuite(unittest.TestCase):
|
|||
"""Advanced test cases."""
|
||||
|
||||
def test_thoughts(self):
|
||||
sample.hmm()
|
||||
self.assertIsNone(sample.hmm())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
unittest.main()
|
||||
|
|
Loading…
Reference in New Issue