Skip to content

Commit

Permalink
Fixed Improper Method Call: Replaced NotImplementedError (#749)
Browse files Browse the repository at this point in the history
* Replaced `NotImplementedError` with `NotImplemented`

Signed-off-by: fazledyn-or <[email protected]>

* Fix tests for #749

---------

Signed-off-by: fazledyn-or <[email protected]>
Co-authored-by: Edgar Ramírez Mondragón <[email protected]>
  • Loading branch information
fazledyn-or and edgarrmondragon authored Feb 20, 2024
1 parent 4f73b76 commit f8df3c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nox/_parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 1 addition & 2 deletions tests/test__parametrize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down

0 comments on commit f8df3c1

Please sign in to comment.