mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-19 13:02:30 +07:00
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:
10
python/testData/testRunner/env/unit/sysPath/test_sample.py
vendored
Normal file
10
python/testData/testRunner/env/unit/sysPath/test_sample.py
vendored
Normal 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)
|
||||
|
||||
Reference in New Issue
Block a user