@@ -20,7 +20,7 @@ class TestConsoleCommands(unittest.TestCase):
2020
2121 SIMPLE_PATH = 'tests/fixtures/test_simple'
2222 FIBONACCI_PATH = 'examples/riscv/fibonacci/fibonacci'
23- FIBONACCI_DEBUG_PATH = 'examples/riscv/fibonacci/fibonacci_debug '
23+ DEBUG_TEST_PATH = 'tests/fixtures/debug_test '
2424
2525 def setUp (self ):
2626 """Create a fresh console for each test"""
@@ -441,10 +441,10 @@ def test_list_with_debug_info(self):
441441 """Test 'list' command with program compiled with -g"""
442442 # Check if debug binary exists
443443 from pathlib import Path
444- if not Path (self .FIBONACCI_DEBUG_PATH ).exists ():
445- self .skipTest (f'Debug binary not found: { self .FIBONACCI_DEBUG_PATH } ' )
444+ if not Path (self .DEBUG_TEST_PATH ).exists ():
445+ self .skipTest (f'Debug binary not found: { self .DEBUG_TEST_PATH } ' )
446446
447- self .console .onecmd (f'load { self .FIBONACCI_DEBUG_PATH } ' )
447+ self .console .onecmd (f'load { self .DEBUG_TEST_PATH } ' )
448448
449449 # Should have debug info
450450 self .assertTrue (self .console .source_info .has_debug_info )
@@ -459,10 +459,10 @@ def test_list_with_debug_info(self):
459459 def test_list_after_stepping (self ):
460460 """Test 'list' shows correct line after stepping"""
461461 from pathlib import Path
462- if not Path (self .FIBONACCI_DEBUG_PATH ).exists ():
463- self .skipTest (f'Debug binary not found: { self .FIBONACCI_DEBUG_PATH } ' )
462+ if not Path (self .DEBUG_TEST_PATH ).exists ():
463+ self .skipTest (f'Debug binary not found: { self .DEBUG_TEST_PATH } ' )
464464
465- self .console .onecmd (f'load { self .FIBONACCI_DEBUG_PATH } ' )
465+ self .console .onecmd (f'load { self .DEBUG_TEST_PATH } ' )
466466
467467 # Step a few times
468468 self .console .onecmd ('step 3' )
@@ -477,44 +477,44 @@ def test_list_after_stepping(self):
477477 def test_list_with_function_name (self ):
478478 """Test 'list <function>' to show source around function"""
479479 from pathlib import Path
480- if not Path (self .FIBONACCI_DEBUG_PATH ).exists ():
481- self .skipTest (f'Debug binary not found: { self .FIBONACCI_DEBUG_PATH } ' )
480+ if not Path (self .DEBUG_TEST_PATH ).exists ():
481+ self .skipTest (f'Debug binary not found: { self .DEBUG_TEST_PATH } ' )
482482
483- self .console .onecmd (f'load { self .FIBONACCI_DEBUG_PATH } ' )
483+ self .console .onecmd (f'load { self .DEBUG_TEST_PATH } ' )
484484
485485 # Try listing around 'fibonacci' function
486486 self .console .onecmd ('list fibonacci' )
487487
488488 # Should not crash
489- self .assertEqual (self .console .loaded_file , self .FIBONACCI_DEBUG_PATH )
489+ self .assertEqual (self .console .loaded_file , self .DEBUG_TEST_PATH )
490490
491491 def test_list_with_line_number (self ):
492492 """Test 'list <line>' to show source around specific line"""
493493 from pathlib import Path
494- if not Path (self .FIBONACCI_DEBUG_PATH ).exists ():
495- self .skipTest (f'Debug binary not found: { self .FIBONACCI_DEBUG_PATH } ' )
494+ if not Path (self .DEBUG_TEST_PATH ).exists ():
495+ self .skipTest (f'Debug binary not found: { self .DEBUG_TEST_PATH } ' )
496496
497- self .console .onecmd (f'load { self .FIBONACCI_DEBUG_PATH } ' )
497+ self .console .onecmd (f'load { self .DEBUG_TEST_PATH } ' )
498498
499499 # Try listing around line 40
500500 self .console .onecmd ('list 40' )
501501
502502 # Should not crash
503- self .assertEqual (self .console .loaded_file , self .FIBONACCI_DEBUG_PATH )
503+ self .assertEqual (self .console .loaded_file , self .DEBUG_TEST_PATH )
504504
505505 def test_list_alias (self ):
506506 """Test 'l' alias for list command"""
507507 from pathlib import Path
508- if not Path (self .FIBONACCI_DEBUG_PATH ).exists ():
509- self .skipTest (f'Debug binary not found: { self .FIBONACCI_DEBUG_PATH } ' )
508+ if not Path (self .DEBUG_TEST_PATH ).exists ():
509+ self .skipTest (f'Debug binary not found: { self .DEBUG_TEST_PATH } ' )
510510
511- self .console .onecmd (f'load { self .FIBONACCI_DEBUG_PATH } ' )
511+ self .console .onecmd (f'load { self .DEBUG_TEST_PATH } ' )
512512
513513 # 'l' should work the same as 'list'
514514 self .console .onecmd ('l' )
515515
516516 # Should not crash
517- self .assertEqual (self .console .loaded_file , self .FIBONACCI_DEBUG_PATH )
517+ self .assertEqual (self .console .loaded_file , self .DEBUG_TEST_PATH )
518518
519519 def test_list_without_loaded_program (self ):
520520 """Test 'list' without loading a program first"""
0 commit comments