MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / main

Function main

runfiles.py:10–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8
9
10def main():
11 import sys
12
13 # Separate the nose params and the pydev params.
14 pydev_params = []
15 other_test_framework_params = []
16 found_other_test_framework_param = None
17
18 NOSE_PARAMS = "--nose-params"
19 PY_TEST_PARAMS = "--py-test-params"
20
21 for arg in sys.argv[1:]:
22 if not found_other_test_framework_param and arg != NOSE_PARAMS and arg != PY_TEST_PARAMS:
23 pydev_params.append(arg)
24
25 else:
26 if not found_other_test_framework_param:
27 found_other_test_framework_param = arg
28 else:
29 other_test_framework_params.append(arg)
30
31 try:
32 # Convert to the case stored in the filesystem
33 import win32api
34
35 def get_with_filesystem_case(f):
36 return win32api.GetLongPathName(win32api.GetShortPathName(f))
37
38 except:
39
40 def get_with_filesystem_case(f):
41 return f
42
43 # Here we'll run either with nose or with the pydev_runfiles.
44 from _pydev_runfiles import pydev_runfiles
45 from _pydev_runfiles import pydev_runfiles_xml_rpc
46 from _pydevd_bundle import pydevd_constants
47 from pydevd_file_utils import canonical_normalized_path
48
49 DEBUG = 0
50 if DEBUG:
51 sys.stdout.write("Received parameters: %s\n" % (sys.argv,))
52 sys.stdout.write("Params for pydev: %s\n" % (pydev_params,))
53 if found_other_test_framework_param:
54 sys.stdout.write("Params for test framework: %s, %s\n" % (found_other_test_framework_param, other_test_framework_params))
55
56 try:
57 configuration = pydev_runfiles.parse_cmdline([sys.argv[0]] + pydev_params)
58 except:
59 sys.stderr.write("Command line received: %s\n" % (sys.argv,))
60 raise
61 pydev_runfiles_xml_rpc.initialize_server(configuration.port) # Note that if the port is None, a Null server will be initialized.
62
63 NOSE_FRAMEWORK = "nose"
64 PY_TEST_FRAMEWORK = "py.test"
65 test_framework = None # Default (pydev)
66 try:
67 if found_other_test_framework_param:

Callers 1

runfiles.pyFile · 0.70

Calls 10

dottedFunction · 0.85
get_with_filesystem_caseFunction · 0.85
itemsMethod · 0.80
dumpsMethod · 0.80
appendMethod · 0.45
writeMethod · 0.45
runMethod · 0.45
joinMethod · 0.45
decodeMethod · 0.45

Tested by

no test coverage detected