Skip to content

Commit 7647181

Browse files
authored
Improve test coverage for armstrong numbers (#12327)
1 parent 8bbe8ca commit 7647181

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: maths/special_numbers/armstrong_numbers.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ def armstrong_number(n: int) -> bool:
4343
def pluperfect_number(n: int) -> bool:
4444
"""Return True if n is a pluperfect number or False if it is not
4545
46-
>>> all(armstrong_number(n) for n in PASSING)
46+
>>> all(pluperfect_number(n) for n in PASSING)
4747
True
48-
>>> any(armstrong_number(n) for n in FAILING)
48+
>>> any(pluperfect_number(n) for n in FAILING)
4949
False
5050
"""
5151
if not isinstance(n, int) or n < 1:
@@ -70,9 +70,9 @@ def pluperfect_number(n: int) -> bool:
7070
def narcissistic_number(n: int) -> bool:
7171
"""Return True if n is a narcissistic number or False if it is not.
7272
73-
>>> all(armstrong_number(n) for n in PASSING)
73+
>>> all(narcissistic_number(n) for n in PASSING)
7474
True
75-
>>> any(armstrong_number(n) for n in FAILING)
75+
>>> any(narcissistic_number(n) for n in FAILING)
7676
False
7777
"""
7878
if not isinstance(n, int) or n < 1:

0 commit comments

Comments
 (0)