MCPcopy Create free account
hub / github.com/GlobalTechInfo/MEGA-MD / __init__

Method __init__

lib/speed.py:1089–1116  ·  view source on GitHub ↗
(self, config=None, source_address=None, timeout=10,
                 secure=False, shutdown_event=None)

Source from the content-addressed store, hash-verified

1087 """Class for performing standard speedtest.net testing operations"""
1088
1089 def __init__(self, config=None, source_address=None, timeout=10,
1090 secure=False, shutdown_event=None):
1091 self.config = {}
1092
1093 self._source_address = source_address
1094 self._timeout = timeout
1095 self._opener = build_opener(source_address, timeout)
1096
1097 self._secure = secure
1098
1099 if shutdown_event:
1100 self._shutdown_event = shutdown_event
1101 else:
1102 self._shutdown_event = FakeShutdownEvent()
1103
1104 self.get_config()
1105 if config is not None:
1106 self.config.update(config)
1107
1108 self.servers = {}
1109 self.closest = []
1110 self._best = {}
1111
1112 self.results = SpeedtestResults(
1113 client=self.config['client'],
1114 opener=self._opener,
1115 secure=secure,
1116 )
1117
1118 @property
1119 def best(self):

Callers 8

__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45

Calls 4

get_configMethod · 0.95
build_openerFunction · 0.85
FakeShutdownEventClass · 0.85
SpeedtestResultsClass · 0.85

Tested by

no test coverage detected