Mercurial > hgrepos > Python > libs > pygments-lexer-pseudocode2
diff 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 |
line wrap: on
line diff
--- a/tests/_tsetup.py Mon Apr 20 13:34:20 2026 +0200 +++ b/tests/_tsetup.py Mon Apr 20 14:12:35 2026 +0200 @@ -13,12 +13,12 @@ import sys -sys.path.insert( - 0, - os.path.abspath( - os.path.normpath(os.path.join(os.path.dirname(__file__), "..")))) - - +PROJECTDIR = os.path.abspath( + os.path.normpath(os.path.join(os.path.dirname(__file__), ".."))) +sys.path.insert(0, PROJECTDIR) +LEXERFILENAME = os.path.join(PROJECTDIR, + "pygments_lexer_pseudocode2/__init__.py") +LEXERCLASS = "PseudocodeLexer2" TESTSNIPPETSDIR = os.path.join( os.path.abspath(os.path.dirname(__file__)), "snippets")
