Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix test case
  • Loading branch information
theskumar committed May 30, 2025
commit aa06c8c7af3f978c7cf77a199189c8a44a84937c
5 changes: 5 additions & 0 deletions tests/test_is_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,14 @@ def test_is_interactive_main_module_with_file_attribute_none(self, tmp_path, mon
mock_main.__file__ = None

self._mock_main_import(monkeypatch, mock_main)

# Mock sys.gettrace to ensure debugger detection returns False
monkeypatch.setattr("sys.gettrace", lambda: None)

self._setup_subdir_and_chdir(tmp_path, monkeypatch)

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

Expand Down
Loading