Skip to content

Commit

Permalink
no linting in tox
Browse files Browse the repository at this point in the history
  • Loading branch information
praiskup committed Oct 4, 2024
1 parent dd0423d commit a1dc9a4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/unit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ def skip_if_rpmbuild():
skip("not supported for rpmbuild")


def skip_if_tox():
""" some tests don't work nice with Tox """
if "TOX_WORK_DIR" in os.environ:
skip("doesn't work in tox")


class Capture(object):
class Tee(object):
def __init__(self, stream, silent):
Expand Down
3 changes: 3 additions & 0 deletions test/unit/pep8_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from tito.compat import * # NOQA
from tito.compat import StringIO, redirect_stdout
from unit.fixture import TitoUnitTestFixture, REPO_DIR
from unit import skip_if_tox


class TestPep8(TitoUnitTestFixture):
Expand Down Expand Up @@ -94,6 +95,8 @@ def test_conformance(self):

class UglyHackishTest(TitoUnitTestFixture):
def setUp(self):
# These tests give false-positives for .tox/ directory
skip_if_tox()
TitoUnitTestFixture.setUp(self)
os.chdir(REPO_DIR)

Expand Down

0 comments on commit a1dc9a4

Please sign in to comment.