Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Avoid TestData throwing a warning in test_encoding.py #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 11, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions html5lib/tests/test_encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
except AttributeError:
unittest.TestCase.assertEqual = unittest.TestCase.assertEquals

from .support import get_data_files, TestData, test_dir, errorMessage
from .support import get_data_files, test_dir, errorMessage, TestData as _TestData
from html5lib import HTMLParser, inputstream


Expand Down Expand Up @@ -56,7 +56,7 @@ def runPreScanEncodingTest(data, encoding):

def test_encoding():
for filename in get_data_files("encoding"):
tests = TestData(filename, b"data", encoding=None)
tests = _TestData(filename, b"data", encoding=None)
for idx, test in enumerate(tests):
yield (runParserEncodingTest, test[b'data'], test[b'encoding'])
yield (runPreScanEncodingTest, test[b'data'], test[b'encoding'])
Expand Down
17 changes: 16 additions & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
[pytest]
addopts = -rXw -p no:doctest
# Output fails, errors, xpass, and warnings; ignore doctest; make warnings errors
addopts = -rfEXw -p no:doctest --strict

# Make xpass results be considered fail
xfail_strict = true

# Document our markers
markers =
DOM: mark a test as a DOM tree test
ElementTree: mark a test as a ElementTree tree test
cElementTree: mark a test as a cElementTree tree test
lxml: mark a test as a lxml tree test
genshi: mark a test as a genshi tree test
parser: mark a test as a parser test
namespaced: mark a test as a namespaced parser test
treewalker: mark a test as a treewalker test