From f0445be718da83541ea3401aad882f3937147263 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Mon, 18 Jan 2021 20:39:02 +0100 Subject: Replace tests that assert on token output with auto-updatable samples (#1649) --- tests/test_cpp.py | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'tests/test_cpp.py') diff --git a/tests/test_cpp.py b/tests/test_cpp.py index 7b6d4db4..bb803690 100644 --- a/tests/test_cpp.py +++ b/tests/test_cpp.py @@ -6,35 +6,11 @@ :license: BSD, see LICENSE for details. """ -import pytest - from pygments.lexers import CppLexer, CLexer -from pygments.token import Token from pygments.lexers import guess_lexer -@pytest.fixture(scope='module') -def lexer(): - yield CppLexer() - - -def test_good_comment(lexer): - fragment = '/* foo */\n' - tokens = [ - (Token.Comment.Multiline, '/* foo */'), - (Token.Text, '\n'), - ] - assert list(lexer.get_tokens(fragment)) == tokens - - -def test_open_comment(lexer): - fragment = '/* foo\n' - tokens = [ - (Token.Comment.Multiline, '/* foo\n'), - ] - assert list(lexer.get_tokens(fragment)) == tokens - def test_guess_c_lexer(): code = ''' #include -- cgit v1.2.1