Test: the worker applies the thread cap before it loads the model

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-23 12:32:04 +02:00
commit 6487c7a063

View file

@ -180,6 +180,10 @@ class ThreadCap(unittest.TestCase):
source = (Path(te.__file__).with_name("kimodo-text-encode.py")).read_text()
self.assertLess(source.index("apply_thread_cap(os.environ)"), source.index("load_encoder(os.environ"))
def test_the_worker_applies_the_cap_before_it_loads_the_model(self):
source = (Path(te.__file__).with_name("kimodo-resident-worker.py")).read_text()
self.assertLess(source.index("text_encoding.apply_thread_cap(os.environ)"), source.index("model, resolved_model = load_model("))
class ChildBoundary(unittest.TestCase):
def run_stub(self, body, texts=("aa",)):