MCPcopy Create free account
hub / github.com/numpy/numpy / test_features

Method test_features

numpy/core/tests/test_cpu_features.py:73–82  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

71 # a hook
72 pass
73 def test_features(self):
74 self.load_flags()
75 for gname, features in self.features_groups.items():
76 test_features = [self.cpu_have(f) for f in features]
77 assert_features_equal(__cpu_features__.get(gname), all(test_features), gname)
78
79 for feature_name in self.features:
80 cpu_have = self.cpu_have(feature_name)
81 npy_have = __cpu_features__.get(feature_name)
82 assert_features_equal(npy_have, cpu_have, feature_name)
83
84 def cpu_have(self, feature_name):
85 map_names = self.features_map.get(feature_name, feature_name)

Callers

nothing calls this directly

Calls 5

load_flagsMethod · 0.95
cpu_haveMethod · 0.95
assert_features_equalFunction · 0.85
allFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected