File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 44
55import os
66import time
7+ import pytest
78
89
910def test_environment_variables (session ):
@@ -42,7 +43,7 @@ def test_environment_variables(session):
4243 assert any ("Combined: value1 and value2" in line for line in output )
4344
4445
45- def test_directory_navigation (session ):
46+ def test_directory_navigation (session , tmp_path ):
4647 """Test navigating directories in tmux."""
4748 # Create a window for testing
4849 window = session .new_window (window_name = "dir-test" )
@@ -52,8 +53,9 @@ def test_directory_navigation(session):
5253 pane .send_keys ("clear" , enter = True )
5354 time .sleep (0.3 )
5455
55- # Get and save the initial directory
56- pane .send_keys ("pwd > initial_dir.txt" , enter = True )
56+ # Get and save the initial directory to tmp_path
57+ initial_dir_file = tmp_path / "initial_dir.txt"
58+ pane .send_keys (f"pwd > { initial_dir_file } " , enter = True )
5759 time .sleep (0.5 )
5860
5961 # Navigate to /tmp directory
You can’t perform that action at this time.
0 commit comments