File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -447,13 +447,16 @@ def test_diff_line_counting(self):
447447 def test_max_diff_lines_env_parsing (self ):
448448 """Test that MAX_DIFF_LINES environment variable is parsed correctly."""
449449 import os
450+ from unittest .mock import patch
450451
451- # Test default value
452- max_lines_str = os .environ .get ('MAX_DIFF_LINES' , '5000' )
453- try :
454- max_lines = int (max_lines_str )
455- except ValueError :
456- max_lines = 5000
452+ # Test default value when env var is not set
453+ with patch .dict ('os.environ' , {}, clear = False ):
454+ os .environ .pop ('MAX_DIFF_LINES' , None )
455+ max_lines_str = os .environ .get ('MAX_DIFF_LINES' , '5000' )
456+ try :
457+ max_lines = int (max_lines_str )
458+ except ValueError :
459+ max_lines = 5000
457460
458461 assert max_lines == 5000 # Default when not set
459462
You can’t perform that action at this time.
0 commit comments