diff --git a/nox/_parametrize.py b/nox/_parametrize.py index 8b5d55c3..ad83b53a 100644 --- a/nox/_parametrize.py +++ b/nox/_parametrize.py @@ -78,7 +78,7 @@ def __eq__(self, other: object) -> bool: elif isinstance(other, dict): return dict(zip(self.arg_names, self.args)) == other - raise NotImplementedError + return NotImplemented def _apply_param_specs(param_specs: Iterable[Param], f: Any) -> Any: diff --git a/tests/test__parametrize.py b/tests/test__parametrize.py index 1364087d..41ea4236 100644 --- a/tests/test__parametrize.py +++ b/tests/test__parametrize.py @@ -35,8 +35,7 @@ def test_param_eq(param, other, expected): def test_param_eq_fail(): - with pytest.raises(NotImplementedError): - _parametrize.Param() == "a" # noqa: B015 + assert _parametrize.Param() != "a" def test_parametrize_decorator_one():