MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _run_in_process

Method _run_in_process

test/dialect/oracle/test_dialect.py:117–131  ·  view source on GitHub ↗
(self, fn, fn_kw=None)

Source from the content-addressed store, hash-verified

115 __only_on__ = "oracle+oracledb"
116
117 def _run_in_process(self, fn, fn_kw=None):
118 if config.db.dialect.is_async:
119 config.skip_test("thick mode unsupported in async mode")
120 ctx = get_context("spawn")
121 queue = ctx.Queue()
122 process = ctx.Process(
123 target=fn, args=(config.db_url, queue), kwargs=fn_kw or {}
124 )
125 try:
126 process.start()
127 process.join(10)
128 eq_(process.exitcode, 0)
129 return queue.get_nowait()
130 finally:
131 process.kill()
132
133 @testing.combinations({}, {"thick_mode": None}, {"thick_mode": False})
134 def test_thin_mode(self, options):

Callers 2

test_thin_modeMethod · 0.95
test_thick_modeMethod · 0.95

Calls 5

get_nowaitMethod · 0.95
eq_Function · 0.90
skip_testMethod · 0.80
startMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected