@@ -284,39 +284,6 @@ def test_process_remote_native(argument, mode):
284284 assert print_thread_mock .mock_calls == [call (thread , mode ) for thread in threads ]
285285
286286
287- def test_process_remote_native_last ():
288- # GIVEN
289-
290- argv = ["pystack" , "remote" , "31" , "--native-last" ]
291-
292- threads = [Mock (), Mock (), Mock ()]
293-
294- # WHEN
295-
296- with patch (
297- "pystack.__main__.get_process_threads"
298- ) as get_process_threads_mock , patch (
299- "pystack.__main__.print_thread"
300- ) as print_thread_mock , patch (
301- "sys.argv" , argv
302- ):
303- get_process_threads_mock .return_value = threads
304- main ()
305-
306- # THEN
307-
308- get_process_threads_mock .assert_called_with (
309- 31 ,
310- stop_process = True ,
311- native_mode = NativeReportingMode .LAST ,
312- locals = False ,
313- method = StackMethod .AUTO ,
314- )
315- assert print_thread_mock .mock_calls == [
316- call (thread , NativeReportingMode .LAST ) for thread in threads
317- ]
318-
319-
320287def test_process_remote_locals ():
321288 # GIVEN
322289
@@ -686,48 +653,6 @@ def test_process_core_native(argument, mode):
686653 assert print_thread_mock .mock_calls == [call (thread , mode ) for thread in threads ]
687654
688655
689- def test_process_core_native_last ():
690- # GIVEN
691-
692- argv = ["pystack" , "core" , "corefile" , "executable" , "--native-last" ]
693-
694- threads = [Mock (), Mock (), Mock ()]
695-
696- # WHEN
697-
698- with patch (
699- "pystack.__main__.get_process_threads_for_core"
700- ) as get_process_threads_mock , patch (
701- "pystack.__main__.print_thread"
702- ) as print_thread_mock , patch (
703- "sys.argv" , argv
704- ), patch (
705- "pathlib.Path.exists" , return_value = True
706- ), patch (
707- "pystack.__main__.CoreFileAnalyzer"
708- ), patch (
709- "pystack.__main__.is_elf" , return_value = True
710- ), patch (
711- "pystack.__main__.is_gzip" , return_value = False
712- ):
713- get_process_threads_mock .return_value = threads
714- main ()
715-
716- # THEN
717-
718- get_process_threads_mock .assert_called_with (
719- Path ("corefile" ),
720- Path ("executable" ),
721- library_search_path = "" ,
722- native_mode = NativeReportingMode .LAST ,
723- locals = False ,
724- method = StackMethod .AUTO ,
725- )
726- assert print_thread_mock .mock_calls == [
727- call (thread , NativeReportingMode .LAST ) for thread in threads
728- ]
729-
730-
731656def test_process_core_locals ():
732657 # GIVEN
733658
0 commit comments