File tree Expand file tree Collapse file tree 2 files changed +13
-5
lines changed
Expand file tree Collapse file tree 2 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,15 @@ def test_number_mutations_comprehensive(self):
5757
5858 def test_string_mutations_and_false_positive_prevention (self ):
5959 """Test string mutations and ensure docstrings are not mutated."""
60- # Regular strings should be mutated
60+ # Regular strings should be mutated
6161 node = cst .SimpleString ('"hello"' )
6262 mutations = list (operator_string (node ))
63- assert len (mutations ) == 1
64- assert mutations [0 ].value == '"XXhelloXX"'
63+ # Now includes XX prefix/suffix, uppercase, and capitalize mutations
64+ assert len (mutations ) == 3
65+ mutation_values = [m .value for m in mutations ]
66+ assert '"XXhelloXX"' in mutation_values
67+ assert '"HELLO"' in mutation_values
68+ assert '"Hello"' in mutation_values
6569
6670 # Docstrings should NOT be mutated (false positive prevention)
6771 docstring_cases = [
Original file line number Diff line number Diff line change @@ -31,8 +31,12 @@ class TestOperatorString:
3131 def test_simple_string_mutation (self ):
3232 node = cst .SimpleString ('"hello"' )
3333 mutations = list (operator_string (node ))
34- assert len (mutations ) == 1
35- assert mutations [0 ].value == '"XXhelloXX"'
34+ # Now includes XX prefix/suffix, uppercase, and capitalize mutations
35+ assert len (mutations ) == 3
36+ mutation_values = [m .value for m in mutations ]
37+ assert '"XXhelloXX"' in mutation_values
38+ assert '"HELLO"' in mutation_values
39+ assert '"Hello"' in mutation_values
3640
3741 def test_triple_quoted_string_ignored (self ):
3842 node = cst .SimpleString ('"""docstring"""' )
You can’t perform that action at this time.
0 commit comments