File: tests-reduce-builtin-mock-scope

package info (click to toggle)
mu-editor 1.0.3%2Bdfsg-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,440 kB
  • sloc: python: 16,321; makefile: 129; xml: 29; sh: 7
file content (19 lines) | stat: -rw-r--r-- 737 bytes parent folder | download
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