Skip to content

Commit 5f8daa6

Browse files
CopilotCyberSecDef
andauthored
Move importlib import to module level in test_length_enforcement.py
Agent-Logs-Url: https://github.com/CyberSecDef/NovelForge/sessions/f855c09b-c821-4cac-a8ba-53e869009651 Co-authored-by: CyberSecDef <17597068+CyberSecDef@users.noreply.github.com>
1 parent a0e6d6f commit 5f8daa6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_length_enforcement.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
- Integration with _run_all_chapter_agents() via target_words parameter
99
"""
1010

11+
import importlib
12+
1113
import pytest
1214

1315
from novelforge.agents.chapter._helpers import check_chapter_length, expand_chapter
@@ -260,7 +262,6 @@ class TestLengthEnforcementConfig:
260262
"""Verify config constants exist and have sensible defaults."""
261263

262264
def test_chapter_min_length_pct_default(self, monkeypatch):
263-
import importlib
264265
import novelforge.config as cfg
265266
monkeypatch.delenv("CHAPTER_MIN_LENGTH_PCT", raising=False)
266267
importlib.reload(cfg)
@@ -270,7 +271,6 @@ def test_chapter_min_length_pct_default(self, monkeypatch):
270271
importlib.reload(cfg)
271272

272273
def test_max_expansion_attempts_default(self, monkeypatch):
273-
import importlib
274274
import novelforge.config as cfg
275275
monkeypatch.delenv("MAX_EXPANSION_ATTEMPTS", raising=False)
276276
importlib.reload(cfg)

0 commit comments

Comments
 (0)