PY-23452: fix sys.path for runners to make same as with real runners

* Python adds script folder as sys.path[0]. Since we run helper "helpers" dir is sys.path[0]. Pop it, and testrunner will patch sys.path as it is done with command line.
* Unittest is launched as module and it adds current dir -- pycharm mimics this behaviour.
This commit is contained in:
Ilya.Kazakevich
2017-04-19 00:07:17 +03:00
parent 65a984d1f3
commit 5f234d7a36
4 changed files with 48 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
import unittest
import sys
print("path[0]={0}".format(sys.path[0]))
class SampleTest(unittest.TestCase):
def test_true(self):
self.assertTrue(True)