def test_softmax(self, mocker, lineage: Lineage): try: _ = lineage.reduce("foo", "bar", normalize_weights="softmax", mode="dist") except ValueError: pass finally: mocker.assert_called_once()
def test_row_normalize(self, mocker, lineage: Lineage): try: _ = lineage.reduce("foo", "bar", mode="scale") except ValueError: pass finally: mocker.assert_called_once()
def test_mutual_info(self, mocker, lineage: Lineage): try: _ = lineage.reduce("foo", "bar", dist_measure="mutual_info", mode="dist") except ValueError: pass finally: mocker.assert_called_once()
def test_equal(self, mocker, lineage: Lineage): try: _ = lineage.reduce("foo", "bar", dist_measure="equal", mode="dist") except ValueError: pass finally: # should be twice, but we have extra check inside and we're mocking that does nothing mocker.assert_called_once()