Fix tests for Python 3.14 and Pygments 2.19
Upgrading to 14.2.0 would also work since these are just backported patches, but this is the most minimal way to finish the current pygments transition (I'm not sure whether a new upstream release of rich would further entangle other packages, such as textual).
Closes: #1123335