Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-12096

Flake: test_progress_in_HTML_JS_when_in_notebook

    XMLWordPrintableJSON

    Details

      Description

      self = <apache_beam.runners.interactive.utils_test.ProgressIndicatorTest testMethod=test_progress_in_HTML_JS_when_in_notebook> def test_progress_in_HTML_JS_when_in_notebook(self): ie.current_env()._is_in_notebook = True pi_path = 'apache_beam.runners.interactive.utils.ProgressIndicator' with patch('IPython.core.display.HTML') as mocked_html, \ patch('IPython.core.display.Javascript') as mocked_javascript, \ patch(pi_path + '.spinner_template') as enter_template, \ patch(pi_path + '.spinner_removal_template') as exit_template: enter_template.format.return_value = 'enter' exit_template.format.return_value = 'exit' @utils.progress_indicated def progress_indicated_dummy(): mocked_html.assert_any_call('enter') > progress_indicated_dummy() apache_beam/runners/interactive/utils_test.py:217: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ apache_beam/runners/interactive/utils.py:235: in run_within_progress_indicator return func(*args, **kwargs) apache_beam/runners/interactive/utils_test.py:215: in progress_indicated_dummy mocked_html.assert_any_call('enter') _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = <MagicMock name='HTML' id='140195651256392'>, args = ('enter',) kwargs = {}, expected = (('enter',), {}) actual = [call('\n <link rel="stylesheet" href="

      https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min..."

      >You have limited Interactive Beam features since your ipython kernel is not connected any notebook frontend.</div>')] cause = None, expected_string = "HTML('enter')" def assert_any_call(self, args, **kwargs): """assert the mock has been called with the specified arguments. The assert passes if the mock has *ever been called, unlike `assert_called_with` and `assert_called_once_with` that only pass if the call is the most recent one.""" expected = self._call_matcher((args, kwargs)) actual = [self._call_matcher(c) for c in self.call_args_list] if expected not in actual: cause = expected if isinstance(expected, Exception) else None expected_string = self._format_mock_call_signature(args, kwargs) raise AssertionError( '%s call not found' % expected_string > ) from cause E AssertionError: HTML('enter') call not found /usr/lib/python3.7/unittest/mock.py:891: AssertionError

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ningk Ning Kang
                Reporter:
                ibzib Kyle Weaver
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 3h 50m
                  3h 50m