Simple test source file powered by docstrings:
import cutest as unittest
class CoffeMachine(unittest.TestCase):
"""A good coffee machine"""
def test_success(self):
"""should makes hot drinks"""
class Dog(unittest.TestCase):
"""A typical dog"""
def test_barking(self):
"""should barks loudly"""
def test_tail(self):
"""has a tail"""
self.assertTrue(False)
class Cat(unittest.TestCase):
"""A typical cat"""
def test_meow(self):
"""can meow"""
print('an onomatopoeia for the voiced sound')
def test_fur(self):
"""has a fur"""
if __name__ == "__main__":
unittest.main()
Usage
Import and use it just like unittest package:
import cutest as unittest
Or run and it will auto-discover available tests:
$ python cutest.py
You can also test given file or package:
$ python cutest.py my_test.py
Standard minimalistic mode
$ python cutest.py
Output:
Verbose mode
$ python cutest.py -v
Output:
Release files for cutest.py 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cutest.py-0.9.1.tar.gz | 5.7 kB | Details |
Release files / cutest.py-0.9.1.tar.gz
| Download URL | cutest.py-0.9.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0096216e62301eef825a8ac7048af4a429b2a30197438febc8c83c4328a8e215
|
|
BLAKE2b-256 checksum How to use checksums |
439100c6edfe841490049dc0ba590c9a28c708f86650315494f35135aeb5d99a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |