diff --git a/sample/core.py b/sample/core.py index 2cea5dc2b3b34bec63fb858bdec263769cc37f71..19bf06c155492cb47e0e247cd1768cc1d4db2b31 100644 --- a/sample/core.py +++ b/sample/core.py @@ -1,9 +1,12 @@ # -*- coding: utf-8 -*- +from . import helpers def get_hmm(): """Get a thought.""" return 'hmmm...' + def hmm(): """Contemplation...""" - print get_hmm() \ No newline at end of file + if helpers.get_answer(): + print(get_hmm()) diff --git a/sample/helpers.py b/sample/helpers.py index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..63ab898b048c026cc0cf1a65fd8f35215867c81c 100644 --- a/sample/helpers.py +++ b/sample/helpers.py @@ -0,0 +1,3 @@ +def get_answer(): + """Get an answer.""" + return True diff --git a/tests/test_advanced.py b/tests/test_advanced.py index 5438ac391f1adfcab75a0e605051e5391148a002..cc48248e29df65acef554c1106b5b3de30140396 100644 --- a/tests/test_advanced.py +++ b/tests/test_advanced.py @@ -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() \ No newline at end of file + unittest.main()