[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
This commit is contained in:
pre-commit-ci[bot] 2023-10-27 03:38:27 +00:00
parent 64151d44d5
commit 3c8e03cd8a
3 changed files with 12 additions and 13 deletions

View File

@ -661,7 +661,7 @@ class Session(nodes.FSCollector):
self._notfound: List[Tuple[str, Sequence[nodes.Collector]]] = [] self._notfound: List[Tuple[str, Sequence[nodes.Collector]]] = []
self._initial_parts: List[Tuple[Path, List[str]]] = [] self._initial_parts: List[Tuple[Path, List[str]]] = []
self.items: List[nodes.Item] = [] self.items: List[nodes.Item] = []
#import pdb; pdb.set_trace() # import pdb; pdb.set_trace()
hook = self.config.hook hook = self.config.hook
items: Sequence[Union[nodes.Item, nodes.Collector]] = self.items items: Sequence[Union[nodes.Item, nodes.Collector]] = self.items
try: try:
@ -705,11 +705,11 @@ class Session(nodes.FSCollector):
self.testscollected = len(items) self.testscollected = len(items)
# print("[lizhicheng]") # print("[lizhicheng]")
# print(len(items)) # print(len(items))
# print(type(items)) # print(type(items))
# print(items) # print(items)
# # import pdb;pdb.set_trace() # # import pdb;pdb.set_trace()
return items return items
def collect(self) -> Iterator[Union[nodes.Item, nodes.Collector]]: def collect(self) -> Iterator[Union[nodes.Item, nodes.Collector]]:

View File

@ -626,6 +626,7 @@ class NodeKeywords(MutableMapping[str, Any]):
def __repr__(self) -> str: def __repr__(self) -> str:
return f"<NodeKeywords for node {self.node}>" return f"<NodeKeywords for node {self.node}>"
@final @final
@dataclasses.dataclass(frozen=True) @dataclasses.dataclass(frozen=True)
class Test: class Test:
@ -672,7 +673,7 @@ class Test:
Combines by appending args and merging kwargs. Combines by appending args and merging kwargs.
""" """
assert self.name == other.name assert self.name == other.name
# Remember source of ids with parametrize Marks. # Remember source of ids with parametrize Marks.
@ -690,5 +691,3 @@ class Test:
param_ids_from=param_ids_from, param_ids_from=param_ids_from,
_ispytest=True, _ispytest=True,
) )

View File

@ -3,10 +3,10 @@ import pytest
@pytest.mark.test @pytest.mark.test
def mul(): def mul():
assert 24 == (4 * 6) assert 24 == (4 * 6)
def my_test():
print("test_answer")
assert 5 == 5
def my_test():
print("test_answer")
assert 5 == 5