Skip to content

Commit 54a9545

Browse files
committed
re-run black
1 parent b1a597a commit 54a9545

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

src/_pytest/config/argparsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ def _parse_optional(self, arg_string):
395395
options = ", ".join(option for _, option, _ in option_tuples)
396396
self.error(msg % {"option": arg_string, "matches": options})
397397
elif len(option_tuples) == 1:
398-
option_tuple, = option_tuples
398+
(option_tuple,) = option_tuples
399399
return option_tuple
400400
if self._negative_number_matcher.match(arg_string):
401401
if not self._has_negative_number_optionals:

src/_pytest/pytester.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def getfailedcollections(self) -> List[TestReport]:
312312
return self.getfailures("pytest_collectreport")
313313

314314
def listoutcomes(
315-
self
315+
self,
316316
) -> Tuple[List[TestReport], List[TestReport], List[TestReport]]:
317317
passed = []
318318
skipped = []

testing/python/fixtures.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ def test_func(something): pass
503503
assert repr(req).find(req.function.__name__) != -1
504504

505505
def test_request_attributes_method(self, testdir):
506-
item, = testdir.getitems(
506+
(item,) = testdir.getitems(
507507
"""
508508
import pytest
509509
class TestB(object):
@@ -531,7 +531,7 @@ def test_method(self, something):
531531
pass
532532
"""
533533
)
534-
item1, = testdir.genitems([modcol])
534+
(item1,) = testdir.genitems([modcol])
535535
assert item1.name == "test_method"
536536
arg2fixturedefs = fixtures.FixtureRequest(item1)._arg2fixturedefs
537537
assert len(arg2fixturedefs) == 1
@@ -781,7 +781,7 @@ def test_second():
781781

782782
def test_request_getmodulepath(self, testdir):
783783
modcol = testdir.getmodulecol("def test_somefunc(): pass")
784-
item, = testdir.genitems([modcol])
784+
(item,) = testdir.genitems([modcol])
785785
req = fixtures.FixtureRequest(item)
786786
assert req.fspath == modcol.fspath
787787

testing/python/raises.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def test_match_failure_string_quoting(self):
205205
with pytest.raises(AssertionError) as excinfo:
206206
with pytest.raises(AssertionError, match="'foo"):
207207
raise AssertionError("'bar")
208-
msg, = excinfo.value.args
208+
(msg,) = excinfo.value.args
209209
assert msg == 'Pattern "\'foo" not found in "\'bar"'
210210

211211
def test_raises_match_wrong_type(self):

testing/test_collection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ def test_collect_protocol_single_function(self, testdir):
486486
p = testdir.makepyfile("def test_func(): pass")
487487
id = "::".join([p.basename, "test_func"])
488488
items, hookrec = testdir.inline_genitems(id)
489-
item, = items
489+
(item,) = items
490490
assert item.name == "test_func"
491491
newid = item.nodeid
492492
assert newid == id
@@ -605,9 +605,9 @@ def test_serialization_byid(self, testdir):
605605
testdir.makepyfile("def test_func(): pass")
606606
items, hookrec = testdir.inline_genitems()
607607
assert len(items) == 1
608-
item, = items
608+
(item,) = items
609609
items2, hookrec = testdir.inline_genitems(item.nodeid)
610-
item2, = items2
610+
(item2,) = items2
611611
assert item2.name == item.name
612612
assert item2.fspath == item.fspath
613613

@@ -622,7 +622,7 @@ def test_method(self):
622622
arg = p.basename + "::TestClass::test_method"
623623
items, hookrec = testdir.inline_genitems(arg)
624624
assert len(items) == 1
625-
item, = items
625+
(item,) = items
626626
assert item.nodeid.endswith("TestClass::test_method")
627627
# ensure we are reporting the collection of the single test item (#2464)
628628
assert [x.name for x in self.get_reported_items(hookrec)] == ["test_method"]

testing/test_mark.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ def test_custom_mark_parametrized(obj_type):
10111011
def test_pytest_param_id_requires_string():
10121012
with pytest.raises(TypeError) as excinfo:
10131013
pytest.param(id=True)
1014-
msg, = excinfo.value.args
1014+
(msg,) = excinfo.value.args
10151015
assert msg == "Expected id to be a string, got <class 'bool'>: True"
10161016

10171017

testing/test_skipping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def test_func():
115115
)
116116

117117
def test_skipif_class(self, testdir):
118-
item, = testdir.getitems(
118+
(item,) = testdir.getitems(
119119
"""
120120
import pytest
121121
class TestClass(object):

testing/test_tmpdir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def test_lock_register_cleanup_removal(self, tmp_path):
258258
registry = []
259259
register_cleanup_lock_removal(lock, register=registry.append)
260260

261-
cleanup_func, = registry
261+
(cleanup_func,) = registry
262262

263263
assert lock.is_file()
264264

testing/test_unittest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ def test_hello(self):
383383

384384

385385
def test_testcase_totally_incompatible_exception_info(testdir):
386-
item, = testdir.getitems(
386+
(item,) = testdir.getitems(
387387
"""
388388
from unittest import TestCase
389389
class MyTestCase(TestCase):

0 commit comments

Comments
 (0)