Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
eb.set_type(results)
# Compare the results of the low-level type detection to
# that of the expectation and the assumption.
if not expectation in (0, results):
eb.reject = True
err_mesg = "Extension type mismatch (expected %s, found %s)"
err_mesg = err_mesg % (types[expectation], types[results])
eb.warning(err_mesg)
# ---- Begin Tiers ----
# Iterate through each tier
for tier in sorted(decorator.get_tiers()):
print "Entering tier #%d" % tier
# Iterate through each test of our detected type
for test in decorator.run_tests(tier, eb.detected_type):
# Pass in:
# - Error Bundler
# - Package listing
# - A copy of the package itself
test(eb, package_contents, p)
# Return any errors at the end of the tier
if eb.failed():
return eb