Skip to content

Commit 7ca2a98

Browse files
Lotramryneeverett
authored andcommitted
Use pytest skip markers
1 parent 7db6665 commit 7ca2a98

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

tests/services/test_phab.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from datetime import date, datetime, timedelta, timezone
2-
import unittest
2+
3+
import pytest
34

45
from bugwarrior.services.phab import PhabricatorService
56

@@ -52,6 +53,6 @@ def test_to_taskwarrior(self):
5253

5354
assert actual_output == expected_output
5455

55-
@unittest.skip('The phabricator library is hard to mock.')
56+
@pytest.mark.skip(reason='The phabricator library is hard to mock.')
5657
def test_issues(self):
5758
pass

tests/test_docs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import unittest
1010

1111
import docutils.core
12+
import pytest
1213

1314
DOCS_PATH = pathlib.Path(__file__).parent / '../bugwarrior/docs'
1415

@@ -53,14 +54,14 @@ def is_services(node):
5354

5455

5556
class DocsTest(unittest.TestCase):
56-
@unittest.skipIf(not INTERNET, 'no internet')
57+
@pytest.mark.skipif(not INTERNET, reason='no internet')
5758
def test_docs_build_without_warning(self):
5859
with tempfile.TemporaryDirectory() as buildDir:
5960
subprocess.run(
6061
['sphinx-build', '-n', '-W', '-v', str(DOCS_PATH), buildDir], check=True
6162
)
6263

63-
@unittest.skipIf(not INTERNET, 'no internet')
64+
@pytest.mark.skipif(not INTERNET, reason='no internet')
6465
def test_manpage_build_without_warning(self):
6566
with tempfile.TemporaryDirectory() as buildDir:
6667
subprocess.run(

0 commit comments

Comments
 (0)