diff --git a/config.json b/config.json index 8176083ed8a..36d3cfe5e1c 100644 --- a/config.json +++ b/config.json @@ -798,7 +798,7 @@ ] }, { - "slug": "bracket-push", + "slug": "matching-brackets", "uuid": "45229a7c-6703-4240-8287-16645881a043", "core": false, "unlocked_by": "isogram", diff --git a/exercises/bracket-push/README.md b/exercises/matching-brackets/README.md similarity index 88% rename from exercises/bracket-push/README.md rename to exercises/matching-brackets/README.md index 7ee2aa2e3ad..bbd62d63ee8 100644 --- a/exercises/bracket-push/README.md +++ b/exercises/matching-brackets/README.md @@ -1,9 +1,10 @@ -# Bracket Push +# Matching Brackets Given a string containing brackets `[]`, braces `{}`, parentheses `()`, or any combination thereof, verify that any and all pairs are matched and nested correctly. + ## Exception messages Sometimes it is necessary to raise an exception. When you do this, you should include a meaningful error message to @@ -22,11 +23,11 @@ raise Exception("Meaningful message indicating the source of the error") To run the tests, run the appropriate command below ([why they are different](https://github.com/pytest-dev/pytest/issues/1629#issue-161422224)): -- Python 2.7: `py.test bracket_push_test.py` -- Python 3.4+: `pytest bracket_push_test.py` +- Python 2.7: `py.test matching_brackets_test.py` +- Python 3.4+: `pytest matching_brackets_test.py` Alternatively, you can tell Python to run the pytest module (allowing the same command to be used regardless of Python version): -`python -m pytest bracket_push_test.py` +`python -m pytest matching_brackets_test.py` ### Common `pytest` options @@ -38,7 +39,7 @@ For other options, see `python -m pytest -h` ## Submitting Exercises -Note that, when trying to submit an exercise, make sure the solution is in the `$EXERCISM_WORKSPACE/python/bracket-push` directory. +Note that, when trying to submit an exercise, make sure the solution is in the `$EXERCISM_WORKSPACE/python/matching-brackets` directory. You can find your Exercism workspace by running `exercism debug` and looking for the line that starts with `Workspace`. diff --git a/exercises/bracket-push/example.py b/exercises/matching-brackets/example.py similarity index 100% rename from exercises/bracket-push/example.py rename to exercises/matching-brackets/example.py diff --git a/exercises/bracket-push/bracket_push.py b/exercises/matching-brackets/matching_brackets.py similarity index 100% rename from exercises/bracket-push/bracket_push.py rename to exercises/matching-brackets/matching_brackets.py diff --git a/exercises/bracket-push/bracket_push_test.py b/exercises/matching-brackets/matching_brackets_test.py similarity index 95% rename from exercises/bracket-push/bracket_push_test.py rename to exercises/matching-brackets/matching_brackets_test.py index 9dfd06489bf..3ed117f18de 100644 --- a/exercises/bracket-push/bracket_push_test.py +++ b/exercises/matching-brackets/matching_brackets_test.py @@ -1,11 +1,11 @@ import unittest -from bracket_push import is_paired +from matching_brackets import is_paired -# Tests adapted from `problem-specifications//canonical-data.json` @ v1.5.0 +# Tests adapted from `problem-specifications//canonical-data.json` @ v2.0.0 -class BracketPushTest(unittest.TestCase): +class MatchingBracketsTest(unittest.TestCase): def test_paired_square_brackets(self): self.assertEqual(is_paired("[]"), True)