Skip to content

Commit

Permalink
Trying to prepend path with sys executable
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmundt committed Jul 1, 2020
1 parent 35b2481 commit 4ef842f
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions doc/workflow/examples/test_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,16 @@
from os.path import dirname, abspath, abspath, basename
import sys

sys.path.insert(0, sys.executable)

currdir = dirname(abspath(__file__))+os.sep
datadir = currdir

def filter(line):
return 'Running' in line or "IGNORE" in line or line.startswith('usage:') or 'Sub-commands' in line

class Test(unittest.TestCase):

def setUp(self):
self._path = os.environ['PATH']
os.environ['PATH'] = os.path.join(
os.path.dirname(sys.executable), os.environ['PATH']
)

def tearDown(self):
os.environ['PATH'] = self._path
pass

# Find all example*.py files, and use them to define baseline tests
for file in glob.glob(datadir+'example*.py'):
Expand Down

0 comments on commit 4ef842f

Please sign in to comment.