File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,15 @@ def locate_package(pkg):
6060def setup_tincan_path ():
6161 tincan_pardir = locate_package ('tincan' )
6262 if tincan_pardir and tincan_pardir not in sys .path :
63+ #
64+ # using sys.path.insert in this manner is considered a little evil,
65+ # see http://stackoverflow.com/questions/10095037/why-use-sys-path-appendpath-instead-of-sys-path-insert1-path
66+ # but this is better than using the sys.path.append as before
67+ # as that was catching the system installed version, if virtualenv
68+ # is ever implemented for the test suite then this can go away
69+ #
6370 print "Adding %s to PYTHONPATH" % repr (tincan_pardir )
64- sys .path .append ( tincan_pardir )
71+ sys .path .insert ( 1 , tincan_pardir )
6572 check_tincan_importability ()
6673
6774
@@ -72,4 +79,4 @@ def setup_tincan_path():
7279 test_pardir = locate_package ('test' )
7380 test_dir = os .path .join (test_pardir , 'test' )
7481 suite = loader .discover (test_dir , pattern = '*_test.py' )
75- unittest .TextTestRunner (verbosity = 1 ).run (suite )
82+ unittest .TextTestRunner (verbosity = 1 ).run (suite )
You can’t perform that action at this time.
0 commit comments