|
|
@@ -1,6 +1,6 @@ |
|
|
|
# -*- coding: utf-8 -*- |
|
|
|
# |
|
|
|
# Copyright (C) 2012-2016 Ben Kurtovic <ben.kurtovic@gmail.com> |
|
|
|
# Copyright (C) 2012-2019 Ben Kurtovic <ben.kurtovic@gmail.com> |
|
|
|
# |
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy |
|
|
|
# of this software and associated documentation files (the "Software"), to deal |
|
|
@@ -23,6 +23,7 @@ |
|
|
|
from __future__ import unicode_literals |
|
|
|
import unittest |
|
|
|
|
|
|
|
from mwparserfromhell.parser import contexts |
|
|
|
from mwparserfromhell.parser.tokenizer import Tokenizer |
|
|
|
|
|
|
|
from ._test_tokenizer import TokenizerTestCase |
|
|
@@ -40,5 +41,10 @@ class TestPyTokenizer(TokenizerTestCase, unittest.TestCase): |
|
|
|
self.assertFalse(Tokenizer.USES_C) |
|
|
|
self.assertFalse(Tokenizer().USES_C) |
|
|
|
|
|
|
|
def test_describe_context(self): |
|
|
|
self.assertEqual("", contexts.describe(0)) |
|
|
|
ctx = contexts.describe(contexts.TEMPLATE_PARAM_KEY|contexts.HAS_TEXT) |
|
|
|
self.assertEqual("TEMPLATE_PARAM_KEY|HAS_TEXT", ctx) |
|
|
|
|
|
|
|
if __name__ == "__main__": |
|
|
|
unittest.main(verbosity=2) |