Ejemplo n.º 1
0
    def test_has_log_returns_true_if_all_workspaces_have_the_log(self):
        time_series_logs = (('ts_1', (1., )), ('ts_2', (3., )))
        fake1 = create_test_workspace(ws_name='fake1',
                                      time_series_logs=time_series_logs)
        fake2 = create_test_workspace(ws_name='fake2',
                                      time_series_logs=time_series_logs)
        fit = FitInformation(mock.MagicMock(), 'func1', [
            StaticWorkspaceWrapper(fake1.name(), fake1),
            StaticWorkspaceWrapper(fake2.name(), fake2)
        ], mock.MagicMock(), mock.MagicMock())

        self.assertTrue(fit.has_log('ts_1'))
Ejemplo n.º 2
0
    def test_has_log_returns_false_if_all_workspaces_do_not_have_log(self):
        time_series_logs = [('ts_1', (1., ))]
        fake1 = create_test_workspace(ws_name='fake1',
                                      time_series_logs=time_series_logs)
        fake2 = create_test_workspace(ws_name='fake2')
        fit = FitInformation(mock.MagicMock(), 'func1', [
            StaticWorkspaceWrapper(fake1.name(), fake1),
            StaticWorkspaceWrapper(fake2.name(), fake2)
        ], mock.MagicMock(), mock.MagicMock())

        self.assertFalse(
            fit.has_log('ts_1'),
            msg='All input workspaces should have the requested log')