Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit b52bde6

Browse files
committedOct 15, 2022
Fixed failing Testcases
1 parent dde1fa3 commit b52bde6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎bit_manipulation/index_of_rightmost_set_bit.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_index_of_rightmost_set_bit(number: int) -> int:
2020
ValueError: Input must be a non-negative integer
2121
"""
2222

23-
if 0 > number and not isinstance(number, int):
23+
if number<0 or not isinstance(number, int):
2424
raise ValueError("Input must be a non-negative integer")
2525

2626
intermediate = number&~(number-1)
@@ -38,4 +38,4 @@ def get_index_of_rightmost_set_bit(number: int) -> int:
3838
"""
3939
import doctest
4040

41-
doctest.testmod()
41+
doctest.testmod(verbose=True)

0 commit comments

Comments
 (0)
Please sign in to comment.