assamtest

mocha-style tests for python
git clone https://git.ce9e.org/assamtest.git

commit
bcca4f5657d04d5a5e88760ab8ce07e8d7ec8311
parent
6c64c8167463a3bf4725b56c3c0096e408b8ffa1
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2019-02-09 15:53
rename _test to register

Diffstat

M assamtest/__init__.py 2 +-
M assamtest/__main__.py 2 +-
R assamtest/_test.py -> assamtest/register.py 0
M tests.py 6 +++---

4 files changed, 5 insertions, 5 deletions


diff --git a/assamtest/__init__.py b/assamtest/__init__.py

@@ -1,3 +1,3 @@
    1    -1 from ._test import suite, test, before, before_each, after, after_each
   -1     1 from .register import suite, test, before, before_each, after, after_each
    2     2 from .expect import expect
    3     3 from .runner import Outcome

diff --git a/assamtest/__main__.py b/assamtest/__main__.py

@@ -4,7 +4,7 @@ import sys
    4     4 import importlib
    5     5 import pkgutil
    6     6 
    7    -1 from ._test import stack, _suite_push, _suite_pop
   -1     7 from .register import stack, _suite_push, _suite_pop
    8     8 from .reporter import SpecReporter
    9     9 from .runner import run
   10    10 

diff --git a/assamtest/_test.py b/assamtest/register.py

diff --git a/tests.py b/tests.py

@@ -24,13 +24,13 @@ def expect_stats(**stats):
   24    24 @assamtest.before_each()
   25    25 def before_each():
   26    26 	global original_stack, stack
   27    -1 	original_stack = assamtest._test.stack
   28    -1 	assamtest._test.stack = stack = [{'tests': [], 'suites': []}]
   -1    27 	original_stack = assamtest.register.stack
   -1    28 	assamtest.register.stack = stack = [{'tests': [], 'suites': []}]
   29    29 
   30    30 
   31    31 @assamtest.after_each()
   32    32 def after_each():
   33    -1 	assamtest._test.stack = original_stack
   -1    33 	assamtest.register.stack = original_stack
   34    34 
   35    35 
   36    36 @assamtest.test()