Mercurial > hgrepos > Python > libs > ConfigMix
diff tests/test.py @ 619:75ecbe07abff
Introduct a test context to more easily switch between some unittest configurations
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Thu, 13 Jan 2022 11:39:38 +0100 |
| parents | 36d7aa000435 |
| children | f167f8db4624 |
line wrap: on
line diff
--- a/tests/test.py Wed Jan 12 13:44:12 2022 +0100 +++ b/tests/test.py Thu Jan 13 11:39:38 2022 +0100 @@ -1,15 +1,11 @@ # -*- coding: utf-8 -*- -import sys -import os import unittest import platform import io +import os -sys.path.insert( - 0, - os.path.abspath( - os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))) +from _test_context import TESTDATADIR import configmix import configmix.ini @@ -21,11 +17,6 @@ from configmix.compat import u, PY2 -TESTDATADIR = os.path.join( - os.path.abspath(os.path.dirname(__file__)), - "data") - - class T01Basic(unittest.TestCase): """Check with low-level internal interfaces"""
