tests: simplify tests for my.core.serialize a bit and simplify tox file
This commit is contained in:
parent
3aebc573e8
commit
65dbdc44ef
6 changed files with 109 additions and 88 deletions
22
my/core/pytest.py
Normal file
22
my/core/pytest.py
Normal file
|
@ -0,0 +1,22 @@
|
|||
"""
|
||||
Helpers to prevent depending on pytest in runtime
|
||||
"""
|
||||
|
||||
from .common import assert_subpackage; assert_subpackage(__name__)
|
||||
|
||||
import sys
|
||||
import typing
|
||||
|
||||
under_pytest = 'pytest' in sys.modules
|
||||
|
||||
if typing.TYPE_CHECKING or under_pytest:
|
||||
import pytest
|
||||
|
||||
parametrize = pytest.mark.parametrize
|
||||
else:
|
||||
|
||||
def parametrize(*args, **kwargs):
|
||||
def wrapper(f):
|
||||
return f
|
||||
|
||||
return wrapper
|
Loading…
Add table
Add a link
Reference in a new issue