Skip to content

Commit 2685e7e

Browse files
authored
[lldb][docs] Remove/update docs pointing to unittest2 (llvm#82672)
1 parent 32994cc commit 2685e7e

File tree

3 files changed

+8
-23
lines changed

3 files changed

+8
-23
lines changed

lldb/docs/resources/test.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ The LLDB test suite consists of three different kinds of test:
1717
the output.
1818
* **API tests**: Integration tests that interact with the debugger through the
1919
SB API. These are written in Python and use LLDB's ``dotest.py`` testing
20-
framework on top of Python's `unittest2
21-
<https://docs.python.org/2/library/unittest.html>`_.
20+
framework on top of Python's `unittest
21+
<https://docs.python.org/3/library/unittest.html>`_.
2222

2323
All three test suites use ``lit`` (`LLVM Integrated Tester
2424
<https://llvm.org/docs/CommandGuide/lit.html>`_ ) as the test driver. The test
@@ -94,7 +94,7 @@ programs from source, run them, and debug the processes.
9494
As mentioned before, ``dotest.py`` is LLDB's testing framework. The
9595
implementation is located under ``lldb/packages/Python/lldbsuite``. We have
9696
several extensions and custom test primitives on top of what's offered by
97-
`unittest2 <https://docs.python.org/2/library/unittest.html>`_. Those can be
97+
`unittest <https://docs.python.org/3/library/unittest.html>`_. Those can be
9898
found in
9999
`lldbtest.py <https://github.com/llvm/llvm-project/blob/main/lldb/packages/Python/lldbsuite/test/lldbtest.py>`_.
100100

@@ -146,7 +146,7 @@ the test should be run or not.
146146

147147
::
148148

149-
@expectedFailure(checking_function_name)
149+
@skipTestIfFn(checking_function_name)
150150

151151
In addition to providing a lot more flexibility when it comes to writing the
152152
test, the API test also allow for much more complex scenarios when it comes to

lldb/docs/testsuite/a-detailed-walkthrough.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,15 @@ display their output. For brevity, the '-t' output is not included here.
5858
Notice the 'expected failures=1' message at the end of the run. This is because
5959
of a bug currently in lldb such that setting target.process.output-path to
6060
'stdout.txt' does not have any effect on the redirection of the standard output
61-
of the subsequent launched process. We are using unittest2 (a backport of new
62-
unittest features for Python 2.4-2.6) to decorate (mark) the particular test
63-
method as such:
61+
of the subsequent launched process. We are using unittest to decorate (mark)
62+
the particular test method as such:
6463

65-
@unittest2.expectedFailure
64+
@unittest.expectedFailure
6665
# rdar://problem/8435794
6766
# settings set target.process.output-path does not seem to work
6867
def test_set_output_path(self):
6968

70-
See http://pypi.python.org/pypi/unittest2 for more details.
69+
See http://docs.python.org/library/unittest.html for more details.
7170

7271
Now let's look inside the test method:
7372

lldb/packages/Python/lldbsuite/test/README-TestSuite

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,6 @@ to the Python test suite under the current 'test' directory.
9191
Contains platform specific plugin to build binaries with dsym/dwarf debugging
9292
info. Other platform specific functionalities may be added in the future.
9393

94-
- unittest2 directory
95-
96-
Many new features were added to unittest in Python 2.7, including test
97-
discovery. unittest2 allows you to use these features with earlier versions of
98-
Python.
99-
100-
It currently has unittest2 0.5.1 from http://pypi.python.org/pypi/unittest2.
101-
Version 0.5.1 of unittest2 has feature parity with unittest in Python 2.7
102-
final. If you want to ensure that your tests run identically under unittest2
103-
and unittest in Python 2.7 you should use unittest2 0.5.1.
104-
105-
Later versions of unittest2 include changes in unittest made in Python 3.2 and
106-
onwards after the release of Python 2.7.
107-
10894
- Profiling dotest.py runs
10995

11096
I used the following command line thingy to do the profiling on a SnowLeopard

0 commit comments

Comments
 (0)