fixed PY-10439 Test Runner: not able to specify setup.py test options: IOError: [Errno 2] No such file or directory

This commit is contained in:
Ekaterina Tuzova
2013-07-31 18:30:42 +04:00
parent 4d17f7aa5c
commit ebbabcf8bc
@@ -6,8 +6,15 @@ from pycharm_run_utils import PYTHON_VERSION_MAJOR, PYTHON_VERSION_MINOR
import pycharm_commands # we need pycharm_commands module to be loaded
if __name__ == "__main__":
parameters = []
test_suite = sys.argv.pop(-1)
while test_suite.startswith("-"):
parameters.append(test_suite)
test_suite = sys.argv.pop(-1)
sys.argv = [test_suite, "--command-packages", "pycharm_commands", "pycharm_test"]
sys.argv.extend(parameters)
__file__ = test_suite
if PYTHON_VERSION_MINOR == 2 and PYTHON_VERSION_MAJOR == 4: