Browse Source

Roll back part of e3f89af62d because CURSE YOU UNIT TESTING FRAMEWORK

tags/v0.2
Ben Kurtovic 11 years ago
parent
commit
cda1ce95f3
3 changed files with 3 additions and 4 deletions
  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 View File

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


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


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




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


Subclassed along with unittest.TestCase to form TestPyTokenizer and Subclassed along with unittest.TestCase to form TestPyTokenizer and


+ 1
- 1
tests/test_ctokenizer.py View File

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


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


@classmethod @classmethod


+ 1
- 1
tests/test_pytokenizer.py View File

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


from ._test_tokenizer import TokenizerTestCase from ._test_tokenizer import TokenizerTestCase


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


@classmethod @classmethod


Loading…
Cancel
Save