Files
python/exercises/two-bucket/.meta/template.j2
Michael Morehouse 7a42fb71e2 various: comma fixes (#2150)
* forth: reinstate seperate classes

The template removed seperate classes per major case, resulting in
several tests with duplicate names and therefore an incomplete test
suite.

This reinstates the distinct classes.

Fixes #2148

* forth: minor black issue

Was accidentally running on a later version of Black than the one
specified in our requirements-generator.txt.

* various: fixes trailing comma issues

An upcoming change in Black revealed that we were adding unnecessary
trailing commas. These will _not_ be trimmed by Black in future builds.

Co-authored-by: Corey McCandless <cmccandless@users.noreply.github.com>
2019-12-24 21:28:38 -05:00

21 lines
717 B
Django/Jinja

{%- import "generator_macros.j2" as macros with context -%}
{{ macros.header() }}
class {{ exercise | camel_case }}Test(unittest.TestCase):
{% for case in cases -%}
def test_{{ case["description"] | to_snake }}(self):
self.assertEqual({{ case["property"] }}(
{{ case["input"]["bucketOne"] }},
{{ case["input"]["bucketTwo"] }},
{{ case["input"]["goal"] }},
"{{ case["input"]["startBucket"] }}"),
(
{{ case["expected"]["moves"] }},
"{{ case["expected"]["goalBucket"] }}",
{{ case["expected"]["otherBucket"] }}
))
{% endfor %}
{{ macros.footer() }}