MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / modified

Function modified

test/decorators.py:78–91  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

76 def decorated(func):
77 @wraps(func)
78 def modified(self, *args, **kwargs):
79 # Browser tests have their own method of retrying tests.
80 if self.is_browser_test():
81 self.flaky = True
82 return func(self, *args, **kwargs)
83
84 for i in range(common.EMTEST_RETRY_FLAKY):
85 try:
86 return func(self, *args, **kwargs)
87 except (AssertionError, subprocess.TimeoutExpired) as exc:
88 preserved_exc = exc
89 common.record_flaky_test(self.id(), i, common.EMTEST_RETRY_FLAKY, exc)
90
91 raise AssertionError('Flaky test has failed too many times') from preserved_exc
92
93 return modified
94

Callers

nothing calls this directly

Calls 4

funcFunction · 0.50
rangeFunction · 0.50
is_browser_testMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected