Skip to content

Commit

Permalink
Attempt to fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartik Raj committed Feb 1, 2023
1 parent 973aca0 commit 83b6b12
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
1 change: 0 additions & 1 deletion pythonFiles/testing_tools/adapter/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ def __init__(self, *args, **kwargs):


class ParentInfo(namedtuple("ParentInfo", "id kind name root relpath parentid")):

KINDS = ("folder", "file", "suite", "function", "subtest")

def __new__(cls, id, kind, name, root=None, relpath=None, parentid=None):
Expand Down
4 changes: 2 additions & 2 deletions pythonFiles/testing_tools/adapter/pytest/_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import pytest

from .. import util, discovery
from .. import discovery, util
from ._pytest_item import parse_item


Expand All @@ -26,7 +26,7 @@ def discover(
pytestargs = _adjust_pytest_args(pytestargs)
# We use this helper rather than "-pno:terminal" due to possible
# platform-dependent issues.
with (util.hide_stdio() if hidestdio else util.noop_cm()) as stdio:
with util.hide_stdio() if hidestdio else util.noop_cm() as stdio:
ec = _pytest_main(pytestargs, [_plugin])
# See: https://docs.pytest.org/en/latest/usage.html#possible-exit-codes
if ec == 5:
Expand Down
10 changes: 5 additions & 5 deletions pythonFiles/tests/testing_tools/adapter/test___main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@

import unittest

from ...util import Stub, StubProxy
from testing_tools.adapter.__main__ import (
parse_args,
main,
UnsupportedToolError,
UnsupportedCommandError,
UnsupportedToolError,
main,
parse_args,
)

from ...util import Stub, StubProxy


class StubTool(StubProxy):
def __init__(self, name, stub=None):
Expand Down Expand Up @@ -115,7 +116,6 @@ def test_unsupported_tool(self):


class MainTests(unittest.TestCase):

# TODO: We could use an integration test for pytest.discover().

def test_discover(self):
Expand Down
5 changes: 2 additions & 3 deletions pythonFiles/tests/testing_tools/adapter/test_discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@

import unittest

from testing_tools.adapter.discovery import DiscoveredTests, fix_nodeid
from testing_tools.adapter.info import ParentInfo, SingleTestInfo, SingleTestPath
from testing_tools.adapter.util import fix_path, fix_relpath
from testing_tools.adapter.info import SingleTestInfo, SingleTestPath, ParentInfo
from testing_tools.adapter.discovery import fix_nodeid, DiscoveredTests


def _fix_nodeid(nodeid):

nodeid = nodeid.replace("\\", "/")
if not nodeid.startswith("./"):
nodeid = "./" + nodeid
Expand Down
1 change: 0 additions & 1 deletion pythonFiles/unittestadapter/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ class TestOutcomeEnum(str, enum.Enum):


class UnittestTestResult(unittest.TextTestResult):

formatted: Dict[str, Dict[str, str | None]] = dict()

def startTest(self, test: unittest.TestCase):
Expand Down

0 comments on commit 83b6b12

Please sign in to comment.