Using sys settrace with pytest in python

I want to trace the functions called and their return values for a test in python. I am using pytest module to call the test and sys.settrace for tracing the functions. However, this doesn’t work and no functions are traced when I use pytest. It works when I use a locally defined function. filename=”../tests/models/reading_comprehension/naqanet_test.py::NumericallyAugmentedQaNetTest::test_model_can_train_save_and_load” sys.settrace(trace_calls_and_returns)…

Details

How to extract value from async method and put value in apolloProvider variable?

I want extract value from async method extractZMockClient and put this value in apolloProvider variable in properties: defaultClient and clients. I already do that, but on console.log(apolloProvider()) I got that: const ZMockClient = async () => import(“z-mock-client”) const extractZMockClient = async () => { try { const callZMockClient = await ZMockClient() return callZMockClient.mockedClient } catch…

Details