Skip to content

Commit a52a111

Browse files
committed
[lldb][NFC] Remove 'from __future__ import print_function' from all tests that don't actually call 'print()'
Summary: A lot of tests do this trick but the vast majority of them don't even call `print()`. Most of this patch was generated by a script that just looks at all the files and deletes the line if there is no `print (` or `print(` anywhere else in the file. I checked the remaining tests manually and deleted the import if we never call print (but instead do stuff like `expr print(...)` and similar false-positives). I also corrected the additional empty lines after the import in the files that I manually edited. Reviewers: JDevlieghere, labath, jfb Reviewed By: labath Subscribers: dexonsmith, wuzish, nemanjai, kbarton, christof, arphaman, abidh, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D71452
1 parent caa7c9e commit a52a111

File tree

514 files changed

+0
-536
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

514 files changed

+0
-536
lines changed

lldb/packages/Python/lldbsuite/test/android/platform/TestDefaultCacheLineSize.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Verify the default cache line size for android targets
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/api/listeners/TestListener.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that we can listen to modules loaded events.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/arm/breakpoint-it/TestBreakpointIt.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that breakpoints in an IT instruction don't fire if their condition is
33
false.
44
"""
5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/arm/breakpoint-thumb-codesection/TestBreakpointThumbCodesection.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that breakpoints correctly work in an thumb function in an arbitrary
33
named codesection.
44
"""
5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/add-dsym/uuid/TestAddDsymCommand.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Test that the 'add-dsym', aka 'target symbols add', command informs the user about success or failure."""
22

3-
from __future__ import print_function
43

54

65
import os

lldb/packages/Python/lldbsuite/test/commands/apropos/with-process/TestAproposWithProcess.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that apropos env doesn't crash trying to touch the process plugin command
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/command/history/TestCommandHistory.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test the command history mechanism
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/command/nested_alias/TestNestedAlias.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that an alias can reference other aliases without crashing.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/command/script/TestCommandScript.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test lldb Python commands.
33
"""
44

5-
from __future__ import print_function
65

76
import sys
87
import lldb

lldb/packages/Python/lldbsuite/test/commands/command/script/callables.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11

2-
from __future__ import print_function
32

43
import lldb
54

lldb/packages/Python/lldbsuite/test/commands/command/script/import/TestImport.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Test custom import command to import files by path."""
22

3-
from __future__ import print_function
43

54

65
import lldb

lldb/packages/Python/lldbsuite/test/commands/command/script/import/rdar-12586188/TestRdar12586188.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Check that we handle an ImportError in a special way when command script importing files."""
22

3-
from __future__ import print_function
43

54

65
import lldb

lldb/packages/Python/lldbsuite/test/commands/command/script_alias/TestCommandScriptAlias.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test lldb Python commands.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/command/source/TestCommandSource.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that lldb command "command source" works correctly.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestDisassembleBreakpoint.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test some lldb command abbreviations.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/disassemble/basic/TestFrameDisassemble.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test to ensure SBFrame::Disassemble produces SOME output
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/anonymous-struct/TestCallUserAnonTypedef.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
Ticket: https://llvm.org/bugs/show_bug.cgi?id=26790
77
"""
88

9-
from __future__ import print_function
109

1110
import lldb
1211

lldb/packages/Python/lldbsuite/test/commands/expression/calculator_mode/TestCalculatorMode.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test calling an expression without a target.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallBuiltinFunction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Tests calling builtin functions using expression evaluation.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStdStringFunction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test calling std::String member functions.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallStopAndContinue.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test calling a function, stopping in the call, continue and gather the result on stop.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/call-function/TestCallUserDefinedFunction.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
88
"""
99

10-
from __future__ import print_function
1110

1211

1312
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/call-restarts/TestCallThatRestarts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test calling a function that hits a signal set to auto-restart, make sure the call completes.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/call-throws/TestCallThatThrows.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test calling a function that throws an ObjC exception, make sure that it doesn't propagate the exception.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/char/TestExprsChar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21

32

43
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/completion/TestExprCompletion.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test the lldb command line completion mechanism for the 'expr' command.
33
"""
44

5-
from __future__ import print_function
65

76
import lldb
87
from lldbsuite.test.decorators import *

lldb/packages/Python/lldbsuite/test/commands/expression/dont_allow_jit/TestAllowJIT.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that --allow-jit=false does disallow JITting:
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/expr-in-syscall/TestExpressionInSyscall.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
"""Test that we are able to evaluate expressions when the inferior is blocked in a syscall"""
22

3-
from __future__ import print_function
4-
5-
63
import lldb
74
from lldbsuite.test.decorators import *
85
from lldbsuite.test.lldbtest import *

lldb/packages/Python/lldbsuite/test/commands/expression/fixits/TestFixIts.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test calling an expression with errors that a FixIt can fix.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/formatters/TestFormatters.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test using LLDB data formatters with frozen objects coming from the expression parser.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/ir-interpreter/TestIRInterpreter.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test the IR interpreter
33
"""
44

5-
from __future__ import print_function
65

76
import unittest2
87

lldb/packages/Python/lldbsuite/test/commands/expression/issue_11588/Test11588.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
expected in a SyntheticChildrenProvider
55
"""
66

7-
from __future__ import print_function
87

98

109
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/macros/TestMacros.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21

32

43
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/options/TestExprOptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
Test expression command options.
88
"""
99

10-
from __future__ import print_function
1110

1211

1312
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/persist_objc_pointeetype/TestPersistObjCPointeeType.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that we can p *objcObject
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/persistent_ptr_update/TestPersistentPtrUpdate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that we can have persistent pointer variables
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestNestedPersistentTypes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that nested persistent types work.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/persistent_types/TestPersistentTypes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that lldb persistent types works correctly.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/persistent_variables/TestPersistentVariables.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that lldb persistent variables works correctly.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/po_verbosity/TestPoVerbosity.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that the po command acts correctly.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/pr35310/TestExprsBug35310.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21

32
import lldb
43
from lldbsuite.test.decorators import *

lldb/packages/Python/lldbsuite/test/commands/expression/radar_8638051/Test8638051.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test the robustness of lldb expression parser.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/radar_9531204/TestPrintfAfterUp.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
The evaluating printf(...) after break stop and then up a stack frame.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/radar_9673664/TestExprHelpExamples.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test example snippets from the lldb 'help expression' output.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/save_jit_objects/TestSaveJITObjects.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test that LLDB can emit JIT objects when the appropriate setting is enabled
33
"""
44

5-
from __future__ import print_function
65

76
import os
87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/scoped_enums/TestScopedEnumType.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
from __future__ import print_function
21

32

43
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
Throw some expression commands with quotes at lldb.
1212
"""
1313

14-
from __future__ import print_function
1514

1615

1716
import unittest2

lldb/packages/Python/lldbsuite/test/commands/expression/test/TestExprs2.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test some more expression commands.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/timeout/TestCallWithTimeout.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test calling a function that waits a while, and make sure the timeout option to expr works.
33
"""
44

5-
from __future__ import print_function
65

76

87
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/top-level/TestTopLevelExprs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test top-level expressions.
33
"""
44

5-
from __future__ import print_function
65

76

87
import unittest2

lldb/packages/Python/lldbsuite/test/commands/expression/two-files/TestObjCTypeQueryFromOtherCompileUnit.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
The expression parser's type search only looks in the current compilation unit for types.
55
"""
66

7-
from __future__ import print_function
87

98

109
import lldb

lldb/packages/Python/lldbsuite/test/commands/expression/unwind_expression/TestUnwindExpression.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
Test stopping at a breakpoint in an expression, and unwinding from there.
33
"""
44

5-
from __future__ import print_function
65

76

87
import unittest2

0 commit comments

Comments
 (0)