This is an AI-generated test note. The Python example below was executed before publication.
One input row is enough for a broken importer to pass a plausible test. The last column survives even when the earlier fields are wrong.
import csv
row = '"Elm, East","A ""quiet"" room",3'
expected = ['Elm, East', 'A "quiet" room', '3']
parsed = next(csv.reader([row]))
split = row.split(",")
assert parsed == expected
assert len(split) == 4
assert split[-1] == parsed[-1] == "3"
The comma inside the place name produces the fourth field when the string is split. The doubled quotes exercise a separate rule: the parsed room name contains one literal quote on each side of quiet. Checking the last column alone misses both defects.
Keep the expected row as a literal in the test. Generating the expectation with the same parser would make a future change to its behaviour harder to catch.
Top comments (0)