Skip to content

Commit b328d49

Browse files
committed
push
1 parent 61d5d27 commit b328d49

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/test_decorators.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ def level_1_function(*args, **kwargs):
13111311
@pytest.mark.asyncio
13121312
async def test_multiproject_async_context_propagation_basic():
13131313
"""Test that nested async decorated functions inherit langfuse_public_key from parent in multi-project setup"""
1314-
LangfuseResourceManager.reset()
1314+
LangfuseResourceManager._instances.pop("fake", None)
13151315
client1 = Langfuse() # Reads from environment
13161316
Langfuse(public_key="pk-test-project2", secret_key="sk-test-project2")
13171317

@@ -1378,7 +1378,7 @@ async def async_level_1_function(*args, **kwargs):
13781378
@pytest.mark.asyncio
13791379
async def test_multiproject_mixed_sync_async_context_propagation():
13801380
"""Test context propagation between sync and async decorated functions in multi-project setup"""
1381-
LangfuseResourceManager.reset()
1381+
LangfuseResourceManager._instances.pop("fake", None)
13821382
client1 = Langfuse() # Reads from environment
13831383
Langfuse(public_key="pk-test-project2", secret_key="sk-test-project2")
13841384

@@ -1447,7 +1447,7 @@ async def async_level_1_function(*args, **kwargs):
14471447
@pytest.mark.asyncio
14481448
async def test_multiproject_concurrent_async_context_isolation():
14491449
"""Test that concurrent async executions don't interfere with each other's context in multi-project setup"""
1450-
LangfuseResourceManager.reset()
1450+
LangfuseResourceManager._instances.pop("fake", None)
14511451
client1 = Langfuse() # Reads from environment
14521452
Langfuse(public_key="pk-test-project2", secret_key="sk-test-project2")
14531453

@@ -1535,7 +1535,7 @@ async def async_level_1_function(task_id, *args, **kwargs):
15351535
@pytest.mark.asyncio
15361536
async def test_multiproject_async_generator_context_propagation():
15371537
"""Test context propagation with async generators in multi-project setup"""
1538-
LangfuseResourceManager.reset()
1538+
LangfuseResourceManager._instances.pop("fake", None)
15391539
client1 = Langfuse() # Reads from environment
15401540
Langfuse(public_key="pk-test-project2", secret_key="sk-test-project2")
15411541

@@ -1597,7 +1597,7 @@ async def async_consumer_function():
15971597
@pytest.mark.asyncio
15981598
async def test_multiproject_async_context_exception_handling():
15991599
"""Test that async context is properly restored even when exceptions occur in multi-project setup"""
1600-
LangfuseResourceManager.reset()
1600+
LangfuseResourceManager._instances.pop("fake", None)
16011601
client1 = Langfuse() # Reads from environment
16021602
Langfuse(public_key="pk-test-project2", secret_key="sk-test-project2")
16031603

0 commit comments

Comments
 (0)