From 32f3cfee4cbb0231d7bf85c125b39bdbc4eecf2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felipe=20L=C3=B3pez?= Date: Thu, 22 Nov 2018 12:29:21 -0600 Subject: [PATCH] message --- minpkg/__init__.py | 2 ++ minpkg/hello.py | 2 ++ setup.cfg | 5 +++++ setup.py | 2 ++ tests/test_hello.py | 4 ++++ 5 files changed, 15 insertions(+) create mode 100644 minpkg/hello.py create mode 100644 setup.cfg create mode 100644 tests/test_hello.py diff --git a/minpkg/__init__.py b/minpkg/__init__.py index a1c2544..460f13b 100644 --- a/minpkg/__init__.py +++ b/minpkg/__init__.py @@ -1 +1,3 @@ +from .hello import say_hello + __version__ = '0.0.3-dev' \ No newline at end of file diff --git a/minpkg/hello.py b/minpkg/hello.py new file mode 100644 index 0000000..ce0dfd0 --- /dev/null +++ b/minpkg/hello.py @@ -0,0 +1,2 @@ +def say_hello(): + return "hello" diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 0000000..a788fc7 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,5 @@ +[aliases] +test=pytest + +[tool:pytest] +addopts = --verbose \ No newline at end of file diff --git a/setup.py b/setup.py index 1f274ba..b26c324 100644 --- a/setup.py +++ b/setup.py @@ -19,6 +19,8 @@ long_description_content_type="text/markdown", url="https://github.com/pypa/sampleproject", packages=setuptools.find_packages(), + setup_requires=['pytest-runner'], + tests_require=['pytest'], classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", diff --git a/tests/test_hello.py b/tests/test_hello.py new file mode 100644 index 0000000..cb7e6b7 --- /dev/null +++ b/tests/test_hello.py @@ -0,0 +1,4 @@ +from minpkg import say_hello + +def test_say_hello(): + assert say_hello() == 'hello' \ No newline at end of file