()
| 21 | dspy.configure(lm=dspy.LM("openai/gpt-4o"), adapter=dspy.JSONAdapter(), callbacks=[lambda x: x]) |
| 22 | |
| 23 | def worker(): |
| 24 | with pytest.raises(RuntimeError, match="Cannot call dspy.configure"): |
| 25 | dspy.configure(lm=dspy.LM("openai/gpt-4o-mini"), callbacks=[]) |
| 26 | |
| 27 | with ThreadPoolExecutor(max_workers=1) as executor: |
| 28 | executor.submit(worker) |