Commit 8208ee8
committed
fix(test): correct operator precedence
bitshift shift has lower precedence than division, meaning in
MemoryUsageExceededError.__init__ we end up trying to bitshift a float,
which is nonsense (as the expression in the f-string gets interpreted as
(threshold / 1) << 20, and the result of all divisions in python is a
float). Add some parenthesis.
We cannot just write this as `threshold >> 20`, as we care about the
fractional part.
Fixes: 7d1549f ("tests: fix MMIO gaps in memory monitor tool")
Signed-off-by: Patrick Roy <[email protected]>1 parent 0cd25f0 commit 8208ee8
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
0 commit comments