diff options
| author | deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com> | 2025-02-14 13:47:05 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-14 13:47:05 +0000 |
| commit | 0f29d52ba932eeed2ae5826c31cbe9a379fd4579 (patch) | |
| tree | dfb7e6025607c503fb7e5e70abf0f8ba91e7e212 /test | |
| parent | 6182930c3ea53932c6153dd101264cb90c90f979 (diff) | |
| download | gdpr-obfuscator-0f29d52ba932eeed2ae5826c31cbe9a379fd4579.tar.gz gdpr-obfuscator-0f29d52ba932eeed2ae5826c31cbe9a379fd4579.zip | |
style: format code with Autopep8, Black and Ruff Formatter
This commit fixes the style issues introduced in 6182930 according to the output
from Autopep8, Black and Ruff Formatter.
Details: https://github.com/ajschofield/gdpr-obfuscator/pull/1
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_csv_reader.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/test/test_csv_reader.py b/test/test_csv_reader.py index d245d7c..ac43b04 100644 --- a/test/test_csv_reader.py +++ b/test/test_csv_reader.py @@ -4,34 +4,38 @@ from main import csv_reader import pytest + def test_empty_csv_should_return_no_content(): content = "" result = csv_reader(content) expected = [] assert result == expected + def test_csv_with_header_only_should_return_no_content(): content = "student_id,name,course\n" result = csv_reader(content) expected = [] assert result == expected + def test_csv_with_valid_data(): content = ( "student_id,name,course\n" "1234,Student 1,Course 1\n" "5678,Student 2,Course 2\n" - ) + ) result = csv_reader(content) expected = [ {"student_id": "1234", "name": "Student 1", "course": "Course 1"}, {"student_id": "5678", "name": "Student 2", "course": "Course 2"}, - ] - assert result == expected + ] + assert result == expected + def test_csv_with_quoted_fields_should_run_as_expected(): content = ( - 'student_id,name,course\n' + "student_id,name,course\n" '1234,"Student 1","Course 1"\n' '5678,"Student 2","Course 2"\n' ) @@ -42,8 +46,9 @@ def test_csv_with_quoted_fields_should_run_as_expected(): ] assert result == expected + def test_non_csv_file_should_return_no_content(): content = "" result = csv_reader(content) expected = [] - assert result == expected
\ No newline at end of file + assert result == expected |
