Skip to content

Commit d798ed1

Browse files
style: apply ruff format to tests/test_loader.py
1 parent 16e8c06 commit d798ed1

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/test_loader.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def test_dotenv_empty_lines_skipped(self):
154154
def test_dotenv_quoted_values(self):
155155
with tempfile.TemporaryDirectory() as tmpdir:
156156
p = Path(tmpdir) / ".env"
157-
p.write_text('KEY="quoted value"\nSINGLE=\'single quoted\'\n')
157+
p.write_text("KEY=\"quoted value\"\nSINGLE='single quoted'\n")
158158
result = load_file(str(p))
159159
assert result["KEY"] == "quoted value"
160160
assert result["SINGLE"] == "single quoted"
@@ -178,7 +178,9 @@ def test_dotenv_export_prefix(self):
178178
"""Lines with 'export ' prefix should be parsed correctly."""
179179
with tempfile.TemporaryDirectory() as tmpdir:
180180
p = Path(tmpdir) / ".env"
181-
p.write_text("export DATABASE_URL=postgres://localhost\nexport API_KEY=secret123\n")
181+
p.write_text(
182+
"export DATABASE_URL=postgres://localhost\nexport API_KEY=secret123\n"
183+
)
182184
result = load_file(str(p))
183185
assert result["DATABASE_URL"] == "postgres://localhost"
184186
assert result["API_KEY"] == "secret123"
@@ -232,7 +234,6 @@ def test_nonexistent_file_raises(self):
232234
with pytest.raises((FileNotFoundError, OSError)):
233235
load_file("/nonexistent/path/config.yaml")
234236

235-
236237
def test_dotenv_single_quoted_hash_inside(self):
237238
"""# inside single quotes should be preserved in the value."""
238239
with tempfile.TemporaryDirectory() as tmpdir:

0 commit comments

Comments
 (0)