Skip to content
Snippets Groups Projects
Unverified Commit eba78658 authored by anarcat's avatar anarcat
Browse files

make tests work with pytest

parent 4fb856f5
Branches
No related tags found
No related merge requests found
...@@ -94,7 +94,7 @@ class CliBaseTest(unittest.TestCase): ...@@ -94,7 +94,7 @@ class CliBaseTest(unittest.TestCase):
''' '''
directory, basename = os.path.split(self.argv[0]) directory, basename = os.path.split(self.argv[0])
path, directory = os.path.split(os.path.realpath(directory)) path, directory = os.path.split(os.path.realpath(directory))
if directory == 'scripts' or basename == 'setup.py': if directory == 'scripts' or basename == 'setup.py' or 'pytest' in basename:
# default to run from source dir. this is necessary for # default to run from source dir. this is necessary for
# ./scripts/monkeysign --test and ./setup.py test # ./scripts/monkeysign --test and ./setup.py test
execfile(os.path.dirname(__file__) + '/../../scripts/monkeysign') execfile(os.path.dirname(__file__) + '/../../scripts/monkeysign')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment