We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b217e3f commit a996cdaCopy full SHA for a996cda
Lib/test/test_call.py
@@ -1050,10 +1050,12 @@ def get_sp():
1050
lower_sp = _testcapi.pyobject_vectorcall(get_sp, (), ())
1051
if _testcapi._Py_STACK_GROWS_DOWN:
1052
self.assertLess(lower_sp, this_sp)
1053
+ safe_margin = this_sp - lower_sp
1054
else:
1055
self.assertGreater(lower_sp, this_sp)
1056
+ safe_margin = lower_sp - this_sp
1057
# Add an (arbitrary) extra 25% for safety
- safe_margin = abs(this_sp - lower_sp) * 5 / 4
1058
+ safe_margin = safe_margin * 5 / 4
1059
self.assertLess(safe_margin, _testinternalcapi.get_stack_margin())
1060
1061
@skip_on_s390x
0 commit comments