Bläddra i källkod

Roll back part of e3f89af62d because CURSE YOU UNIT TESTING FRAMEWORK

tags/v0.2
Ben Kurtovic 11 år sedan
förälder
incheckning
cda1ce95f3
3 ändrade filer med 3 tillägg och 4 borttagningar
  1. +1
    -2
      tests/_test_tokenizer.py
  2. +1
    -1
      tests/test_ctokenizer.py
  3. +1
    -1
      tests/test_pytokenizer.py

+ 1
- 2
tests/_test_tokenizer.py Visa fil

@@ -21,7 +21,6 @@
# SOFTWARE.

from __future__ import print_function, unicode_literals
from unittest import TestCase
from os import listdir, path

from mwparserfromhell.compat import py3k
@@ -32,7 +31,7 @@ class _TestParseError(Exception):
pass


class TokenizerTestCase(TestCase):
class TokenizerTestCase(object):
"""A base test case for tokenizers, whose tests are loaded dynamically.

Subclassed along with unittest.TestCase to form TestPyTokenizer and


+ 1
- 1
tests/test_ctokenizer.py Visa fil

@@ -31,7 +31,7 @@ except ImportError:
from ._test_tokenizer import TokenizerTestCase

@unittest.skipUnless(CTokenizer, "C tokenizer not available")
class TestCTokenizer(TokenizerTestCase):
class TestCTokenizer(TokenizerTestCase, unittest.TestCase):
"""Test cases for the C tokenizer."""

@classmethod


+ 1
- 1
tests/test_pytokenizer.py Visa fil

@@ -27,7 +27,7 @@ from mwparserfromhell.parser.tokenizer import Tokenizer

from ._test_tokenizer import TokenizerTestCase

class TestPyTokenizer(TokenizerTestCase):
class TestPyTokenizer(TokenizerTestCase, unittest.TestCase):
"""Test cases for the Python tokenizer."""

@classmethod


Laddar…
Avbryt
Spara