Skip to content

Commit aa06c8c

Browse files
committed
Fix test case
1 parent 202af64 commit aa06c8c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/test_is_interactive.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,14 @@ def test_is_interactive_main_module_with_file_attribute_none(self, tmp_path, mon
186186
mock_main.__file__ = None
187187

188188
self._mock_main_import(monkeypatch, mock_main)
189+
190+
# Mock sys.gettrace to ensure debugger detection returns False
191+
monkeypatch.setattr("sys.gettrace", lambda: None)
192+
189193
self._setup_subdir_and_chdir(tmp_path, monkeypatch)
190194

191195
# __file__ = None should still be considered non-interactive
196+
# and with no debugger, find_dotenv should not search from cwd
192197
result = find_dotenv()
193198
assert result == ""
194199

0 commit comments

Comments
 (0)