Skip to content

Commit

Permalink
Removed footer macros, regen tests, all still pass (#3431)
Browse files Browse the repository at this point in the history
Removed `unittest` call from test file footers.
[no important files changed]
  • Loading branch information
gelbelle authored Jul 14, 2023
1 parent a2b8f4c commit e076fea
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 30 deletions.
3 changes: 0 additions & 3 deletions exercises/practice/bottle-song/.meta/template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ class {{ exercise | camel_case }}Test(unittest.TestCase):
{% endfor %}
{% endfor %}
{% endfor %}


{{ macros.footer() }}
4 changes: 0 additions & 4 deletions exercises/practice/bottle-song/bottle_song_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,3 @@ def test_all_verses(self):
"There'll be no green bottles hanging on the wall.",
]
self.assertEqual(recite(start=10, take=10), expected)


if __name__ == "__main__":
unittest.main()
1 change: 0 additions & 1 deletion exercises/practice/clock/.meta/template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,3 @@ class {{ exercise | camel_case }}Test(unittest.TestCase):

{% endfor %}
{%- endfor %}
{{ macros.footer() }}
4 changes: 0 additions & 4 deletions exercises/practice/clock/clock_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,3 @@ def test_clocks_with_negative_hours_and_minutes_that_wrap(self):

def test_full_clock_and_zeroed_clock(self):
self.assertEqual(Clock(24, 0), Clock(0, 0))


if __name__ == "__main__":
unittest.main()
2 changes: 0 additions & 2 deletions exercises/practice/crypto-square/.meta/template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@ class {{ exercise | camel_case }}Test(unittest.TestCase):
self.assertEqual(cipher_text(value), expected)

{% endfor %}

{{ macros.footer() }}
4 changes: 0 additions & 4 deletions exercises/practice/crypto-square/crypto_square_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,3 @@ def test_54_character_plaintext_results_in_7_chunks_the_last_two_with_trailing_s
value = "If man was meant to stay on the ground, god would have given us roots."
expected = "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau "
self.assertEqual(cipher_text(value), expected)


if __name__ == "__main__":
unittest.main()
3 changes: 1 addition & 2 deletions exercises/practice/custom-set/.meta/template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,4 @@ class {{ class_name }}Test(unittest.TestCase):
{% endif %}
{% endfor %}
{% endfor %}

{{ macros.footer() }}

4 changes: 0 additions & 4 deletions exercises/practice/custom-set/custom_set_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,3 @@ def test_union_of_non_empty_sets_contains_all_unique_elements(self):
set2 = CustomSet([2, 3])
expected = CustomSet([3, 2, 1])
self.assertEqual(set1 + set2, expected)


if __name__ == "__main__":
unittest.main()
2 changes: 0 additions & 2 deletions exercises/practice/darts/.meta/template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ class {{ exercise | camel_case }}Test(unittest.TestCase):
def test_{{ case["description"] | to_snake }}(self):
self.assertEqual({{ case["property"] }}({{ case["input"]["x"] }}, {{ case["input"]["y"] }}), {{ case["expected"] }})
{% endfor %}

{{ macros.footer() }}
4 changes: 0 additions & 4 deletions exercises/practice/darts/darts_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,3 @@ def test_just_outside_the_outer_circle(self):

def test_asymmetric_position_between_the_inner_and_middle_circles(self):
self.assertEqual(score(0.5, -4), 5)


if __name__ == "__main__":
unittest.main()

0 comments on commit e076fea

Please sign in to comment.