From c13ae6633fa9395841dbe81ac16879b80868fa86 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Sun, 9 Jan 2022 18:49:30 +0300 Subject: [PATCH] =?UTF-8?q?Make=20the=20tests=20pass=20with=20Pygments=20?= =?UTF-8?q?=E2=89=A5=202.11.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In https://github.com/pygments/pygments/commit/b4c63595da6bdc45, the default color for .ch (Comment.Hashbang) was changed from #408080 to #3D7B7B. As I want the tests to pass with both old and new Pygments, I am switching to a different selector, .nf (Name.Function) which was not changed. --- tests/test_public_api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_public_api.py b/tests/test_public_api.py index 7cea04f..84338d8 100644 --- a/tests/test_public_api.py +++ b/tests/test_public_api.py @@ -33,7 +33,7 @@ def test_get_pygments_stylesheet(self): except ImportError: raise unittest.SkipTest("Pygments not available") stylesheet = get_pygments_stylesheet(".selector") - self.assertIn(".selector .ch { color: #408080", stylesheet) + self.assertIn(".selector .nf { color: #0000FF", stylesheet) stylesheet = get_pygments_stylesheet(".selector", style="colorful") - self.assertIn(".selector .ch { color: #888888", stylesheet) + self.assertIn(".selector .nf { color: #0066BB", stylesheet) self.assertFalse(get_pygments_stylesheet(".selector", style=""))