Skip to content
Snippets Groups Projects
Commit 983ab0fe authored by Simon Albinsson's avatar Simon Albinsson
Browse files

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.
parent 9bce61d2
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from . import helpers
def get_hmm(): def get_hmm():
"""Get a thought.""" """Get a thought."""
return 'hmmm...' return 'hmmm...'
def hmm(): def hmm():
"""Contemplation...""" """Contemplation..."""
print get_hmm() if helpers.get_answer():
\ No newline at end of file print(get_hmm())
def get_answer():
"""Get an answer."""
return True
...@@ -9,8 +9,8 @@ class AdvancedTestSuite(unittest.TestCase): ...@@ -9,8 +9,8 @@ class AdvancedTestSuite(unittest.TestCase):
"""Advanced test cases.""" """Advanced test cases."""
def test_thoughts(self): def test_thoughts(self):
sample.hmm() self.assertIsNone(sample.hmm())
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment