Skip to content

Commit

Permalink
Fix typos in TestThreadedProgressObservers tests
Browse files Browse the repository at this point in the history
test_threaded_progress_on_begin and test_threaded_progress_on_end
were calling stop() on _patch rather than _mock_patch(), producing
an error on the subsequent _mock_patch.start() (since it was
already started, and hadn't been stopped). Corrected in this commit.

Fixes #1104
  • Loading branch information
pont-us committed Jan 10, 2025
1 parent 7cce4f3 commit 0fb6508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/core/gen2/test_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def test_threaded_progress_on_begin(self):

observer.on_begin([state_stack])
self.assertTrue(_mock.called)
_mock.stop()
_mock_patch.stop()

_mock = _mock_patch.start()
state_stack1 = ProgressState("Test", 100, 100)
Expand All @@ -134,7 +134,7 @@ def test_threaded_progress_on_end(self):

observer.on_end([state_stack])
self.assertTrue(_mock.called)
_mock.stop()
_mock_patch.stop()

_mock = _mock_patch.start()
state_stack1 = ProgressState("Test", 100, 100)
Expand Down

0 comments on commit 0fb6508

Please sign in to comment.