Debian Codegraph @

tests/__init__.py

raw
1 # -*- coding: utf-8 -*-
2 #
3 # Copyright (C) 2019-2020 Matthias Klumpp <[email protected]>
4 #
5 # Licensed under the GNU Lesser General Public License Version 3
6 #
7 # This program is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU Lesser General Public License as published by
9 # the Free Software Foundation, either version 3 of the license, or
10 # (at your option) any later version.
11 #
12 # This software is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU Lesser General Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public License
18 # along with this software. If not, see <http://www.gnu.org/licenses/>.
19
20 import os
21 import sys
22
23 thisfile = __file__
24 if not os.path.isabs(thisfile):
25 thisfile = os.path.normpath(os.path.join(os.getcwd(), thisfile))
26 source_root = os.path.normpath(os.path.join(os.path.dirname(thisfile), '..'))
27 sys.path.append(os.path.normpath(source_root))
28
29
30 __all__ = ['source_root']