Skip to content

Commit 2f659b2

Browse files
committed
format: drop unit tests, rely on 012_quotes golden fixture
1 parent 92387c5 commit 2f659b2

1 file changed

Lines changed: 0 additions & 40 deletions

File tree

tests/unit/test_format.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -512,43 +512,3 @@ def test_format_line_length_respected():
512512
for line in result.strip().split("\n"):
513513
# Allow slight overshoot for long strings that can't be split
514514
assert len(line) <= 80, f"Line too long: {line!r}"
515-
516-
517-
def test_format_single_to_double_quotes():
518-
code = "bundle agent main\n{\nvars:\n\"a\" string => 'hello';\n}"
519-
result = _format(code)
520-
assert '"a" string => "hello";' in result
521-
assert "'hello'" not in result
522-
523-
524-
def test_format_keep_single_quotes_with_inner_double():
525-
code = 'bundle agent main\n{\nvars:\n"a" string => \'say "hi"\';\n}'
526-
result = _format(code)
527-
assert "'say \"hi\"'" in result
528-
529-
530-
def test_format_double_quotes_unchanged():
531-
code = 'bundle agent main\n{\nvars:\n"a" string => "world";\n}'
532-
result = _format(code)
533-
assert '"a" string => "world";' in result
534-
535-
536-
def test_format_escaped_single_quote_to_double():
537-
code = "bundle agent main\n{\nvars:\n\"a\" string => 'it\\'s here';\n}"
538-
result = _format(code)
539-
assert '"a" string => "it\'s here";' in result
540-
541-
542-
def test_format_single_quotes_in_list():
543-
code = "bundle agent main\n{\nvars:\n\"a\" slist => { 'one', 'two' };\n}"
544-
result = _format(code)
545-
assert '"one"' in result
546-
assert '"two"' in result
547-
assert "'one'" not in result
548-
549-
550-
def test_format_single_quoted_promiser_to_double():
551-
code = "bundle agent main\n{\nreports:\n 'hello';\n}"
552-
result = _format(code)
553-
assert '"hello"' in result
554-
assert "'hello'" not in result

0 commit comments

Comments
 (0)