diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c014ef0294aa6dfa08bfa16acfda86cda153c37d..eb0616e669256ee73d369843537c1e82b7653402 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,46 +1,73 @@
 variables:
   GIT_SUBMODULE_STRATEGY: recursive
 
+
+default:
+  image: python:3.8
+
+
 before_script:
-  - export DEBIAN_FRONTEND=noninteractive
-  - apt-get -qq update
-  - apt-get -qq install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git > /dev/null
-  - export DEBIAN_FRONTEND=dialog
-  - export LC_ALL=C.UTF-8
-  - export LANG=C.UTF-8
-  - git clone https://github.com/pyenv/pyenv.git ~/.pyenv
-  - export PYENV_ROOT="$HOME/.pyenv"
-  - export PATH="$PYENV_ROOT/bin:$PATH"
-  - eval "$(pyenv init -)"
-
-
-test:python37:
+  - pip install --upgrade pip
+  - pip install pytest
+  - pip install -r requirements.txt
+
+
+# test saqc with python 3.7
+python37:
+  stage: test
+  image: python:3.7
   script:
-    - pyenv install 3.7.5
-    - pyenv shell 3.7.5
-    - pip install --upgrade pip
-    - pip install -r requirements.txt
-    - python -m pytest --ignore test/lib test
+    - pytest tests/core tests/flagger tests/funcs
     - python -m saqc --config ressources/data/config_ci.csv --data ressources/data/data.csv --outfile /tmp/test.csv
 
 
-test:python38:
+# test saqc with python 3.8
+python38:
+  stage: test
   script:
-    - pyenv install 3.8.0
-    - pyenv shell 3.8.0
-    - pip install --upgrade pip
-    - pip install -r requirements.txt
-    - python -m pytest --ignore test/lib test
+    - pytest tests/core tests/flagger tests/funcs
     - python -m saqc --config ressources/data/config_ci.csv --data ressources/data/data.csv --outfile /tmp/test.csv
 
-# Make html docu with sphinx
+
+# test lib saqc
+testLib:
+  stage: test
+  script:
+    - pytest tests/lib
+
+
+# fuzzy testing saqc
+fuzzy:
+  allow_failure: true
+  stage: test
+  script:
+    - pytest tests/fuzzy
+
+
+# make (visual) coverage in gitlab merge request diff's
+coverage:
+  allow_failure: true
+  stage: test
+
+  script:
+    - pip install pytest-cov coverage
+    - pytest --cov=saqc tests/core tests/flagger tests/funcs
+  after_script:
+    - coverage xml
+
+  # regex to find the coverage percentage in the job output
+  coverage: '/^TOTAL.+?(\d+\%)$/'
+
+  artifacts:
+    when: always
+    reports:
+      cobertura: coverage.xml
+
+
+# make html docu with sphinx
 pages:
   stage: deploy
   script:
-    - pyenv install 3.8.0
-    - pyenv shell 3.8.0
-    - pip install --upgrade pip
-    - pip install -r requirements.txt
     - cd sphinx-doc/
     - pip install -r requirements_sphinx.txt
     - make doc
diff --git a/saqc/__init__.py b/saqc/__init__.py
index 0c2bb6d4b68a2234e708e40fc693af29724a7826..d7155f47acb228ad2215d8a4dd283351860b1299 100644
--- a/saqc/__init__.py
+++ b/saqc/__init__.py
@@ -4,7 +4,7 @@
 __version__ = "1.4"
 
 # import order: from small to big
-from saqc.common import *
+from saqc.constants import *
 from saqc.flagger import *
 from saqc.core.register import register
 from saqc.core.core import SaQC
diff --git a/saqc/common.py b/saqc/constants.py
similarity index 100%
rename from saqc/common.py
rename to saqc/constants.py
diff --git a/saqc/core/core.py b/saqc/core/core.py
index 3fdd00a5a8127df9165164ce57e4274242ab2e3a..3d4a7517c70e35bb9c3132adeb31aede9881dc23 100644
--- a/saqc/core/core.py
+++ b/saqc/core/core.py
@@ -17,7 +17,7 @@ import numpy as np
 import timeit
 import inspect
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.flagger import initFlagsLike, Flagger
 from saqc.core.lib import APIController, ColumnSelector
 from saqc.core.register import FUNC_MAP, SaQCFunction
@@ -228,7 +228,8 @@ class SaQC(FuncModules):
 
         def inner(field: str, *fargs, target: str = None, regex: bool = False, plot: bool = False, inplace: bool = False, **fkwargs) -> SaQC:
 
-            fkwargs.setdefault('to_mask', self._to_mask)
+            if self._to_mask is not None:
+                fkwargs.setdefault('to_mask', self._to_mask)
 
             control = APIController(
                 plot=plot
diff --git a/saqc/core/modules/flagtools.py b/saqc/core/modules/flagtools.py
index c9c1b089278b8cec4bcf4a34f7a3185cdf8f07fd..637dc6f853e7170abf980dce7096ab6e5d87bf37 100644
--- a/saqc/core/modules/flagtools.py
+++ b/saqc/core/modules/flagtools.py
@@ -8,7 +8,7 @@ import pandas as pd
 
 from dios.dios import DictOfSeries
 from saqc.core.modules.base import ModuleBase
-from saqc.common import *
+from saqc.constants import *
 
 
 class FlagTools(ModuleBase):
diff --git a/saqc/core/modules/interpolation.py b/saqc/core/modules/interpolation.py
index c73da2563e95223af769a480b7b60da92ff2ebdf..42db500c29c7e6570cd4379b06f97d5e2162069e 100644
--- a/saqc/core/modules/interpolation.py
+++ b/saqc/core/modules/interpolation.py
@@ -7,7 +7,7 @@ from typing_extensions import Literal
 import numpy as np
 import pandas as pd
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.modules.base import ModuleBase
 
 
diff --git a/saqc/core/register.py b/saqc/core/register.py
index fcdcf50499f2f04a57e5b355116d78ede63997f6..817f3b559ad3f57899f027191e2afd3fc9d36979 100644
--- a/saqc/core/register.py
+++ b/saqc/core/register.py
@@ -7,8 +7,9 @@ import dataclasses
 import numpy as np
 import pandas as pd
 import dios
+import warnings
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.lib import SaQCFunction
 from saqc.lib.types import FuncReturnT
 from saqc.flagger.flags import Flagger, initFlagsLike
@@ -33,7 +34,7 @@ class CallCtrl:
     kwargs: dict
 
     masking: MaskingStrT = None
-    to_mask: float = None
+    mthresh: float = None
     mask: dios.DictOfSeries = None
 
 
@@ -41,18 +42,18 @@ def register(masking: MaskingStrT = "all", module: Optional[str] = None):
 
     # executed on module import
     def inner(func):
+        func_name = func.__name__
+        if module:
+            func_name = f"{module}.{func_name}"
 
         # executed if a register-decorated function is called,
         # nevertheless if it is called plain or via `SaQC.func`.
         @wraps(func)
         def callWrapper(*args, **kwargs):
-            args, kwargs, ctrl = _preCall(func, args, kwargs, masking)
+            args, kwargs, ctrl = _preCall(func, args, kwargs, masking, func_name)
             result = func(*args, **kwargs)
-            return _postCall(result, ctrl)
+            return _postCall(result, ctrl, func_name)
 
-        func_name = func.__name__
-        if module:
-            func_name = f"{module}.{func_name}"
         FUNC_MAP[func_name] = SaQCFunction(func_name, callWrapper)
 
         return callWrapper
@@ -60,7 +61,7 @@ def register(masking: MaskingStrT = "all", module: Optional[str] = None):
     return inner
 
 
-def _preCall(func: callable, args: tuple, kwargs: dict, masking: MaskingStrT):
+def _preCall(func: callable, args: tuple, kwargs: dict, masking: MaskingStrT, fname: str):
     """
     Handler that runs before any call to a saqc-function.
 
@@ -95,24 +96,27 @@ def _preCall(func: callable, args: tuple, kwargs: dict, masking: MaskingStrT):
         control keyword-arguments passed to `_postCall`
 
     """
-    kwargs.setdefault('to_mask', None)
+    mthresh = _getMaskingThresh(masking, kwargs, fname)
+    kwargs['to_mask'] = mthresh
+
     data, field, flagger, *args = args
+    ctrl = CallCtrl(func, data.copy(), field, flagger.copy(), args, kwargs, masking=masking, mthresh=mthresh)
 
-    ctrl = CallCtrl(func, data.copy(), field, flagger.copy(), args, kwargs, masking=masking)
+    # handle data - masking
+    columns = _getMaskingColumns(data, field, masking)
+    data, mask = _maskData(data, flagger, columns, mthresh)
 
-    # masking
-    ctrl.to_mask = _getToMask(ctrl)
-    columns = _getMaskingColumns(ctrl, ctrl.masking)
-    data, ctrl.mask = _maskData(data, flagger, columns, ctrl.to_mask)
+    # store mask
+    ctrl.mask = mask
 
-    # flags
-    flagger = _prepareFlags(flagger, ctrl)
+    # handle flags - clearing
+    flagger = _prepareFlags(flagger, masking)
 
     args = data, field, flagger, *args
     return args, kwargs, ctrl
 
 
-def _postCall(result, ctrl: CallCtrl) -> FuncReturnT:
+def _postCall(result, ctrl: CallCtrl, fname: str) -> FuncReturnT:
     """
     Handler that runs after any call to a saqc-function.
 
@@ -123,9 +127,13 @@ def _postCall(result, ctrl: CallCtrl) -> FuncReturnT:
     ----------
     result : tuple
         the result from the called function, namely: data and flagger
+
     ctrl : dict
         control keywords from `_preCall`
 
+    fname : str
+        Name of the (just) called saqc-function
+
     Returns
     -------
     data, flagger : dios.DictOfSeries, saqc.flagger.Flagger
@@ -136,51 +144,89 @@ def _postCall(result, ctrl: CallCtrl) -> FuncReturnT:
     return data, flagger
 
 
-def _getMaskingColumns(ctrl: CallCtrl, masking: MaskingStrT):
+def _getMaskingColumns(data: dios.DictOfSeries, field: str, masking: MaskingStrT):
     """
+    Returns
+    -------
+    columns: pd.Index
+        Data columns that need to be masked.
+
     Raises
     ------
     ValueError: if given masking literal is not supported
     """
     if masking == 'all':
-        return ctrl.data.columns
+        return data.columns
     if masking == 'none':
         return pd.Index([])
     if masking == 'field':
-        return pd.Index([ctrl.field])
+        return pd.Index([field])
 
     raise ValueError(f"wrong use of `register(masking={ctrl.masking})`")
 
 
-def _getToMask(ctrl):
-    to_mask = ctrl.kwargs['to_mask']
-    _warnForUnusedMasking(ctrl.masking, to_mask)
+def _getMaskingThresh(masking, kwargs, fname):
+    """
+    Check the correct usage of the `to_mask` keyword, iff passed, otherwise return a default.
+
+    Parameters
+    ----------
+    masking : str
+        The function-scope masking keyword a saqc-function is decorated with.
+    kwargs : dict
+        The kwargs that will be passed to the saqc-function, possibly contain ``to_mask``.
+    fname : str
+        The name of the saqc-function to be called later (not here), to use in meaningful
+         error messages
+
+    Returns
+    -------
+    threshold: float
+        All data gets masked, if the flags are equal or worse than the threshold.
+
+    Notes
+    -----
+    If ``to_mask`` is **not** in the kwargs, the threshold defaults to
+     - ``-np.inf``
+    If boolean ``to_mask`` is found in the kwargs, the threshold defaults to
+     - ``-np.inf``, if ``True``
+     - ``+np.inf``, if ``False``
+    If a floatish ``to_mask`` is found in the kwargs, this value is taken as the threshold.
+    """
+    if 'to_mask' not in kwargs:
+        return UNFLAGGED
+
+    thresh = kwargs['to_mask']
 
-    if to_mask is None:
-        to_mask = UNFLAGGED
+    if not isinstance(thresh, (bool, float, int)):
+        raise TypeError(f"'to_mask' must be of type bool or float")
 
-    return to_mask
+    if masking == 'none' and thresh not in (False, np.inf):
+        # TODO: fix warning reference to docu
+        warnings.warn(f"the saqc-function {fname!r} ignore masking and therefore does not evaluate the passed "
+                      f"'to_mask'-keyword. Please refer to the documentation: TODO")
 
+    if thresh is True:  # masking ON
+        thresh = UNFLAGGED
 
-def _warnForUnusedMasking(masking, to_mask):
-    # warn if the user explicitly pass `to_mask=..` to a function that is
-    # decorated by `register(masking='none')`, by which `to_mask` is ignored
-    # TODO: fix warning message
-    if masking == 'none' and to_mask not in (None, np.inf):
-        logging.warning("`to_mask` is given, but the saqc-function ignore masking."
-                        " Please refer to the documentation: TODO")
+    if thresh is False:  # masking OFF
+        thresh = np.inf
+
+    thresh = float(thresh)  # handle int
+
+    return thresh
 
 
 # TODO: this is heavily undertested
-def _maskData(data, flagger, columns, to_mask) -> Tuple[dios.DictOfSeries, dios.DictOfSeries]:
+def _maskData(data, flagger, columns, thresh) -> Tuple[dios.DictOfSeries, dios.DictOfSeries]:
     """
-    Mask data with Nans by flags, according to masking and to_mask.
+    Mask data with Nans by flags worse that a threshold and according to masking keyword in decorator.
     """
     mask = dios.DictOfSeries(columns=columns)
 
     # we use numpy here because it is faster
     for c in columns:
-        col_mask = _getMask(flagger[c].to_numpy(), to_mask)
+        col_mask = _getMask(flagger[c].to_numpy(), thresh)
 
         if any(col_mask):
             col_data = data[c].to_numpy(dtype=np.float64)
@@ -192,20 +238,22 @@ def _maskData(data, flagger, columns, to_mask) -> Tuple[dios.DictOfSeries, dios.
     return data, mask
 
 
-def _getMask(flags: Union[np.array, pd.Series], to_mask: float) -> Union[np.array, pd.Series]:
+def _getMask(flags: Union[np.array, pd.Series], thresh: float) -> Union[np.array, pd.Series]:
     """
-    Return a mask of flags accordingly to `to_mask`.
-    Return type is same as flags.
+    Return a mask of flags accordingly to `thresh`. Return type is same as flags.
     """
-    return flags > to_mask
+    if thresh == UNFLAGGED:
+        return flags > UNFLAGGED
 
+    return flags >= thresh
 
-def _prepareFlags(flagger: Flagger, ctrl: CallCtrl) -> Flagger:
+
+def _prepareFlags(flagger: Flagger, masking) -> Flagger:
     """
     Clear flags before each call.
     """
-    # either the index or the columns itself changed
-    if ctrl.masking == 'none':
+    # Either the index or the columns itself changed
+    if masking == 'none':
         return flagger
 
     return initFlagsLike(flagger, initial_value=UNTOUCHED)
@@ -213,18 +261,23 @@ def _prepareFlags(flagger: Flagger, ctrl: CallCtrl) -> Flagger:
 
 def _restoreFlags(flagger: Flagger, ctrl: CallCtrl):
     if ctrl.masking == 'none':
-        ctrl.flagger = flagger
+        return flagger
 
-    else:
-        columns = flagger.columns
-        if ctrl.masking == 'field':
-            columns = columns.difference(ctrl.flagger.columns)
-            columns = columns.append(pd.Index([ctrl.field]))
+    result = ctrl.flagger
 
-        for c in columns:
-            ctrl.flagger[c] = flagger[c]
+    columns = flagger.columns
+    # take field column and all possibly newly added columns
+    if ctrl.masking == 'field':
+        columns = columns.difference(ctrl.flagger.columns)
+        columns = columns.append(pd.Index([ctrl.field]))
+
+    for c in columns:
+        # this implicitly squash the new-flagger history (RHS) to a single column, which than is appended to
+        # the old history (LHS). The new-flagger history possibly consist of multiple columns, one for each
+        # time flags was set to the flagger.
+        result[c] = flagger[c]
 
-    return ctrl.flagger
+    return result
 
 
 # TODO: this is heavily undertested
@@ -273,15 +326,15 @@ def _unmaskData(data: dios.DictOfSeries, ctrl: CallCtrl) -> dios.DictOfSeries:
         if not old.data[c].index.equals(data[c].index):
             continue
 
-        restore_old_val = old.mask[c].to_numpy() & data[c].isna().to_numpy()
+        restore_old_mask = old.mask[c].to_numpy() & data[c].isna().to_numpy()
 
         # we have nothing to restore
-        if not any(restore_old_val):
+        if not any(restore_old_mask):
             continue
 
         # restore old values if no new are present
-        ol, nw = old.data[c].to_numpy(), data[c].to_numpy()
-        data.loc[:, c] = np.where(restore_old_val, ol, nw)
+        v_old, v_new = old.data[c].to_numpy(), data[c].to_numpy()
+        data.loc[:, c] = np.where(restore_old_mask, v_old, v_new)
 
     return data
 
diff --git a/saqc/core/visitor.py b/saqc/core/visitor.py
index 560d87748c48e4154b342e7327af3b7f1d805ce6..c517261e0318a0a1bee0bef6423bdb139070fb68 100644
--- a/saqc/core/visitor.py
+++ b/saqc/core/visitor.py
@@ -6,7 +6,7 @@ import ast
 import numpy as np
 import pandas as pd
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import FUNC_MAP
 import saqc.lib.ts_operators as ts_ops
 
diff --git a/saqc/flagger/flags.py b/saqc/flagger/flags.py
index 62d8d329207728113e85533babb55654b5ab33e9..42f877d3c670d4603f166b47a2355bd5c605fddb 100644
--- a/saqc/flagger/flags.py
+++ b/saqc/flagger/flags.py
@@ -3,7 +3,7 @@
 from __future__ import annotations
 
 import dios
-from saqc.common import *
+from saqc.constants import *
 from saqc.flagger.history import History
 import pandas as pd
 from typing import Union, Dict, DefaultDict, Optional, Type, Tuple, Iterable
diff --git a/saqc/flagger/history.py b/saqc/flagger/history.py
index 551dba6c4645c317496b5c07cbd28d61a0224d58..72a573bd1e6fca6f0f4c330a68b659b0afdad39b 100644
--- a/saqc/flagger/history.py
+++ b/saqc/flagger/history.py
@@ -4,7 +4,7 @@ from __future__ import annotations
 from typing import Tuple, Type
 import pandas as pd
 import numpy as np
-from saqc.common import *
+from saqc.constants import *
 
 
 class History:
diff --git a/saqc/funcs/changepoints.py b/saqc/funcs/changepoints.py
index 00d201f7772912c1b1883e26ad531f67fe785fc5..200711da4b87d2382cc27b3298c179f1be5c29e3 100644
--- a/saqc/funcs/changepoints.py
+++ b/saqc/funcs/changepoints.py
@@ -11,7 +11,7 @@ from typing_extensions import Literal
 
 from dios import DictOfSeries
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import register
 from saqc.lib.tools import customRoller
 from saqc.flagger import Flagger
diff --git a/saqc/funcs/flagtools.py b/saqc/funcs/flagtools.py
index fb9522324dc3c435a55fe4502fe70b2edccabecf..5c2b341a97cf2d572dd83e63d23bdee3691c8e1c 100644
--- a/saqc/funcs/flagtools.py
+++ b/saqc/funcs/flagtools.py
@@ -7,7 +7,7 @@ import pandas as pd
 
 from dios import DictOfSeries
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.lib.types import *
 from saqc.core.register import register
 from saqc.flagger import Flagger
@@ -75,6 +75,10 @@ def clearFlags(data: DictOfSeries, field: ColumnName, flagger: Flagger, **kwargs
     forceFlags : set whole column to a flag value
     flagUnflagged : set flag value at all unflagged positions
     """
+    if 'flag' in kwargs:
+        flag = kwargs.pop('flag')
+        warnings.warn(f'`flag={flag}` is ignored here.')
+
     return forceFlags(data, field, flagger, flag=UNFLAGGED, **kwargs)
 
 
diff --git a/saqc/funcs/generic.py b/saqc/funcs/generic.py
index ed64f7ca0401d17d6b2669f9c2d9b4bf04c3160a..4678bec624126d65f04f397e4f4bd8a472c294d4 100644
--- a/saqc/funcs/generic.py
+++ b/saqc/funcs/generic.py
@@ -10,7 +10,7 @@ import pandas as pd
 
 from dios import DictOfSeries
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import register
 from saqc.core.visitor import ENVIRONMENT
 from saqc.flagger import Flagger, initFlagsLike
@@ -21,13 +21,33 @@ _OP = {'<': op.lt, '<=': op.le, '==': op.eq, '!=': op.ne, '>': op.gt, '>=': op.g
 
 
 def _dslIsFlagged(
-        flagger: Flagger, var: pd.Series, flag: float = UNFLAGGED, comparator: str = ">"
+        flagger: Flagger, var: pd.Series, flag: float = None, comparator: str = None
 ) -> Union[pd.Series, DictOfSeries]:
     """
     helper function for `flag`
+
+    Param Combinations
+    ------------------
+    - ``isflagged('var')``              : show me (anything) flagged
+    - ``isflagged('var', DOUBT)``       : show me ``flags >= DOUBT``
+    - ``isflagged('var', DOUBT, '==')`` : show me ``flags == DOUBT``
+
+    Raises
+    ------
+    ValueError: if `comparator` is passed but no `flag` vaule. Eg. ``isflagged('var', comparator='>=')``
     """
-    comparison = _OP[comparator]
-    return comparison(flagger[var.name], flag)
+    if flag is None:
+        if comparator is not None:
+            raise ValueError('if `comparator` is used, explicitly pass a `flag` level.')
+        flag = UNFLAGGED
+        comparator = '>'
+
+    # default
+    if comparator is None:
+        comparator = '>='
+
+    _op = _OP[comparator]
+    return _op(flagger[var.name], flag)
 
 
 def _execGeneric(flagger: Flagger, data: DictOfSeries, func: Callable[[pd.Series], pd.Series], field: str,
diff --git a/saqc/funcs/interpolation.py b/saqc/funcs/interpolation.py
index 95fb4997097a362b8c309049135564d364f70947..da8a10d4db0b2abfb60cd7057d07def1ca5d1874 100644
--- a/saqc/funcs/interpolation.py
+++ b/saqc/funcs/interpolation.py
@@ -9,7 +9,7 @@ import pandas as pd
 
 from dios import DictOfSeries
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import register
 from saqc.flagger import Flagger
 from saqc.flagger.flags import applyFunctionOnHistory
diff --git a/saqc/funcs/outliers.py b/saqc/funcs/outliers.py
index 818a80ed02bd59697b93a082740626ec7a2a1af8..ab486487d692419535bc2b88bac3107a001cfa68 100644
--- a/saqc/funcs/outliers.py
+++ b/saqc/funcs/outliers.py
@@ -14,7 +14,7 @@ from outliers import smirnov_grubbs
 
 from dios import DictOfSeries
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import register
 from saqc.flagger import Flagger
 from saqc.lib.tools import (
diff --git a/saqc/funcs/resampling.py b/saqc/funcs/resampling.py
index 49d0888b9950dc69149fe240552302675fa3347b..9c45aa576b94a497d214b4713451377e0d176d1a 100644
--- a/saqc/funcs/resampling.py
+++ b/saqc/funcs/resampling.py
@@ -11,7 +11,7 @@ import pandas as pd
 
 from dios import DictOfSeries
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import register
 from saqc.flagger import Flagger, initFlagsLike, History
 from saqc.funcs.tools import copy, drop, rename
diff --git a/saqc/funcs/scores.py b/saqc/funcs/scores.py
index bdc27b5973dfe5d17bb48c73f08ab6dfb9758275..1a49f4e1e101da726dfe70ad42e00d32f022fd72 100644
--- a/saqc/funcs/scores.py
+++ b/saqc/funcs/scores.py
@@ -8,7 +8,7 @@ import pandas as pd
 
 from dios import DictOfSeries
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import register
 from saqc.flagger import Flagger
 from saqc.lib import ts_operators as ts_ops
diff --git a/saqc/funcs/tools.py b/saqc/funcs/tools.py
index 3e49f762b714e921ec9aefa0142c931ee21b0ba2..edbb4c80c7e25833b08a8f2a854e1eae207037e0 100644
--- a/saqc/funcs/tools.py
+++ b/saqc/funcs/tools.py
@@ -8,7 +8,7 @@ import numpy as np
 
 from dios import DictOfSeries
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import register
 from saqc.flagger import Flagger
 from saqc.lib.tools import periodicMask
diff --git a/saqc/lib/plotting.py b/saqc/lib/plotting.py
index c03670b5cbf346f5c39904399be9227d07787ec8..5f79f28bb5932ee67044e706c0d3cc39d09c6db9 100644
--- a/saqc/lib/plotting.py
+++ b/saqc/lib/plotting.py
@@ -8,7 +8,7 @@ import pandas as pd
 import dios
 import matplotlib.pyplot as plt
 from typing import List, Dict, Optional
-from saqc.common import *
+from saqc.constants import *
 from saqc.flagger import Flagger
 
 
diff --git a/test/flagger/__init__.py b/test/flagger/__init__.py
deleted file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000
diff --git a/test/flagger/test_dmpflagger.py b/test/flagger/test_dmpflagger.py
deleted file mode 100644
index 677f54cbe9c4ecceebd7f95d65e4b88e975bf8dc..0000000000000000000000000000000000000000
--- a/test/flagger/test_dmpflagger.py
+++ /dev/null
@@ -1,117 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import json
-
-import numpy as np
-import pandas as pd
-import pytest
-
-from test.common import initData
-
-DmpFlagger = NotImplemented
-pytest.skip("DmpFlagger is deprecated.", allow_module_level=True)
-
-
-@pytest.fixture
-def data():
-    return initData(cols=1)
-
-
-@pytest.fixture
-def data_4cols():
-    return initData(cols=4)
-
-
-def parseComments(data):
-    return np.array([json.loads(v)["comment"] for v in data.to_df().values.flatten()])
-
-
-def test_initFlags(data):
-    flagger = DmpFlagger().initFlags(data=data)
-    assert (flagger._flags == flagger.UNFLAGGED).all(axis=None)
-    assert (flagger._causes == "").all(axis=None)
-    assert (flagger._comments == "").all(axis=None)
-
-
-def test_mergeFlaggerOuter(data):
-
-    flagger = DmpFlagger()
-
-    field = data.columns[0]
-
-    data_left = data
-
-    data_right = data.to_df()
-    dates = data_right.index.to_series()
-    dates[len(dates) // 2 :] += pd.Timedelta("1Min")
-    data_right.index = dates
-    data_right = data_right.to_dios()
-
-    left = flagger.initFlags(data=data_left).setFlags(
-        field=field, flag=flagger.BAD, cause="SaQCLeft", comment="testLeft"
-    )
-
-    right = flagger.initFlags(data=data_right).setFlags(
-        field=field, flag=flagger.GOOD, cause="SaQCRight", comment="testRight"
-    )
-
-    merged = left.merge(right, join="outer")
-
-    right_index = data_right[field].index.difference(data_left[field].index)
-    assert (merged._flags.loc[right_index] == flagger.GOOD).all(axis=None)
-    assert (merged._causes.loc[right_index] == "SaQCRight").all(axis=None)
-    assert np.all(parseComments(merged._comments.loc[right_index]) == "testRight")
-
-    left_index = data_left[field].index
-    assert (merged._flags.loc[left_index] == flagger.BAD).all(axis=None)
-    assert (merged._causes.loc[left_index] == "SaQCLeft").all(axis=None)
-    assert np.all(parseComments(merged._comments.loc[left_index]) == "testLeft")
-
-
-def test_mergeFlaggerInner(data):
-
-    flagger = DmpFlagger()
-
-    field = data.columns[0]
-
-    data_left = data
-    data_right = data.iloc[::2]
-
-    left = flagger.initFlags(data=data_left).setFlags(
-        field=field, flag=flagger.BAD, cause="SaQCLeft", comment="testLeft"
-    )
-
-    right = flagger.initFlags(data=data_right).setFlags(
-        field=field, flag=flagger.GOOD, cause="SaQCRight", comment="testRight"
-    )
-
-    merged = left.merge(right, join="inner")
-
-    assert (merged._flags[field].index == data_right[field].index).all()
-    assert (merged._causes[field].index == data_right[field].index).all()
-    assert (merged._comments[field].index == data_right[field].index).all()
-
-    assert (merged._flags[field] == flagger.BAD).all()
-    assert (merged._causes[field] == "SaQCLeft").all(axis=None)
-    assert np.all(parseComments(merged._comments) == "testLeft")
-
-
-def test_sliceFlaggerDrop(data):
-    flagger = DmpFlagger().initFlags(data)
-    with pytest.raises(TypeError):
-        flagger.getFlags(field=data.columns, drop="var")
-
-    field = data.columns[0]
-    expected = data[data.columns.drop(field)].to_df()
-
-    filtered = flagger.slice(drop=field)
-
-    assert (filtered._flags.columns == expected.columns).all(axis=None)
-    assert (filtered._comments.columns == expected.columns).all(axis=None)
-    assert (filtered._causes.columns == expected.columns).all(axis=None)
-
-    assert (filtered._flags.to_df().index == expected.index).all(axis=None)
-    assert (filtered._comments.to_df().index == expected.index).all(axis=None)
-    assert (filtered._causes.to_df().index == expected.index).all(axis=None)
-
diff --git a/test/flagger/test_positionalflagger.py b/test/flagger/test_positionalflagger.py
deleted file mode 100644
index 45506a070104291cb8ac5780d043ee5f7df95844..0000000000000000000000000000000000000000
--- a/test/flagger/test_positionalflagger.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
-
-import pytest
-
-import numpy as np
-
-from test.common import initData
-
-PositionalFlagger = NotImplemented
-pytest.skip("PositionalFlagger is deprecated.", allow_module_level=True)
-
-@pytest.fixture
-def data():
-    return initData(cols=2)
-
-
-def test_initFlags(data):
-    flagger = PositionalFlagger().initFlags(data=data)
-    assert (flagger.isFlagged() == False).all(axis=None)
-    assert (flagger.flags == flagger.UNFLAGGED).all(axis=None)
-
-
-def test_setFlags(data):
-    flagger = PositionalFlagger().initFlags(data=data)
-
-    field = data.columns[0]
-    mask = np.zeros(len(data[field]), dtype=bool)
-    mask[1:10:2] = True
-
-    flagger = flagger.setFlags(field=field, loc=mask, flag=flagger.SUSPICIOUS)
-    assert (flagger.flags.loc[mask, field] == "91").all(axis=None)
-    assert (flagger.flags.loc[~mask, field] == "90").all(axis=None)
-
-    flagger = flagger.setFlags(field=field, loc=~mask, flag=flagger.BAD)
-    assert (flagger.flags.loc[~mask, field] == "902").all(axis=None)
-    assert (flagger.flags.loc[mask, field] == "910").all(axis=None)
-
-    assert (flagger.flags[data.columns[1]] == "-1").all(axis=None)
-
-
-def test_isFlagged(data):
-    flagger = PositionalFlagger().initFlags(data=data)
-    field = data.columns[0]
-
-    mask_sus = np.zeros(len(data[field]), dtype=bool)
-    mask_sus[1:20:2] = True
-    flagger = flagger.setFlags(field=field, loc=mask_sus, flag=flagger.SUSPICIOUS)
-    assert (flagger.isFlagged(field=field, comparator=">=", flag=flagger.SUSPICIOUS)[mask_sus] == True).all(axis=None)
-    assert (flagger.isFlagged(field=field, comparator=">", flag=flagger.SUSPICIOUS) == False).all(axis=None)
-
-    mask_bad = np.zeros(len(data[field]), dtype=bool)
-    mask_bad[1:10:2] = True
-    flagger = flagger.setFlags(field=field, loc=mask_bad, flag=flagger.BAD)
-    assert (flagger.isFlagged(field=field, comparator=">")[mask_sus] == True).all(axis=None)
-    assert (flagger.isFlagged(field=field, comparator=">=", flag=flagger.BAD)[mask_bad] == True).all(axis=None)
-    assert (flagger.isFlagged(field=field, comparator=">", flag=flagger.BAD) == False).all(axis=None)
diff --git a/test/run_pytest.py b/test/run_pytest.py
deleted file mode 100644
index 861cb7cc8beb38a2abc79b9f4e07c329fc157be8..0000000000000000000000000000000000000000
--- a/test/run_pytest.py
+++ /dev/null
@@ -1,4 +0,0 @@
-import pytest
-
-if __name__ == "__main__":
-    pytest.main()
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..4265cc3e6c16c09774190fa55d609cd9fe0808e4
--- /dev/null
+++ b/tests/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python
diff --git a/tests/common.py b/tests/common.py
new file mode 100644
index 0000000000000000000000000000000000000000..3e70ff349fb2ae082ef4a3b14b00c89f65a86a97
--- /dev/null
+++ b/tests/common.py
@@ -0,0 +1,44 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+
+import io
+import numpy as np
+import pandas as pd
+import dios
+
+from saqc.constants import *
+from saqc.flagger import Flagger, initFlagsLike
+
+
+TESTNODATA = (np.nan, -9999)
+TESTFLAGGER = (Flagger(),)
+
+
+def flagAll(data, field, flagger, **kwargs):
+    # NOTE: remember to rename flag -> flag_values
+    flagger.copy()
+    flagger[:, field] = BAD
+    return data, flagger
+
+
+def initData(cols=2, start_date="2017-01-01", end_date="2017-12-31", freq=None, rows=None):
+    if rows is None:
+        freq = freq or "1h"
+
+    di = dios.DictOfSeries(itype=dios.DtItype)
+    dates = pd.date_range(start=start_date, end=end_date, freq=freq, periods=rows)
+    dummy = np.arange(len(dates))
+
+    for col in range(1, cols + 1):
+        di[f"var{col}"] = pd.Series(data=dummy * col, index=dates)
+
+    return di
+
+
+def writeIO(content):
+    f = io.StringIO()
+    f.write(content)
+    f.seek(0)
+    return f
+
+
diff --git a/test/core/__init__.py b/tests/core/__init__.py
similarity index 100%
rename from test/core/__init__.py
rename to tests/core/__init__.py
diff --git a/test/core/test_core.py b/tests/core/test_core.py
similarity index 95%
rename from test/core/test_core.py
rename to tests/core/test_core.py
index 5527f2ee207eae5db9421a99e350642eb22f698d..b9773a4731aab4abb5373ca0569ce35237c9bd32 100644
--- a/test/core/test_core.py
+++ b/tests/core/test_core.py
@@ -2,19 +2,17 @@
 # -*- coding: utf-8 -*-
 
 import logging
-
 import pytest
 import numpy as np
 import pandas as pd
 
-
-from saqc.common import *
-from saqc.flagger import Flagger, initFlagsLike
+from saqc.constants import *
+from saqc.flagger import initFlagsLike
 from saqc.funcs import flagRange
 from saqc.lib import plotting as splot
-from test.common import initData, TESTFLAGGER, flagAll
 from saqc import SaQC, register
 
+from tests.common import initData, flagAll
 
 # no logging output needed here
 # -> can this be configured on the test runner level?
diff --git a/test/core/test_creation.py b/tests/core/test_creation.py
similarity index 100%
rename from test/core/test_creation.py
rename to tests/core/test_creation.py
diff --git a/test/core/test_reader.py b/tests/core/test_reader.py
similarity index 98%
rename from test/core/test_reader.py
rename to tests/core/test_reader.py
index ce8438effc43819e9cdbb8295619135372a8dedc..e2d80042bfb5a10400306f937300106dcd8b759e 100644
--- a/test/core/test_reader.py
+++ b/tests/core/test_reader.py
@@ -1,19 +1,18 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 
-from pathlib import Path
-
 import pytest
 import numpy as np
 import pandas as pd
 import dios
+from pathlib import Path
 
 from saqc.core.config import Fields as F
-from test.common import initData, writeIO
-
 from saqc.core.core import SaQC
 from saqc.core.register import FUNC_MAP, register
 
+from tests.common import initData, writeIO
+
 
 @pytest.fixture
 def data() -> dios.DictOfSeries:
diff --git a/test/funcs/conftest.py b/tests/fixtures.py
similarity index 74%
rename from test/funcs/conftest.py
rename to tests/fixtures.py
index abecdd3f21e7731ea61db24059169ec88fb72afb..8449ef6faf2bbd2756196eb15413c4c88d57ac5d 100644
--- a/test/funcs/conftest.py
+++ b/tests/fixtures.py
@@ -5,6 +5,11 @@ import pandas as pd
 from dios import DictOfSeries
 
 
+# TODO: this is odd
+#  Why not simple fixtures with talking-names,
+#  that also take parameter, if needed
+
+
 @pytest.fixture
 def char_dict():
     return {
@@ -18,10 +23,13 @@ def char_dict():
 
 @pytest.fixture
 def course_1(char_dict):
-    # MONOTONOUSLY ASCENDING/DESCENDING
-    # values , that monotonously ascend towards a peak level, and thereafter do monotonously decrease
-    # the resulting drop/raise per value equals:  (peak_level - initial_level) / (0.5*(periods-2))
-    # periods number better be even!
+    """
+    MONOTONOUSLY ASCENDING/DESCENDING
+
+    values , that monotonously ascend towards a peak level, and thereafter do monotonously decrease
+    the resulting drop/raise per value equals:  (peak_level - initial_level) / (0.5*(periods-2))
+    periods number better be even!
+    """
     def fix_funk(
             freq="10min",
             periods=10,
@@ -48,10 +56,14 @@ def course_1(char_dict):
 
 @pytest.fixture
 def course_2(char_dict):
+    """
+    SINGLE_SPIKE
+
+    values , that linearly  develop over the whole timeseries, from "initial_level" to "final_level", exhibiting
+    one "anomalous" or "outlierish" value of magnitude "out_val" at position "periods/2"
+    number of periods better be even!
+    """
     # SINGLE_SPIKE
-    # values , that linearly  develop over the whole timeseries, from "initial_level" to "final_level", exhibiting
-    # one "anomalous" or "outlierish" value of magnitude "out_val" at position "periods/2"
-    # number of periods better be even!
     def fix_funk(
             freq="10min",
             periods=10,
@@ -83,7 +95,11 @@ def course_2(char_dict):
 
 @pytest.fixture
 def course_test(char_dict):
-    # Test function for pattern detection - same as test pattern for first three values, than constant function
+    """
+    Test function for pattern detection
+
+    same as test pattern for first three values, than constant function
+    """
     def fix_funk(freq='1 D',
                  initial_index=pd.Timestamp(2000, 1, 1, 0, 0, 0), out_val=5, char_dict=char_dict):
         t_index = pd.date_range(initial_index, freq=freq, periods=100)
@@ -100,13 +116,16 @@ def course_test(char_dict):
 
 @pytest.fixture
 def course_3(char_dict):
-    # CROWD IN A PIT/CROWD ON A SUMMIT
-    # values , that linearly  develop over the whole timeseries, from "initial_level" to "final_level", exhibiting
-    # a "crowd" of "anomalous" or "outlierish" values of magnitude "out_val".
-    # The "crowd/group" of anomalous values starts at position "periods/2" and continues with an additional amount
-    # of "crowd_size" values, that are each spaced "crowd_spacing" minutes from there predecessors.
-    # number of periods better be even!
-    # chrowd_size * crowd_spacing better be less then freq[minutes].
+    """
+    CROWD IN A PIT/CROWD ON A SUMMIT
+
+    values , that linearly  develop over the whole timeseries, from "initial_level" to "final_level", exhibiting
+    a "crowd" of "anomalous" or "outlierish" values of magnitude "out_val".
+    The "crowd/group" of anomalous values starts at position "periods/2" and continues with an additional amount
+    of "crowd_size" values, that are each spaced "crowd_spacing" minutes from there predecessors.
+    number of periods better be even!
+    chrowd_size * crowd_spacing better be less then freq[minutes].
+    """
     def fix_funk(
             freq="10min",
             periods=10,
@@ -148,9 +167,13 @@ def course_3(char_dict):
 
 @pytest.fixture
 def course_4(char_dict):
-    # TEETH (ROW OF SPIKES) values , that remain on value level "base_level" and than begin exposing an outlierish or
-    # spikey value of magnitude "out_val" every second timestep, starting at periods/2, with the first spike. number
-    # of periods better be even!
+    """
+    TEETH (ROW OF SPIKES) values
+
+    , that remain on value level "base_level" and than begin exposing an outlierish or
+    spikey value of magnitude "out_val" every second timestep, starting at periods/2, with the first spike. number
+    of periods better be even!
+    """
 
     def fix_funk(
             freq="10min",
@@ -174,11 +197,14 @@ def course_4(char_dict):
 
 @pytest.fixture
 def course_5(char_dict):
-    # NAN_holes
-    # values , that ascend from initial_level to final_level linearly and have missing data(=nan)
-    # at posiiotns "nan_slice", (=a slice or a list, for iloc indexing)
-    # periods better be even!
-    # periods better be greater 5
+    """
+    NAN_holes
+
+    values , that ascend from initial_level to final_level linearly and have missing data(=nan)
+    at positions "nan_slice", (=a slice or a list, for iloc indexing)
+    periods better be even!
+    periods better be greater 5
+    """
 
     def fix_funk(
             freq="10min",
diff --git a/test/__init__.py b/tests/flagger/__init__.py
similarity index 100%
rename from test/__init__.py
rename to tests/flagger/__init__.py
diff --git a/test/flagger/test_flagger.py b/tests/flagger/test_flagger.py
similarity index 99%
rename from test/flagger/test_flagger.py
rename to tests/flagger/test_flagger.py
index 158baaae8b42f78cfa3be5378a59b09cc0270d22..1af9f47106458bcdfe1c2016d43c15f22a630901 100644
--- a/test/flagger/test_flagger.py
+++ b/tests/flagger/test_flagger.py
@@ -7,7 +7,10 @@ from pandas.api.types import is_bool_dtype
 
 import dios
 
-from test.common import TESTFLAGGER, initData
+from tests.common import TESTFLAGGER, initData
+
+
+pytestmark = pytest.mark.skip('old flagger tests - rewrite needed')
 
 
 def _getDataset(rows, cols):
diff --git a/test/flagger/test_flags.py b/tests/flagger/test_flags.py
similarity index 91%
rename from test/flagger/test_flags.py
rename to tests/flagger/test_flags.py
index 83c156011099db48ced9d0e4d520fb64320fad31..db40b7e6c013ea13d8fe88f8b8050cda795432a5 100644
--- a/test/flagger/test_flags.py
+++ b/tests/flagger/test_flags.py
@@ -4,12 +4,13 @@ import pytest
 import numpy as np
 import pandas as pd
 
-from saqc import BAD, UNFLAGGED
-from test.flagger.test_history import (
+from saqc.constants import *
+from saqc.flagger.flags import Flags
+
+from tests.flagger.test_history import (
     History,
     is_equal as hist_equal,
 )
-from saqc.flagger.flags import Flags
 
 _data = [
 
@@ -181,11 +182,17 @@ def test_set_flags_with_mask(data: np.array):
         assert all(flags[c].loc[mask] == 444.)
         assert all(flags[c].loc[~mask] != 444.)
 
-        # test length miss-match
-        if len(vector):
-            vector = vector[:-1]
+        # test length miss-match (mask)
+        if len(mask) > 1:
+            wrong_len = mask[:-1]
             with pytest.raises(ValueError):
-                flags[mask, c] = vector
+                flags[wrong_len, c] = vector
+
+        # test length miss-match (value)
+        if len(vector) > 1:
+            wrong_len = vector[:-1]
+            with pytest.raises(ValueError):
+                flags[mask, c] = wrong_len
 
 
 @pytest.mark.parametrize('data', data)
@@ -215,6 +222,12 @@ def test_set_flags_with_index(data: np.array):
         assert all(flags[c].loc[mask] == 444.)
         assert all(flags[c].loc[~mask] != 444.)
 
+        # test length miss-match (value)
+        if len(vector) > 1:
+            wrong_len = vector[:-1]
+            with pytest.raises(ValueError):
+                flags[index, c] = wrong_len
+
 
 def test_cache():
     arr = np.array([
diff --git a/test/flagger/test_history.py b/tests/flagger/test_history.py
similarity index 99%
rename from test/flagger/test_history.py
rename to tests/flagger/test_history.py
index d6a0848272a7f87683556d41bf46518db12e034b..5a95585c0ecac7d70eea941148d7bfef6003918a 100644
--- a/test/flagger/test_history.py
+++ b/tests/flagger/test_history.py
@@ -3,6 +3,7 @@
 import pytest
 import numpy as np
 import pandas as pd
+
 from saqc.flagger.history import History
 
 # see #GH143 combined backtrack
diff --git a/test/funcs/__init__.py b/tests/funcs/__init__.py
similarity index 100%
rename from test/funcs/__init__.py
rename to tests/funcs/__init__.py
diff --git a/test/funcs/test_constants_detection.py b/tests/funcs/test_constants_detection.py
similarity index 90%
rename from test/funcs/test_constants_detection.py
rename to tests/funcs/test_constants_detection.py
index b7cabb50efe51a97a5c9bab70b04e7156943ba23..da7b83836f9f38581a8480bde07a97cc0bff8757 100644
--- a/test/funcs/test_constants_detection.py
+++ b/tests/funcs/test_constants_detection.py
@@ -4,9 +4,11 @@
 import pytest
 import numpy as np
 
+from saqc.constants import *
 from saqc.funcs.constants import flagConstants, flagByVariance
+from saqc.flagger import initFlagsLike
 
-from test.common import initData, initFlagsLike, BAD
+from tests.common import initData
 
 
 @pytest.fixture
diff --git a/test/funcs/test_functions.py b/tests/funcs/test_functions.py
similarity index 93%
rename from test/funcs/test_functions.py
rename to tests/funcs/test_functions.py
index 1a56f8e8af9e62babcd6ea08ff2c6703142d7770..47c8ae9d22f70bb4ecb5f489bc70f69f4ade723e 100644
--- a/test/funcs/test_functions.py
+++ b/tests/funcs/test_functions.py
@@ -1,20 +1,19 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 
-import pytest
-import pandas as pd
-import numpy as np
 import dios
 
-from saqc.common import *
-from saqc.flagger import Flagger, initFlagsLike
+from saqc.constants import *
+from saqc.flagger import initFlagsLike
 from saqc.funcs.drift import flagDriftFromNorm, flagDriftFromReference, flagDriftFromScaledNorm
 from saqc.funcs.outliers import flagCrossStatistic, flagRange
 from saqc.funcs.flagtools import flagManual, forceFlags, clearFlags
 from saqc.funcs.tools import drop, copy, mask
 from saqc.funcs.resampling import reindexFlags
 from saqc.funcs.breaks import flagIsolated
-from test.common import initData, TESTFLAGGER
+
+from tests.fixtures import *
+from tests.common import initData
 
 
 @pytest.fixture
@@ -37,7 +36,6 @@ def test_flagRange(data, field):
 
 
 def test_flagSesonalRange(data, field):
-    # prepare
     data.iloc[::2] = 0
     data.iloc[1::2] = 50
     nyears = len(data[field].index.year.unique())
@@ -84,27 +82,35 @@ def test_forceFlags(data, field):
     assert all(flagger[field] == DOUBT)
 
 
-# TODO: @luenensc: i dont get the test -- palmb
 def test_flagIsolated(data, field):
     flagger = initFlagsLike(data)
 
     data.iloc[1:3, 0] = np.nan
     data.iloc[4:5, 0] = np.nan
+    flagger[data[field].index[5:6], field] = BAD
     data.iloc[11:13, 0] = np.nan
     data.iloc[15:17, 0] = np.nan
 
-    s = data[field].iloc[5:6]
-    flagger[s.index, field] = BAD
+    #              data  flags
+    # 2016-01-01   0.0   -inf
+    # 2016-01-02   NaN   -inf
+    # 2016-01-03   NaN   -inf
+    # 2016-01-04   3.0   -inf
+    # 2016-01-05   NaN   -inf
+    # 2016-01-06   5.0  255.0
+    # 2016-01-07   6.0   -inf
+    # 2016-01-08   7.0   -inf
+    #         ..    ..     ..
 
     _, flagger_result = flagIsolated(data, field, flagger, group_window="1D", gap_window="2.1D", flag=BAD)
 
-    assert flagger_result[field][slice(3, 6, 2)].all()
+    assert flagger_result[field].iloc[[3, 5]].all()
 
     data, flagger_result = flagIsolated(
         data, field, flagger_result,
         group_window="2D", gap_window="2.1D", continuation_range="1.1D", flag=BAD
     )
-    assert flagger_result[field][[3, 5, 13, 14]].all()
+    assert flagger_result[field].iloc[[3, 5, 13, 14]].all()
 
 
 @pytest.mark.parametrize("dat", [pytest.lazy_fixture("course_2")])
diff --git a/test/funcs/test_generic_api_functions.py b/tests/funcs/test_generic_api_functions.py
similarity index 94%
rename from test/funcs/test_generic_api_functions.py
rename to tests/funcs/test_generic_api_functions.py
index 950dbfd7f4f1411a36819c1ad7eab14510bef729..8c3ce15ff3289c440d0e37a6254e26371ced22b8 100644
--- a/test/funcs/test_generic_api_functions.py
+++ b/tests/funcs/test_generic_api_functions.py
@@ -1,17 +1,16 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
-import ast
 
 import pytest
-import numpy as np
 import pandas as pd
 
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import register
-from saqc import SaQC
 from saqc.funcs.tools import mask
+from saqc import SaQC
+
+from tests.common import initData, flagAll
 
-from test.common import initData, flagAll
 
 register(masking='field')(flagAll)
 
diff --git a/test/funcs/test_generic_config_functions.py b/tests/funcs/test_generic_config_functions.py
similarity index 86%
rename from test/funcs/test_generic_config_functions.py
rename to tests/funcs/test_generic_config_functions.py
index 7677c3c279d30af1c2ac2348d9ec50251af2f74c..fe8242cd2662708c428a40cefc376867ab2621a8 100644
--- a/test/funcs/test_generic_config_functions.py
+++ b/tests/funcs/test_generic_config_functions.py
@@ -2,22 +2,20 @@
 # -*- coding: utf-8 -*-
 
 import ast
-
 import pytest
 import numpy as np
 import pandas as pd
+import dios
 
-from dios import DictOfSeries
-
-from test.common import TESTFLAGGER, TESTNODATA, initData, writeIO
-
-from saqc.common import *
+from saqc.constants import *
 from saqc.flagger import Flagger, initFlagsLike
 from saqc.core.visitor import ConfigFunctionParser
 from saqc.core.config import Fields as F
 from saqc.core.register import register
-from saqc import SaQC
 from saqc.funcs.generic import _execGeneric
+from saqc import SaQC
+
+from tests.common import TESTNODATA, initData, writeIO
 
 
 @pytest.fixture
@@ -32,7 +30,7 @@ def data_diff():
     col1 = data[data.columns[1]]
     mid = len(col0) // 2
     offset = len(col0) // 8
-    return DictOfSeries(data={col0.name: col0.iloc[: mid + offset], col1.name: col1.iloc[mid - offset :],})
+    return dios.DictOfSeries(data={col0.name: col0.iloc[: mid + offset], col1.name: col1.iloc[mid - offset :],})
 
 
 def _compileGeneric(expr, flagger):
@@ -41,8 +39,8 @@ def _compileGeneric(expr, flagger):
     return kwargs["func"]
 
 
-@pytest.mark.parametrize("flagger", TESTFLAGGER)
-def test_missingIdentifier(data, flagger):
+def test_missingIdentifier(data):
+    flagger = Flagger()
 
     # NOTE:
     # - the error is only raised at runtime during parsing would be better
@@ -57,9 +55,8 @@ def test_missingIdentifier(data, flagger):
             _execGeneric(flagger, data, func, field="", nodata=np.nan)
 
 
-@pytest.mark.parametrize("flagger", TESTFLAGGER)
-def test_syntaxError(flagger):
-
+def test_syntaxError():
+    flagger = Flagger()
     tests = [
         "range(x=5",
         "rangex=5)",
@@ -106,8 +103,7 @@ def test_comparisonOperators(data):
         assert np.all(result == expected)
 
 
-@pytest.mark.parametrize("flagger", TESTFLAGGER)
-def test_arithmeticOperators(data, flagger):
+def test_arithmeticOperators(data):
     flagger = initFlagsLike(data)
     var1, *_ = data.columns
     this = data[var1]
@@ -127,8 +123,7 @@ def test_arithmeticOperators(data, flagger):
         assert np.all(result == expected)
 
 
-@pytest.mark.parametrize("flagger", TESTFLAGGER)
-def test_nonReduncingBuiltins(data, flagger):
+def test_nonReduncingBuiltins(data):
     flagger = initFlagsLike(data)
     var1, *_ = data.columns
     this = var1
@@ -147,10 +142,8 @@ def test_nonReduncingBuiltins(data, flagger):
         assert (result == expected).all()
 
 
-@pytest.mark.parametrize("flagger", TESTFLAGGER)
 @pytest.mark.parametrize("nodata", TESTNODATA)
-def test_reduncingBuiltins(data, flagger, nodata):
-
+def test_reduncingBuiltins(data, nodata):
     data.loc[::4] = nodata
     flagger = initFlagsLike(data)
     var1 = data.columns[0]
@@ -171,10 +164,10 @@ def test_reduncingBuiltins(data, flagger, nodata):
         assert result == expected
 
 
-@pytest.mark.parametrize("flagger", TESTFLAGGER)
 @pytest.mark.parametrize("nodata", TESTNODATA)
-def test_ismissing(data, flagger, nodata):
+def test_ismissing(data, nodata):
 
+    flagger = initFlagsLike(data)
     data.iloc[: len(data) // 2, 0] = np.nan
     data.iloc[(len(data) // 2) + 1 :, 0] = -9999
     this = data.iloc[:, 0]
@@ -190,9 +183,8 @@ def test_ismissing(data, flagger, nodata):
         assert np.all(result == expected)
 
 
-@pytest.mark.parametrize("flagger", TESTFLAGGER)
 @pytest.mark.parametrize("nodata", TESTNODATA)
-def test_bitOps(data, flagger, nodata):
+def test_bitOps(data, nodata):
     var1, var2, *_ = data.columns
     this = var1
 
@@ -220,14 +212,26 @@ def test_isflagged(data):
         (f"isflagged({var1})", flagger[var1] > UNFLAGGED),
         (f"isflagged({var1}, flag=BAD)", flagger[var1] >= BAD),
         (f"isflagged({var1}, UNFLAGGED, '==')", flagger[var1] == UNFLAGGED),
-        (f"~isflagged({var2})", ~(flagger[var2] > UNFLAGGED)),
-        (f"~({var2}>999) & (~isflagged({var2}))", ~(data[var2] > 999) & ~(flagger[var2] > UNFLAGGED)),
+        (f"~isflagged({var2})", flagger[var2] == UNFLAGGED),
+        (f"~({var2}>999) & (~isflagged({var2}))", ~(data[var2] > 999) & (flagger[var2] == UNFLAGGED)),
     ]
 
-    for test, expected in tests:
-        func = _compileGeneric(f"generic.flag(func={test}, flag=BAD)", flagger)
-        result = _execGeneric(flagger, data, func, field=None, nodata=np.nan)
-        assert np.all(result == expected)
+    for i, (test, expected) in enumerate(tests):
+        try:
+            func = _compileGeneric(f"generic.flag(func={test}, flag=BAD)", flagger)
+            result = _execGeneric(flagger, data, func, field=None, nodata=np.nan)
+            assert np.all(result == expected)
+        except Exception:
+            print(i, test)
+            raise
+
+    # test bad combination
+    for comp in ['>', '>=', '==', '!=', '<', '<=']:
+        fails = f"isflagged({var1}, comparator='{comp}')"
+
+        func = _compileGeneric(f"generic.flag(func={fails}, flag=BAD)", flagger)
+        with pytest.raises(ValueError):
+            _execGeneric(flagger, data, func, field=None, nodata=np.nan)
 
 
 def test_variableAssignments(data):
@@ -249,6 +253,7 @@ def test_variableAssignments(data):
     assert set(result_flagger.columns) == set(data.columns) | {"dummy1", "dummy2"}
 
 
+# TODO: why this must(!) fail ? - a comment would be helpful
 @pytest.mark.xfail(strict=True)
 def test_processMultiple(data_diff):
     var1, var2, *_ = data_diff.columns
diff --git a/test/funcs/test_harm_funcs.py b/tests/funcs/test_harm_funcs.py
similarity index 99%
rename from test/funcs/test_harm_funcs.py
rename to tests/funcs/test_harm_funcs.py
index d0e72553fd130392c1a2e0278cf5697aa657192e..0675b3aeba610a4e398af4a755becb79277ffee2 100644
--- a/test/funcs/test_harm_funcs.py
+++ b/tests/funcs/test_harm_funcs.py
@@ -4,7 +4,6 @@
 
 # see test/functs/conftest.py for global fixtures "course_..."
 import pytest
-
 import numpy as np
 import pandas as pd
 import dios
diff --git a/test/funcs/test_modelling.py b/tests/funcs/test_modelling.py
similarity index 87%
rename from test/funcs/test_modelling.py
rename to tests/funcs/test_modelling.py
index 00ba8a8810b5d25f6b0ce36e29558116e845bab6..6d99d5786e6a2d3e420aa793a7e0c2baf1dde2f8 100644
--- a/test/funcs/test_modelling.py
+++ b/tests/funcs/test_modelling.py
@@ -2,20 +2,16 @@
 # -*- coding: utf-8 -*-
 
 
-# see test/functs/conftest.py for global fixtures "course_..."
+# see test/functs/fixtures.py for global fixtures "course_..."
 
-import pytest
-
-import numpy as np
-import pandas as pd
 import dios
 
-from test.common import TESTFLAGGER
-
-
 from saqc.funcs.tools import mask
 from saqc.funcs.residues import calculatePolynomialResidues, calculateRollingResidues
 
+from tests.fixtures import *
+from tests.common import TESTFLAGGER
+
 TF = TESTFLAGGER[:1]
 
 
@@ -45,8 +41,8 @@ def test_modelling_rollingMean_forRegular(dat, flagger):
     data, _ = dat(freq="10min", periods=30, initial_level=0, final_level=100, out_val=-100)
     data = dios.DictOfSeries(data)
     flagger = flagger.initFlags(data)
-    calculateRollingResidues(data, "data", flagger, 5,  func=np.mean, eval_flags=True, min_periods=0, center=True)
-    calculateRollingResidues(data, "data", flagger, 5,  func=np.mean, eval_flags=True, min_periods=0, center=False)
+    calculateRollingResidues(data, "data", flagger, 5, func=np.mean, eval_flags=True, min_periods=0, center=True)
+    calculateRollingResidues(data, "data", flagger, 5, func=np.mean, eval_flags=True, min_periods=0, center=False)
 
 
 @pytest.mark.parametrize("flagger", TF)
@@ -74,4 +70,4 @@ def test_modelling_mask(dat, flagger):
     flagger = flagger.initFlags(data)
     data_masked, flagger_masked = mask(data, "data", flagger, mode='mask_var', mask_var="mask_ser")
     flaggs = flagger_masked._flags["data"]
-    assert flaggs[data_masked['mask_ser']].isna().all()
\ No newline at end of file
+    assert flaggs[data_masked['mask_ser']].isna().all()
diff --git a/test/funcs/test_pattern_rec.py b/tests/funcs/test_pattern_rec.py
similarity index 91%
rename from test/funcs/test_pattern_rec.py
rename to tests/funcs/test_pattern_rec.py
index 0763a82f04b3af2ed0d47d8c5c024b720a13f5f4..b434e3c240e34c2ed71ab1bf6520ca7dfec38300 100644
--- a/test/funcs/test_pattern_rec.py
+++ b/tests/funcs/test_pattern_rec.py
@@ -2,15 +2,13 @@
 # -*- coding: utf-8 -*-
 
 import pytest
-
 import pandas as pd
+import dios
 
-from dios import dios
-
-from saqc.common import *
-from saqc.flagger import Flagger, initFlagsLike
+from saqc.constants import *
+from saqc.flagger import initFlagsLike
 from saqc.funcs.pattern import *
-from test.common import initData
+from tests.common import initData
 
 
 @pytest.fixture
diff --git a/test/funcs/test_proc_functions.py b/tests/funcs/test_proc_functions.py
similarity index 94%
rename from test/funcs/test_proc_functions.py
rename to tests/funcs/test_proc_functions.py
index a7c99fc775361bb9711ca7d11f2522e6eebe32c4..d7cada07858fc9f9e1d8d11d70f6785313295e7e 100644
--- a/test/funcs/test_proc_functions.py
+++ b/tests/funcs/test_proc_functions.py
@@ -2,23 +2,19 @@
 # -*- coding: utf-8 -*-
 
 
-# see test/functs/conftest.py for global fixtures "course_..."
+# see test/functs/fixtures.py for global fixtures "course_..."
 
-import pytest
-import numpy as np
-import pandas as pd
 import dios
 
-from saqc.funcs.transformation import (
-    transform
-)
+from saqc.constants import *
+from saqc.funcs.transformation import transform
 from saqc.funcs.drift import correctOffset
 from saqc.funcs.interpolation import interpolateByRolling, interpolateInvalid, interpolateIndex
 from saqc.funcs.resampling import resample
 from saqc.lib.ts_operators import linearInterpolation, polynomialInterpolation
-from saqc.common import *
 
-from test.common import TESTFLAGGER
+from tests.fixtures import *
+from tests.common import TESTFLAGGER
 
 
 @pytest.mark.parametrize("flagger", TESTFLAGGER)
diff --git a/test/funcs/test_spikes_detection.py b/tests/funcs/test_spikes_detection.py
similarity index 91%
rename from test/funcs/test_spikes_detection.py
rename to tests/funcs/test_spikes_detection.py
index be38370e332fd6a2929e8d869fada1314dc858ae..faa25606811d8acb7a74a73b9bf5c9a811e0982e 100644
--- a/test/funcs/test_spikes_detection.py
+++ b/tests/funcs/test_spikes_detection.py
@@ -1,11 +1,9 @@
 #! /usr/bin/env python
 # -*- coding: utf-8 -*-
 
-# see test/functs/conftest.py for global fixtures "course_..."
-import pytest
-import numpy as np
-import pandas as pd
+# see test/functs/fixtures.py for global fixtures "course_..."
 import dios
+from tests.fixtures import *
 
 from saqc.funcs.outliers import (
     flagMAD,
@@ -14,10 +12,8 @@ from saqc.funcs.outliers import (
     flagMVScores,
     flagByGrubbs,
 )
-
-from test.common import TESTFLAGGER
-from saqc.common import *
-from saqc.flagger import Flagger, initFlagsLike
+from saqc.constants import *
+from saqc.flagger import initFlagsLike
 
 
 @pytest.fixture(scope="module")
@@ -50,7 +46,7 @@ def test_flagSpikesBasic(spiky_data):
     assert test_sum == len(spiky_data[1])
 
 
-# see test/functs/conftest.py for the 'course_N'
+# see test/functs/fixtures.py for the 'course_N'
 @pytest.mark.parametrize(
     "dat",
     [
@@ -73,7 +69,7 @@ def test_flagSpikesLimitRaise(dat):
     assert not np.any(flagger_result[field][characteristics["drop"]] > UNFLAGGED)
 
 
-# see test/functs/conftest.py for the 'course_N'
+# see test/functs/fixtures.py for the 'course_N'
 @pytest.mark.parametrize("dat", [pytest.lazy_fixture("course_3")])
 def test_flagMultivarScores(dat):
     data1, characteristics = dat(periods=1000, initial_level=5, final_level=15, out_val=50)
diff --git a/tests/fuzzy/__init__.py b/tests/fuzzy/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..4265cc3e6c16c09774190fa55d609cd9fe0808e4
--- /dev/null
+++ b/tests/fuzzy/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python
diff --git a/test/common.py b/tests/fuzzy/init.py
similarity index 80%
rename from test/common.py
rename to tests/fuzzy/init.py
index f774cd5ed17f09447b7ffdc6344a43f2b522bca2..ad93f02c6ceecb966ce578656b6c63d8e8044642 100644
--- a/test/common.py
+++ b/tests/fuzzy/init.py
@@ -1,12 +1,11 @@
-#! /usr/bin/env python
-# -*- coding: utf-8 -*-
+#!/usr/bin/env python
 
-import io
-from typing import get_type_hints
 
+import numbers
+import dios
 import numpy as np
 import pandas as pd
-import dios
+from typing import get_type_hints
 
 from hypothesis.strategies import (
     lists,
@@ -22,48 +21,14 @@ from hypothesis.strategies import (
 from hypothesis.extra.numpy import arrays, from_dtype
 from hypothesis.strategies._internal.types import _global_type_lookup
 
-from dios import DictOfSeries
-
-from saqc.common import *
+from saqc.constants import *
 from saqc.core.register import FUNC_MAP
 from saqc.core.lib import SaQCFunction
 from saqc.lib.types import FreqString, ColumnName, IntegerWindow
 from saqc.flagger import Flagger, initFlagsLike
 
-
-TESTNODATA = (np.nan, -9999)
-TESTFLAGGER = (Flagger(),)
-
-
-def flagAll(data, field, flagger, **kwargs):
-    # NOTE: remember to rename flag -> flag_values
-    flagger.copy()
-    flagger[:, field] = BAD
-    return data, flagger
-
-
-def initData(cols=2, start_date="2017-01-01", end_date="2017-12-31", freq=None, rows=None):
-    if rows is None:
-        freq = freq or "1h"
-
-    di = dios.DictOfSeries(itype=dios.DtItype)
-    dates = pd.date_range(start=start_date, end=end_date, freq=freq, periods=rows)
-    dummy = np.arange(len(dates))
-
-    for col in range(1, cols + 1):
-        di[f"var{col}"] = pd.Series(data=dummy * col, index=dates)
-
-    return di
-
-
-def writeIO(content):
-    f = io.StringIO()
-    f.write(content)
-    f.seek(0)
-    return f
-
-
-MAX_EXAMPLES = 50 #100000
+MAX_EXAMPLES = 50
+# MAX_EXAMPLES = 100000
 
 
 @composite
@@ -83,9 +48,8 @@ def dioses(draw, min_cols=1):
         c: draw(dataSeries(min_size=3))
         for c in cols
     }
-    return DictOfSeries(columns)
+    return dios.DictOfSeries(columns)
 
-import numbers
 
 @composite
 def dataSeries(draw, min_size=0, max_size=100, dtypes=("float32", "float64", "int32", "int64")):
@@ -100,7 +64,7 @@ def dataSeries(draw, min_size=0, max_size=100, dtypes=("float32", "float64", "in
     else:
         raise ValueError("only numerical dtypes are supported")
     # we don't want to fail just because of overflows
-    elements = from_dtype(dtype, min_value=info.min+1, max_value=info.max-1)
+    elements = from_dtype(dtype, min_value=info.min + 1, max_value=info.max - 1)
 
     index = draw(daterangeIndexes(min_size=min_size, max_size=max_size))
     values = draw(arrays(dtype=dtype, elements=elements, shape=len(index)))
@@ -117,16 +81,15 @@ def flaggers(draw, data):
     """
     initialize a flagger and set some flags
     """
-    # flagger = draw(sampled_from(TESTFLAGGER)).initFlags(data)
     flagger = initFlagsLike(data)
     for col, srs in data.items():
-        loc_st = lists(sampled_from(sorted(srs.index)), unique=True, max_size=len(srs)-1)
+        loc_st = lists(sampled_from(sorted(srs.index)), unique=True, max_size=len(srs) - 1)
         flagger[draw(loc_st), col] = BAD
     return flagger
 
 
 @composite
-def functions(draw, module: str=None):
+def functions(draw, module: str = None):
     samples = tuple(FUNC_MAP.values())
     if module:
         samples = tuple(f for f in samples if f.name.startswith(module))
@@ -151,6 +114,7 @@ def frequencyStrings(draw, _):
     value = f"{mult}{freq}"
     return value
 
+
 @composite
 def dataFieldFlagger(draw):
     data = draw(dioses())
@@ -160,7 +124,7 @@ def dataFieldFlagger(draw):
 
 
 @composite
-def functionCalls(draw, module: str=None):
+def functionCalls(draw, module: str = None):
     func = draw(functions(module))
     kwargs = draw(functionKwargs(func))
     return func, kwargs
diff --git a/tests/fuzzy/test_functions.py b/tests/fuzzy/test_functions.py
new file mode 100644
index 0000000000000000000000000000000000000000..09d1f8484c28e8a47d82d747921dcdb764b69b7a
--- /dev/null
+++ b/tests/fuzzy/test_functions.py
@@ -0,0 +1,115 @@
+#! /usr/bin/env python
+# -*- coding: utf-8 -*-
+
+
+from hypothesis import given, settings
+from hypothesis.strategies import data, from_type
+
+from saqc.core.register import FUNC_MAP
+from tests.fuzzy.init import MAX_EXAMPLES, functionKwargs
+
+
+@settings(max_examples=MAX_EXAMPLES, deadline=None)
+@given(drawer=data())
+def callWontBreak(drawer, func_name: str):
+    func = FUNC_MAP[func_name]
+    kwargs = drawer.draw(functionKwargs(func))
+
+    # TODO: workaround until `flag` is explicitly exposed in signature
+    flag = drawer.draw(from_type(float))
+    kwargs.setdefault('flag', flag)
+
+    func(**kwargs)
+
+
+# breaks
+# ------
+
+# NOTE:
+# needs a more elaborated test, as it calls into
+# `changepoints.assignChangePointClusters`
+def test_breaks_flagJumps():
+    callWontBreak("breaks.flagJumps")
+
+
+def test_breaks_flagIsolated():
+    callWontBreak("breaks.flagIsolated")
+
+
+def test_breaks_flagMissing():
+    callWontBreak("breaks.flagMissing")
+
+
+# constants
+# ---------
+
+def test_constats_flagConstats():
+    callWontBreak("constants.flagConstants")
+
+
+def test_constants_flagByVariance():
+    callWontBreak("constants.flagByVariance")
+
+
+# flagtools
+# ---------
+
+def test_flagtools_clearFlags():
+    callWontBreak("flagtools.clearFlags")
+
+
+def test_flagtools_forceFlags():
+    callWontBreak("flagtools.clearFlags")
+
+
+# NOTE:
+# all of the following tests fail to sample data for `flag=typing.Any`
+# with the new flagger in place this should be easy to fix
+def test_flagtools_flagGood():
+    callWontBreak("flagtools.flagGood")
+
+
+def test_flagtools_flagUnflagged():
+    callWontBreak("flagtools.flagUnflagged")
+
+
+# NOTE: the problem is `mflag` which can be Any
+# def test_flagtools_flagManual():
+#     callWontBreak("flagtools.flagManual")
+
+
+# outliers
+# --------
+#
+# NOTE: needs a more elaborated test, I guess
+# def test_outliers_flagByStray():
+#     callWontBreak("outliers.flagByStray")
+
+
+# NOTE: fails in a strategy, maybe `Sequence[ColumnName]`
+# def test_outliers_flagMVScores():
+#     callWontBreak("outliers.flagMVScores")
+
+
+# NOTE:
+# fails as certain combinations of frquency strings don't make sense
+# a more elaborate test is needed
+# def test_outliers_flagRaise():
+#     callWontBreak("outliers.flagRaise")
+#
+#
+# def test_outliers_flagMAD():
+#     callWontBreak("outliers.flagMAD")
+#
+#
+# def test_outliers_flagByGrubbs():
+#     callWontBreak("outliers.flagByGrubbs")
+#
+#
+# def test_outliers_flagRange():
+#     callWontBreak("outliers.flagRange")
+
+
+# NOTE: fails in a strategy, maybe `Sequence[ColumnName]`
+# def test_outliers_flagCrossStatistic():
+#     callWontBreak("outliers.flagCrossStatistic")
diff --git a/test/core/test_masking.py b/tests/fuzzy/test_masking.py
similarity index 96%
rename from test/core/test_masking.py
rename to tests/fuzzy/test_masking.py
index 6236a55e2a0677ea59cbee6eb6ebaeca977838bd..cc763709912bb5c0777edd2e2823280e2e019ba3 100644
--- a/test/core/test_masking.py
+++ b/tests/fuzzy/test_masking.py
@@ -6,17 +6,12 @@ import logging
 import pandas as pd
 
 from hypothesis import given, settings
-from hypothesis.strategies import (
-    sampled_from,
-    composite,
-    sampled_from,
-)
-
-from saqc.common import *
-from saqc.flagger import Flagger, initFlagsLike
+
+from saqc.constants import *
+from saqc.flagger import Flagger
 from saqc.core.register import _maskData, _unmaskData
 
-from test.common import dataFieldFlagger, MAX_EXAMPLES
+from tests.fuzzy.init import dataFieldFlagger, MAX_EXAMPLES
 
 
 logging.disable(logging.CRITICAL)
diff --git a/tests/lib/__init__.py b/tests/lib/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..4265cc3e6c16c09774190fa55d609cd9fe0808e4
--- /dev/null
+++ b/tests/lib/__init__.py
@@ -0,0 +1 @@
+#!/usr/bin/env python
diff --git a/test/lib/test_rolling.py b/tests/lib/test_rolling.py
similarity index 100%
rename from test/lib/test_rolling.py
rename to tests/lib/test_rolling.py