Skip to content

Commit

Permalink
chore(coverage): update to not use path
Browse files Browse the repository at this point in the history
  • Loading branch information
5j9 committed Dec 21, 2023
1 parent 535ee20 commit 36257fc
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions dev/coverage.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
from subprocess import check_call
from webbrowser import open_new_tab

from path import Path # requires path
from pathlib import Path # requires path
from os import chdir

repo = Path(__file__).parent.parent
repo.cd()
chdir(repo)
check_call(['coverage', 'run', '-m', 'pytest'])
check_call(['coverage', 'html'])
open_new_tab(repo / 'htmlcov/index.html')
open_new_tab(f'{repo}/htmlcov/index.html')
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ Homepage = "https://github.com/5j9/wikitextparser"

[project.optional-dependencies]
dev = [
"path",
"coverage",
"twine",
]
tests = [
"pytest",
Expand Down
5 changes: 5 additions & 0 deletions tests/test_spans.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,11 @@ def test_no_wikilink_allowed_in_template_name():
def test_invalid_reverse_pipe_trick():
# See: https://github.com/5j9/wikitextparser/pull/78#issuecomment-714343538
assert not bpts(b'[[ |a]]')['WikiLink']


@mark.xfail
def test_invalid_reverse_pipe_trick2():
# See: https://github.com/5j9/wikitextparser/pull/78#issuecomment-714343538
assert not bpts(b'{{#if:test | [[<!-- -->|alt]]}}')['WikiLink']


Expand Down

0 comments on commit 36257fc

Please sign in to comment.