Skip to content

Commit

Permalink
Merge a11f545 into 34b810f
Browse files Browse the repository at this point in the history
  • Loading branch information
regebro committed Oct 26, 2020
2 parents 34b810f + a11f545 commit 43b0da4
Show file tree
Hide file tree
Showing 8 changed files with 619 additions and 603 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
@@ -1,13 +1,13 @@
language: python
dist: xenial
os: linux

# Travis doesn't support 3.7 by default, but if we run it on xenial it works
matrix:
jobs:
fast_finish: true
include:
- python: 3.6
env: MATRIX=py36
- python: 3.7
sudo: required
dist: bionic
env: MATRIX=py37
- python: pypy3
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Expand Up @@ -33,7 +33,11 @@
packages=find_packages(exclude=["doc", "tests"]),
include_package_data=True,
zip_safe=False,
install_requires=["setuptools", "lxml>=3.1.0", "six",],
install_requires=[
"setuptools",
"lxml>=3.1.0",
"six",
],
test_suite="tests",
entry_points={
"console_scripts": [
Expand Down
12 changes: 10 additions & 2 deletions tests/test_diff.py
Expand Up @@ -796,7 +796,10 @@ def test_match_insert_node(self):
result = self._match(left, right)
self.assertEqual(
result,
[("/document/story", "/document/story"), ("/document", "/document"),],
[
("/document/story", "/document/story"),
("/document", "/document"),
],
)

def test_entirely_different(self):
Expand All @@ -810,7 +813,12 @@ def test_entirely_different(self):
<h1>Inserted <i>Node</i></h1>
</document>"""
result = self._match(left, right)
self.assertEqual(result, [("/document", "/document"),])
self.assertEqual(
result,
[
("/document", "/document"),
],
)


class FastMatchTests(unittest.TestCase):
Expand Down
7 changes: 6 additions & 1 deletion tests/test_formatting.py
Expand Up @@ -99,7 +99,12 @@ def test_rml_bug(self):
</document>"""
tree = etree.fromstring(before_diff)
replacer = formatting.PlaceholderMaker(
text_tags=("para",), formatting_tags=("b", "u", "i",)
text_tags=("para",),
formatting_tags=(
"b",
"u",
"i",
),
)
replacer.do_tree(tree)
after_diff = """<document xmlns:diff="http://namespaces.shoobx.com/diff">
Expand Down

0 comments on commit 43b0da4

Please sign in to comment.