diff options
author | Jordan Rupprecht <rupprecht@google.com> | 2024-02-13 14:19:41 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-13 16:19:41 -0600 |
commit | 5b386158aacac4b41126983a5379d36ed413d0ea (patch) | |
tree | b32bba399bbf4114f5618d35cb6597a9824238a7 /lldb/packages/Python/lldbsuite/test/configuration.py | |
parent | c92bf6b689a1b6c662f3fb30318c67257dbca864 (diff) | |
download | llvm-5b386158aacac4b41126983a5379d36ed413d0ea.zip llvm-5b386158aacac4b41126983a5379d36ed413d0ea.tar.gz llvm-5b386158aacac4b41126983a5379d36ed413d0ea.tar.bz2 |
[lldb][test] Switch LLDB API tests from vendored unittest2 to unittest (#79945)
This removes the dependency LLDB API tests have on
lldb/third_party/Python/module/unittest2, and instead uses the standard
one provided by Python.
This does not actually remove the vendored dep yet, nor update the docs.
I'll do both those once this sticks.
Non-trivial changes to call out:
- expected failures (i.e. "bugnumber") don't have a reason anymore, so
those params were removed
- `assertItemsEqual` is now called `assertCountEqual`
- When a test is marked xfail, our copy of unittest2 considers failures
during teardown to be OK, but modern unittest does not. See
TestThreadLocal.py. (Very likely could be a real bug/leak).
- Our copy of unittest2 was patched to print all test results, even ones
that don't happen, e.g. `(5 passes, 0 failures, 1 errors, 0 skipped,
...)`, but standard unittest prints a terser message that omits test
result types that didn't happen, e.g. `OK (skipped=1)`. Our lit
integration parses this stderr and needs to be updated w/ that
expectation.
I tested this w/ `ninja check-lldb-api` on Linux. There's a good chance
non-Linux tests have similar quirks, but I'm not able to uncover those.
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/configuration.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/configuration.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/configuration.py b/lldb/packages/Python/lldbsuite/test/configuration.py index 2a4b9b3..685f491 100644 --- a/lldb/packages/Python/lldbsuite/test/configuration.py +++ b/lldb/packages/Python/lldbsuite/test/configuration.py @@ -12,14 +12,14 @@ import os # Third-party modules -import unittest2 +import unittest # LLDB Modules import lldbsuite # The test suite. -suite = unittest2.TestSuite() +suite = unittest.TestSuite() # The list of categories we said we care about categories_list = None |