testmarker
Marker library for unittest.
install
pip install testmarker
run tests with marker
Running tests like a python -m unittest discover.
make[1]: Entering directory '$HOME/my/testmarker/examples'
python -m testmarker discover foo --verbose
test_it (foo.tests.test_it.Test0) ... ok
test_it (foo.tests.test_it.Test1) ... ok
test_it (foo.tests.test_it.Test2) ... ok
test_it (foo.tests.test_it.Test3) ... ok
test_it (foo.tests.test_it.Test4) ... ok
test_it (foo.tests.test_it.Test5) ... skipped 'f is default skipped'
test_it (foo.tests.test_it.Test6) ... ok
----------------------------------------------------------------------
Ran 7 tests in 0.000s
OK (skipped=1)
python -m testmarker discover foo --ignore a,b --ignore c --verbose
test_it (foo.tests.test_it.Test0) ... skipped 'a'
test_it (foo.tests.test_it.Test1) ... skipped 'b'
test_it (foo.tests.test_it.Test2) ... skipped 'c'
test_it (foo.tests.test_it.Test3) ... ok
test_it (foo.tests.test_it.Test4) ... ok
test_it (foo.tests.test_it.Test5) ... skipped 'f is default skipped'
test_it (foo.tests.test_it.Test6) ... ok
----------------------------------------------------------------------
Ran 7 tests in 0.000s
OK (skipped=4)
python -m testmarker discover foo --only a,b --verbose
test_it (foo.tests.test_it.Test0) ... ok
test_it (foo.tests.test_it.Test1) ... ok
test_it (foo.tests.test_it.Test2) ... skipped 'c'
test_it (foo.tests.test_it.Test3) ... skipped 'd'
test_it (foo.tests.test_it.Test4) ... skipped 'e'
test_it (foo.tests.test_it.Test5) ... skipped 'f is default skipped'
skipped 'Test6 is skipped by --only option'
----------------------------------------------------------------------
Ran 6 tests in 0.000s
OK (skipped=5)
make[1]: Leaving directory '$HOME/my/testmarker/examples'
marker setting
examples/foo/foo/tests/test_it.py
import unittest
from testmarker import mark
@mark.a
class Test0(unittest.TestCase):
def test_it(self):
pass
@mark.b
class Test1(unittest.TestCase):
def test_it(self):
pass
@mark.c
class Test2(unittest.TestCase):
def test_it(self):
pass
@mark.d
class Test3(unittest.TestCase):
def test_it(self):
pass
@mark.e
class Test4(unittest.TestCase):
def test_it(self):
pass
@mark("f", description="f is default skipped", skip=True)
class Test5(unittest.TestCase):
def test_it(self):
pass
class Test6(unittest.TestCase):
def test_it(self):
pass
Metadata
Release files for testmarker 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| testmarker-0.1.3.tar.gz | 3.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| testmarker-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / testmarker-0.1.3.tar.gz
| Download URL | testmarker-0.1.3.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be3faefce09854c38f7adb32001b2dbb339afcebd984858c676d526ed69d1ac0
|
|
BLAKE2b-256 checksum How to use checksums |
ab2a27cd10478b08e2e906d96fe39102dac12d862fe1d064ab3b26ce1222c8cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / testmarker-0.1.3-py3-none-any.whl
| Download URL | testmarker-0.1.3-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f6923837cef707c45cf3b00a662fb4ef5502b1c7a6778af1cc45505cb1b78b99
|
|
BLAKE2b-256 checksum How to use checksums |
8b55d4fed6e34a08213882e2965c61652860a57c754a7b103d8c6df625020606
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |