commit eb9b49c96256daa5ed1af91b2fb15e755f693749 Author: Charlie Date: Fri Dec 27 00:28:01 2024 -0800 init diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dfa350c --- /dev/null +++ b/LICENSE @@ -0,0 +1 @@ +Test MIT \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..d35f30c --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# Test README + +test + +```bash +install \ No newline at end of file diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..b2c2084 --- /dev/null +++ b/setup.py @@ -0,0 +1,20 @@ +from setuptools import setup, find_packages + +setup( + name="testpkg", + version="0.1", + packages=find_packages(), + install_requires=[], + author="Test", + author_email="test@dont_spam_me.co", + description="A simple example private package", + long_description=open("README.md").read(), + long_description_content_type="text/markdown", + # url="https://github.com/nydasco/package_publishing", + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], + python_requires='>=3.6', +) \ No newline at end of file diff --git a/testpkg/__init__.py b/testpkg/__init__.py new file mode 100644 index 0000000..ca370e2 --- /dev/null +++ b/testpkg/__init__.py @@ -0,0 +1,2 @@ +from .mod1 import test_add, test_sub +from .mod2 import test_mul, test_div \ No newline at end of file diff --git a/testpkg/mod1.py b/testpkg/mod1.py new file mode 100644 index 0000000..2c4fb86 --- /dev/null +++ b/testpkg/mod1.py @@ -0,0 +1,5 @@ +def test_add(a, b): + return a+b + +def test_sub(a, b): + return a-b \ No newline at end of file diff --git a/testpkg/mod2.py b/testpkg/mod2.py new file mode 100644 index 0000000..93e22ec --- /dev/null +++ b/testpkg/mod2.py @@ -0,0 +1,5 @@ +def test_mul(a, b): + return a*b + +def test_div(a, b): + return a/b \ No newline at end of file diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test1.py b/tests/test1.py new file mode 100644 index 0000000..8895220 --- /dev/null +++ b/tests/test1.py @@ -0,0 +1,15 @@ +import unittest +from testpkg import test_add, test_sub + +class TestModule1(unittest.TestCase): + + def test_add(self): + self.assertEqual(test_add(1, 2), 3) + self.assertEqual(test_add(-1, 1), 0) + + def test_subtract(self): + self.assertEqual(test_sub(2, 1), 1) + self.assertEqual(test_sub(2, 3), -1) + +if __name__ == "__main__": + unittest.main() \ No newline at end of file