comparison tests/_tsetup.py @ 18:859ab8abce0a

The first real tests about lexing with the Pygments API for the tests. Also implemented a simple helper to compare token streams with shorter code.
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 20 Apr 2026 14:12:35 +0200
parents 251898f2f0c7
children de1f67eff9d5
comparison
equal deleted inserted replaced
17:251898f2f0c7 18:859ab8abce0a
11 import logging 11 import logging
12 import os 12 import os
13 import sys 13 import sys
14 14
15 15
16 sys.path.insert( 16 PROJECTDIR = os.path.abspath(
17 0, 17 os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))
18 os.path.abspath( 18 sys.path.insert(0, PROJECTDIR)
19 os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))) 19 LEXERFILENAME = os.path.join(PROJECTDIR,
20 20 "pygments_lexer_pseudocode2/__init__.py")
21 21 LEXERCLASS = "PseudocodeLexer2"
22 TESTSNIPPETSDIR = os.path.join( 22 TESTSNIPPETSDIR = os.path.join(
23 os.path.abspath(os.path.dirname(__file__)), 23 os.path.abspath(os.path.dirname(__file__)),
24 "snippets") 24 "snippets")
25 25
26 26