Mercurial > hgrepos > Python > libs > ConfigMix
annotate tests/_test_context.py @ 735:b01d76710ddb
Changes
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 27 Oct 2023 09:32:40 +0200 |
| parents | 75ecbe07abff |
| children |
| 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") |
