Open prashant1507 opened 2 weeks ago
Hi! A couple workarounds I can think of (depending on what it is you wanna do):
context
, perhaps consider doing that one thing before and after the behavex process. e.g. run a python script that does that one thing before launching behavex, then another one after. Then perhaps you can chain these scripts with various ways like via cli or makefile for instance.context
, try to see if creating a temporary file helps. so, check if the file exists -> create if not -> do the thing. i think you'll still get race conditions using this approach but worth trying.watching the issue to keep an eye out for other inputs!
I tried second approach but it fails because of race condition specially in after_all
( Yes I need context in both after_all and before _all)
Description I'm running my tests in parallel using 4 processes - scenario by scenario.
Now I want to do some tasks in before_all and after_all but only 1 time, meaning do X in before_all only 1 time and use X in after_all only 1 time
What I tried I tried to use
context.config.userdata['worker_id']
, current_process(), parent_process() in order to identify but instances are totally differet.Please suggest me some solution or a workaround which I can try to achieve it
Thanks