def test_matrix_calls_axis(self): matrix = Matrix() axis = mock.Mock() matrix.add_axis(axis) cases = [mock.Mock()] matrix.expand(cases) axis.expand.assert_called_once_with(cases)
def test_matrix_both_axes(self): matrix = Matrix() matrix.add_axis(PythonAxis(["2.7"])) matrix.add_axis(AnsibleAxis(["2.8"])) case = mock.Mock() case.expand_python.return_value = case case.expand_ansible.return_value = case matrix.expand([case]) self.assertEqual(2, len(matrix.axes)) case.expand_python.assert_called_once_with("2.7") case.expand_ansible.assert_called_once_with("2.8")
def test_matrix_leaves_out_bare_lint_all(self): matrix = Matrix() matrix.add_axis(PythonAxis(["2.7", "3.8"])) cases = [ToxLintCase([])] expanded = matrix.expand(cases) self.assertEqual(2, len(expanded))