소스 검색

Update changelog, remove now-unneeded test discovery script, cleanup

tags/v0.5.2
Ben Kurtovic 5 년 전
부모
커밋
de6e671c40
5개의 변경된 파일8개의 추가작업 그리고 21개의 파일을 삭제
  1. +1
    -0
      CHANGELOG
  2. +3
    -0
      docs/changelog.rst
  3. +2
    -2
      setup.py
  4. +2
    -2
      tests/_test_tokenizer.py
  5. +0
    -17
      tests/discover.py

+ 1
- 0
CHANGELOG 파일 보기

@@ -1,5 +1,6 @@
v0.6 (unreleased):

- Dropped support for end-of-life Python versions 2.6, 3.2, 3.3. (#199, #204)
- Fixed <wbr> not being considered a single-only tag. (#200)

v0.5.1 (released March 3, 2018):


+ 3
- 0
docs/changelog.rst 파일 보기

@@ -7,6 +7,9 @@ v0.6
Unreleased
(`changes <https://github.com/earwig/mwparserfromhell/compare/v0.5.1...develop>`__):

- Dropped support for end-of-life Python versions 2.6, 3.2, 3.3.
(`#199 <https://github.com/earwig/mwparserfromhell/issues/199>`,
`#204 <https://github.com/earwig/mwparserfromhell/pull/204>`)
- Fixed `<wbr>` not being considered a single-only tag.
(`#200 <https://github.com/earwig/mwparserfromhell/pull/200>`)



+ 2
- 2
setup.py 파일 보기

@@ -76,13 +76,13 @@ if fallback:

tokenizer = Extension("mwparserfromhell.parser._tokenizer",
sources=sorted(glob("mwparserfromhell/parser/ctokenizer/*.c")),
depends=glob("mwparserfromhell/parser/ctokenizer/*.h"))
depends=sorted(glob("mwparserfromhell/parser/ctokenizer/*.h")))

setup(
name = "mwparserfromhell",
packages = find_packages(exclude=("tests",)),
ext_modules = [tokenizer] if use_extension else [],
test_suite = "tests.discover",
test_suite = "tests",
version = __version__,
author = "Ben Kurtovic",
author_email = "ben.kurtovic@gmail.com",


+ 2
- 2
tests/_test_tokenizer.py 파일 보기

@@ -109,7 +109,7 @@ class TokenizerTestCase(object):
print(error.format(filename))
continue
if data["input"] is None or data["output"] is None:
error = "Test '{0}' in '{1}' was ignored because it lacked an input or an output"
error = "Test '{}' in '{}' was ignored because it lacked an input or an output"
print(error.format(data["name"], filename))
continue

@@ -126,7 +126,7 @@ class TokenizerTestCase(object):
def build(cls):
"""Load and install all tests from the 'tokenizer' directory."""
def load_file(filename, restrict=None):
with codecs.open(filename, "rU", encoding="utf8") as fp:
with codecs.open(filename, "r", encoding="utf8") as fp:
text = fp.read()
name = path.split(filename)[1][:-len(extension)]
cls._load_tests(filename, name, text, restrict)


+ 0
- 17
tests/discover.py 파일 보기

@@ -1,17 +0,0 @@
# -*- coding: utf-8 -*-

"""
It appears the default distutils test suite doesn't play nice with
``setUpClass`` thereby making some tests fail. Using ``unittest2`` to load
tests seems to work around that issue.

http://stackoverflow.com/a/17004409/753501
"""

import os.path

import unittest

def additional_tests():
project_root = os.path.split(os.path.dirname(__file__))[0]
return unittest.defaultTestLoader.discover(project_root)

불러오는 중...
취소
저장