MCPcopy
hub / github.com/treeverse/dvc / test_system_info

Function test_system_info

tests/unit/test_analytics.py:137–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

135
136
137def test_system_info():
138 schema = Schema({"os": Any("windows", "mac", "linux")}, required=True)
139
140 system = platform.system()
141
142 if system == "Windows":
143 schema = schema.extend(
144 {
145 "windows_version_build": int,
146 "windows_version_major": int,
147 "windows_version_minor": int,
148 "windows_version_service_pack": str,
149 }
150 )
151
152 if system == "Darwin":
153 schema = schema.extend({"mac_version": str})
154
155 if system == "Linux":
156 schema = schema.extend(
157 {
158 "linux_distro": str,
159 "linux_distro_like": str,
160 "linux_distro_version": str,
161 }
162 )
163
164 assert schema(analytics._system_info())
165
166
167@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

extendMethod · 0.80

Tested by

no test coverage detected