Skip to content

Commit

Permalink
fix: correct assert in test
Browse files Browse the repository at this point in the history
  • Loading branch information
vaeng committed Oct 18, 2023
1 parent 0862e7a commit a35551b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion exercises/practice/pop-count/.meta/template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class {{ exercise | camel_case }}Test(unittest.TestCase):
{% for case in cases -%}
def test_{{ case["description"] | to_snake }}(self):
expected = {{ case["expected"] }}
self.assertCountEqual(
self.assertEqual(
{{ case["property"] | to_snake }}({{ case["input"]["number"] }}), expected
)

Expand Down
8 changes: 4 additions & 4 deletions exercises/practice/pop-count/pop_count_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
class PopCountTest(unittest.TestCase):
def test_0_eggs(self):
expected = 0
self.assertCountEqual(egg_count(0), expected)
self.assertEqual(egg_count(0), expected)

def test_1_egg(self):
expected = 1
self.assertCountEqual(egg_count(16), expected)
self.assertEqual(egg_count(16), expected)

def test_4_eggs(self):
expected = 4
self.assertCountEqual(egg_count(89), expected)
self.assertEqual(egg_count(89), expected)

def test_13_eggs(self):
expected = 13
self.assertCountEqual(egg_count(2000000000), expected)
self.assertEqual(egg_count(2000000000), expected)

0 comments on commit a35551b

Please sign in to comment.