MCPcopy Index your code
hub / github.com/plotly/dash / test_fingerprint

Function test_fingerprint

tests/unit/test_fingerprint.py:106–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

104
105
106def test_fingerprint():
107 for resource in valid_resources:
108 # The fingerprint matches expectations
109 fingerprint = build_fingerprint(
110 resource.get("path"),
111 resource.get("version", version),
112 resource.get("hash", hash_value),
113 )
114 assert fingerprint == resource.get("fingerprint")
115
116 (original_path, has_fingerprint) = check_fingerprint(fingerprint)
117 # The inverse operation returns that the fingerprint was valid
118 # and the original path
119 assert has_fingerprint
120 assert original_path == resource.get("path")
121
122 for resource in valid_fingerprints:
123 (_, has_fingerprint) = check_fingerprint(resource)
124 assert has_fingerprint, resource
125
126 for resource in invalid_fingerprints:
127 (_, has_fingerprint) = check_fingerprint(resource)
128 assert not has_fingerprint, resource

Callers

nothing calls this directly

Calls 3

build_fingerprintFunction · 0.90
check_fingerprintFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…