File size: 314 Bytes
ef987bb
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"""Deterministic, network-disabled Python test runtime."""
import random
import socket

random.seed(0)


def _blocked(*_args, **_kwargs):
    raise RuntimeError("network access is disabled by the verifier")


socket.create_connection = _blocked
socket.socket.connect = _blocked
socket.socket.connect_ex = _blocked