annotate tests/_test_context.py @ 668:fd0d759b11ff

===== Added signature for changeset f5d1679896d0
author Franz Glasner <fzglas.hg@dom66.de>
date Fri, 03 Jun 2022 09:09:47 +0200
parents 75ecbe07abff
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
619
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
2 r"""Automatic unittest context configuration
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
3
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
4 """
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
5
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
6 import sys
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
7 import os
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
8
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
9 sys.path.insert(
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
10 0,
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
11 os.path.abspath(
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
12 os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))))
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
13
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
14
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
15 TESTDATADIR = os.path.join(
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
16 os.path.abspath(os.path.dirname(__file__)),
75ecbe07abff Introduct a test context to more easily switch between some unittest configurations
Franz Glasner <f.glasner@feldmann-mg.com>
parents:
diff changeset
17 "data")