Commits

Atsushi Odagiri committed 00d20fa

py3

Comments (0)

Files changed (4)

+syntax:glob
+*.egg-info
+*.egg
+__pycache__
+*.py[co]

hello/__init__.py

-def hello():
-    print "Hello, world!"
+from six import print_
 
+
+def hello(message="Hello, world!"):
+    print_(message)
+
+import unittest
+from testfixtures import OutputCapture
+
+
+class TestHello(unittest.TestCase):
+    def _callFUT(self, *args, **kwargs):
+        from . import hello
+        return hello(*args, **kwargs)
+
+    def test_hello(self):
+        with OutputCapture() as output:
+            self._callFUT(message="testing")
+
+        output.compare("testing")
+
       zip_safe=False,
       install_requires=[
           # -*- Extra requirements: -*-
+          'six',
       ],
+      tests_require=["testfixtures"],
+      test_suite="hello",
       entry_points="""
       # -*- Entry points: -*-
       [console_scripts]