Skip to content

Commit

Permalink
Fix StataTranslator tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hugetim authored Oct 17, 2024
1 parent 1693670 commit 48ca21a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions papermill/tests/test_translators.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,23 +646,23 @@ def test_translate_codify_sh(parameters, expected):
(None, '""'),
],
)
def test_translate_type_r(test_input, expected):
def test_translate_type_stata(test_input, expected):
assert translators.StataTranslator.translate(test_input) == expected


@pytest.mark.parametrize("test_input,expected", [("", '*'), ("foo", '* foo'), ("['best effort']", "* ['best effort']")])
def test_translate_comment_r(test_input, expected):
def test_translate_comment_stata(test_input, expected):
assert translators.StataTranslator.comment(test_input) == expected


@pytest.mark.parametrize(
"parameters,expected",
[
({"foo": "bar"}, '* Parameters\nglobal foo = "bar"\n'),
({"foo": "bar"}, '* Parameters\nglobal foo = `"bar"'\n'),
({"foo": True}, '* Parameters\nglobal foo = 1\n'),
({"foo": 5}, '* Parameters\nglobal foo = 5\n'),
({"foo": 1.1}, '* Parameters\nglobal foo = 1.1\n'),
],
)
def test_translate_codify_r(parameters, expected):
def test_translate_codify_stata(parameters, expected):
assert translators.StataTranslator.codify(parameters) == expected

0 comments on commit 48ca21a

Please sign in to comment.