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