From c33350368d66875fd93d69ffc532d079be8dd217 Mon Sep 17 00:00:00 2001 From: kazk Date: Tue, 30 Apr 2019 17:15:10 -0700 Subject: [PATCH] Package test framework --- README.md | 14 ++++++++++++++ codewars_test/__init__.py | 1 + cw-2.py => codewars_test/test_framework.py | 0 setup.py | 11 +++++++++++ 4 files changed, 26 insertions(+) create mode 100644 codewars_test/__init__.py rename cw-2.py => codewars_test/test_framework.py (100%) create mode 100644 setup.py diff --git a/README.md b/README.md index 9746c25..942f76f 100644 --- a/README.md +++ b/README.md @@ -1 +1,15 @@ # Codewars Test Framework for Python + + +## Example + +```python +from solution import add +import codewars_test as test + +@test.describe('Example Tests') +def example_tests(): + @test.it('Example Test Case') + def example_test_case(): + test.assert_equals(add(1, 1), 2, 'Optional Message on Failure') +``` diff --git a/codewars_test/__init__.py b/codewars_test/__init__.py new file mode 100644 index 0000000..7f80043 --- /dev/null +++ b/codewars_test/__init__.py @@ -0,0 +1 @@ +from .test_framework import * diff --git a/cw-2.py b/codewars_test/test_framework.py similarity index 100% rename from cw-2.py rename to codewars_test/test_framework.py diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..dc916f3 --- /dev/null +++ b/setup.py @@ -0,0 +1,11 @@ +from setuptools import setup + +setup( + name="codewars_test", + version="0.1.0", + packages=["codewars_test"], + license="MIT", + description="Codewars test framework for Python", + install_requires=[], + url="https://github.com/Codewars/python-test-framework", +)