Bug 2350306 - Heads-up: python-TestSlide fails to build with python-pygments 2.19.1 on Fedora 43
Summary: Heads-up: python-TestSlide fails to build with python-pygments 2.19.1 on Fedo...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-TestSlide
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3.14 F43FTBFS 2335657
TreeView+ depends on / blocked
 
Reported: 2025-03-06 11:35 UTC by Karolina Surma
Modified: 2025-07-11 20:11 UTC (History)
2 users (show)

Fixed In Version: python-TestSlide-2.7.1-14.fc43
Clone Of:
Environment:
Last Closed: 2025-07-11 20:11:51 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Karolina Surma 2025-03-06 11:35:03 UTC
python-TestSlide fails to build with python-pygments 2.19.1 in Fedora 43.
I intend to update python-pygments in Fedora Rawhide in ~1 week.

The issue is likely already reported upstream:
https://github.com/facebook/TestSlide/issues/345

The failure:

____________ TestCliLongFormatter.test_prints_exceptions_with_cause ____________

self = <tests.cli_unittest.TestCliLongFormatter testMethod=test_prints_exceptions_with_cause>

    def test_prints_exceptions_with_cause(self):
>       self.run_testslide(
            tty_stdout=True,
            expected_return_code=1,
            expected_in_stdout=(
                '      File \x1b[36m"tests/sample_tests.py"\x1b[39;49;00m, line \x1b[94m76\x1b[39;49;00m, in test_failing\x1b[37m\x1b[39;49;00m\r\n'
                '    \x1b[37m    \x1b[39;49;00m\x1b[94mraise\x1b[39;49;00m \x1b[36mAssertionError\x1b[39;49;00m(\x1b[33m"\x1b[39;49;00m\x1b[33mThird\x1b[39;49;00m\x1b[33m"\x1b[39;49;00m) \x1b[94mfrom\x1b[39;49;00m \x1b[04m\x1b[36mcause\x1b[39;49;00m\x1b[37m\x1b[39;49;00m\r\n'
                "\x1b[0m\x1b[31m      Caused by \x1b[0m\x1b[0m\x1b[31mAssertionError: Second\x1b[0m\r\n"
                '        File \x1b[36m"tests/sample_tests.py"\x1b[39;49;00m, line \x1b[94m74\x1b[39;49;00m, in test_failing\x1b[37m\x1b[39;49;00m\r\n'
                '      \x1b[37m    \x1b[39;49;00m\x1b[94mraise\x1b[39;49;00m \x1b[36mAssertionError\x1b[39;49;00m(\x1b[33m"\x1b[39;49;00m\x1b[33mSecond\x1b[39;49;00m\x1b[33m"\x1b[39;49;00m) \x1b[94mfrom\x1b[39;49;00m \x1b[04m\x1b[36mcause\x1b[39;49;00m\x1b[37m\x1b[39;49;00m\r\n'
                "\x1b[0m\x1b[31m        Caused by \x1b[0m\x1b[0m\x1b[31mAssertionError: First\x1b[0m\r\n"
                '          File \x1b[36m"tests/sample_tests.py"\x1b[39;49;00m, line \x1b[94m72\x1b[39;49;00m, in test_failing\x1b[37m\x1b[39;49;00m\r\n'
                '        \x1b[37m    \x1b[39;49;00m\x1b[94mraise\x1b[39;49;00m \x1b[36mAssertionError\x1b[39;49;00m(\x1b[33m"\x1b[39;49;00m\x1b[33mFirst\x1b[39;49;00m\x1b[33m"\x1b[39;49;00m)\x1b[37m\x1b[39;49;00m\r\n'
            ),
        )

tests/cli_unittest.py:283: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/cli_unittest.py:136: in run_testslide
    self.assertTrue(
E   AssertionError: False is not true : Command ['/usr/bin/python3', '-m', 'testslide.cli', '--show-testslide-stack-trace', '--format', 'long', '/builddir/build/BUILD/python-TestSlide-2.7.1-build/TestSlide-2.7.1/tests/sample_tests.py'] expected to have have in its stdout:
E   
E         File "tests/sample_tests.py", line 76, in test_failing
E           raise AssertionError("Third") from cause
E         Caused by AssertionError: Second
E           File "tests/sample_tests.py", line 74, in test_failing
E             raise AssertionError("Second") from cause
E           Caused by AssertionError: First
E             File "tests/sample_tests.py", line 72, in test_failing
E               raise AssertionError("First")
E   
E   
E   But output was different:
E   top context: passing example
E   top context: failing example: SimulatedFailure: test failure (extra)
E   top context: *focused example
E   top context: skipped example
E   top context: unittest SkipTest
E   top context, nested context: passing nested example
E   tests.sample_tests.SampleTestCase: test_failing: AssertionError: Third
E   tests.sample_tests.SampleTestCase: test_passing
E   tests.sample_tests.SampleTestCase: test_skipped
E   
E   Failures:
E   
E     1) top context: failing example
E       1) SimulatedFailure: test failure (extra)
E         File "testslide/runner.py", line 835, in run
E           self._run_example(example)
E         File "testslide/runner.py", line 819, in _run_example
E           ).run()
E         File "testslide/__init__.py", line 534, in run
E           self._sync_run_all_hooks_and_example(context_data)
E         File "testslide/__init__.py", line 506, in _sync_run_all_hooks_and_example
E           aggregated_exceptions.raise_correct_exception()
E         File "testslide/__init__.py", line 275, in raise_correct_exception
E           raise self.exceptions[0]
E         File "testslide/__init__.py", line 259, in catch
E           yield
E         File "testslide/__init__.py", line 497, in _sync_run_all_hooks_and_example
E           self._fail_if_coroutine_function(self.example.code, context_data)
E         File "testslide/__init__.py", line 465, in _fail_if_coroutine_function
E           return func(*args, **kwargs)
E         File "tests/sample_tests.py", line 42, in failing_example
E           raise SimulatedFailure("test failure", "(extra)")
E   
E     2) tests.sample_tests.SampleTestCase: test_failing
E       1) AssertionError: Third
E         File "testslide/runner.py", line 835, in run
E           self._run_example(example)
E         File "testslide/runner.py", line 819, in _run_example
E           ).run()
E         File "testslide/__init__.py", line 534, in run
E           self._sync_run_all_hooks_and_example(context_data)
E         File "testslide/__init__.py", line 506, in _sync_run_all_hooks_and_example
E           aggregated_exceptions.raise_correct_exception()
E         File "testslide/__init__.py", line 275, in raise_correct_exception
E           raise self.exceptions[0]
E         File "testslide/__init__.py", line 259, in catch
E           yield
E         File "testslide/__init__.py", line 497, in _sync_run_all_hooks_and_example
E           self._fail_if_coroutine_function(self.example.code, context_data)
E         File "testslide/__init__.py", line 465, in _fail_if_coroutine_function
E           return func(*args, **kwargs)
E         File "testslide/cli.py", line 119, in example_code
E           with test_result() as result:
E         File "/usr/lib64/python3.13/contextlib.py", line 148, in __exit__
E           next(self.gen)
E         File "testslide/cli.py", line 108, in test_result
E           result.aggregated_exceptions.raise_correct_exception()
E         File "testslide/__init__.py", line 275, in raise_correct_exception
E           raise self.exceptions[0]
E         File "/usr/lib64/python3.13/unittest/case.py", line 58, in testPartExecutor
E           yield
E         File "/usr/lib64/python3.13/unittest/case.py", line 651, in run
E           self._callTestMethod(testMethod)
E         File "/usr/lib64/python3.13/unittest/case.py", line 606, in _callTestMethod
E           if method() is not None:
E         File "tests/sample_tests.py", line 76, in test_failing
E           raise AssertionError("Third") from cause
E         Caused by AssertionError: Second
E           File "tests/sample_tests.py", line 74, in test_failing
E             raise AssertionError("Second") from cause
E           Caused by AssertionError: First
E             File "tests/sample_tests.py", line 72, in test_failing
E               raise AssertionError("First")
E   
E   Executed 9 examples in 0.2s:
E     Successful: 4
E     Failed: 2
E     Skipped: 3
E     Not executed: 0
E   https://testslide.readthedocs.io/

The testing takes place in COPR:
https://copr.fedorainfracloud.org/coprs/ksurma/pygments-2.19.1-f43/package/python-TestSlide

Comment 1 Fedora Update System 2025-07-11 20:09:41 UTC
FEDORA-2025-0aebcb1a21 (python-TestSlide-2.7.1-14.fc43) has been submitted as an update to Fedora 43.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-0aebcb1a21

Comment 2 Fedora Update System 2025-07-11 20:11:51 UTC
FEDORA-2025-0aebcb1a21 (python-TestSlide-2.7.1-14.fc43) has been pushed to the Fedora 43 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.