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

Method test_file

tests_python/debugger_fixtures.py:249–275  ·  view source on GitHub ↗
(self, filename, wait_for_port=True, wait_for_initialization=True, **kwargs)

Source from the content-addressed store, hash-verified

247
248 @contextmanager
249 def test_file(self, filename, wait_for_port=True, wait_for_initialization=True, **kwargs):
250 import shutil
251
252 filename = debugger_unittest._get_debugger_test_file(filename)
253 if self.check_non_ascii:
254 basedir = str(tmpdir)
255 if isinstance(basedir, bytes):
256 basedir = basedir.decode("utf-8")
257 if isinstance(filename, bytes):
258 filename = filename.decode("utf-8")
259
260 new_dir = os.path.join(basedir, self.NON_ASCII_CHARS)
261 os.makedirs(new_dir)
262
263 new_filename = os.path.join(new_dir, self.NON_ASCII_CHARS + os.path.basename(filename))
264 shutil.copyfile(filename, new_filename)
265 filename = new_filename
266
267 WriterThread.TEST_FILE = filename
268 for key, value in kwargs.items():
269 assert hasattr(WriterThread, key)
270 setattr(WriterThread, key, value)
271
272 with runner.check_case(
273 WriterThread, wait_for_port=wait_for_port, wait_for_initialization=wait_for_initialization, dap=self.dap
274 ) as writer:
275 yield writer
276
277 return CaseSetup()
278

Callers 15

test_case_referrersFunction · 0.80
test_case_2Function · 0.80
test_case_3Function · 0.80
test_case_suspend_threadFunction · 0.80
test_case_5Function · 0.80
test_case_6Function · 0.80
test_case_7Function · 0.80
test_case_8Function · 0.80

Calls 5

itemsMethod · 0.80
check_caseMethod · 0.80
popMethod · 0.80
decodeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected