1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
Description: Fix tests by reducing builtin mock scope from global to module
Author: Carlos Pereira Atencio
Origin: upstream
Bug: https://github.com/mu-editor/mu/issues/2091
Applied-Upstream: https://github.com/mu-editor/mu/commit/85cacb48ea2243c727ac236cf7d70c29dc7a52b9
Reviewed-by: Nick Morrott <nickm@debian.org>
Last-Update: 2023-02-09
---
--- a/tests/interface/test_main.py
+++ b/tests/interface/test_main.py
@@ -115,7 +115,7 @@
addAction.
"""
bb = mu.interface.main.ButtonBar(None)
- with mock.patch('builtins.super') as mock_s:
+ with mock.patch('mu.interface.main.super') as mock_s:
bb.addAction('save', 'Save', 'save stuff')
mock_s.assert_called_once_with()
assert 'save' in bb.slots
|