If the --block-network CMD option is passed, and if network.block is called in code, then one will overwrite another, and it depends on the execution order, which may lead to hard-to-track bugs in tests (it happened in one of our projects)
Implementation notes:
In the network.block call check if socket.socket.connect is already replaced
If the
--block-network
CMD option is passed, and ifnetwork.block
is called in code, then one will overwrite another, and it depends on the execution order, which may lead to hard-to-track bugs in tests (it happened in one of our projects)Implementation notes:
network.block
call check ifsocket.socket.connect
is already replacedRuntimeError
with some explanation