Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Homepage = "https://github.com/testing-cabal/testtools"
[project.optional-dependencies]
test = ["testscenarios", "testresources"]
twisted = ["Twisted", "fixtures"]
dev = ["ruff==0.12.11"]
dev = ["ruff==0.13.0"]

[tool.hatch.version]
source = "vcs"
Expand Down
2 changes: 1 addition & 1 deletion testtools/tests/test_assert_that.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def get_error_string(self, e):
break
error = "".join(lines[i:])
# We aren't interested in how the exception type is formatted.
exc_class, error = error.split(": ", 1)
_exc_class, error = error.split(": ", 1)
return error

def test_assertThat_verbose_unicode(self):
Expand Down
2 changes: 1 addition & 1 deletion testtools/tests/test_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ def test_postfix_content(self):
self.assertEqual(expected, actual)

def test___init___sets_content_type(self):
stack_lines, expected = self._get_stack_line_and_expected_output()
stack_lines, _expected = self._get_stack_line_and_expected_output()
content = StackLinesContent(stack_lines)
expected_content_type = ContentType(
"text", "x-traceback", {"language": "python", "charset": "utf8"}
Expand Down
2 changes: 1 addition & 1 deletion testtools/tests/test_testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -802,7 +802,7 @@ def get_error_string(self, e):
break
error = "".join(lines[i:])
# We aren't interested in how the exception type is formatted.
exc_class, error = error.split(": ", 1)
_exc_class, error = error.split(": ", 1)
return error

def test_assertThat_verbose_unicode(self):
Expand Down
10 changes: 5 additions & 5 deletions testtools/tests/test_testresult.py
Original file line number Diff line number Diff line change
Expand Up @@ -2574,7 +2574,7 @@ def check_outcome_details_to_exec_info(self, outcome, expected=None):
# of the text types in the details dict.
if not expected:
expected = outcome
details, err_str = self.get_details_and_string()
details, _err_str = self.get_details_and_string()
getattr(self.converter, outcome)(self, details=details)
err = self.converter._details_to_exc_info(details)
self.assertEqual([(expected, self, err)], self.result._events)
Expand Down Expand Up @@ -3079,7 +3079,7 @@ def test_syntax_error_malformed(self):

def test_syntax_error_line_iso_8859_1(self):
"""Syntax error on a latin-1 line shows the line decoded"""
text, raw = self._get_sample_text("iso-8859-1")
text, _raw = self._get_sample_text("iso-8859-1")
textoutput = self._setup_external_case("import bad")
self._write_module(
"bad", "iso-8859-1", f"# coding: iso-8859-1\n! = 0 # {text}\n"
Expand All @@ -3095,7 +3095,7 @@ def test_syntax_error_line_iso_8859_1(self):

def test_syntax_error_line_iso_8859_5(self):
"""Syntax error on a iso-8859-5 line shows the line decoded"""
text, raw = self._get_sample_text("iso-8859-5")
text, _raw = self._get_sample_text("iso-8859-5")
textoutput = self._setup_external_case("import bad")
self._write_module(
"bad", "iso-8859-5", f"# coding: iso-8859-5\n% = 0 # {text}\n"
Expand All @@ -3118,7 +3118,7 @@ def test_syntax_error_line_iso_8859_5(self):

def test_syntax_error_line_euc_jp(self):
"""Syntax error on a euc_jp line shows the line decoded"""
text, raw = self._get_sample_text("euc_jp")
text, _raw = self._get_sample_text("euc_jp")
textoutput = self._setup_external_case("import bad")
self._write_module("bad", "euc_jp", f"# coding: euc_jp\n$ = 0 # {text}\n")
textoutput = self._run_external_case()
Expand All @@ -3139,7 +3139,7 @@ def test_syntax_error_line_euc_jp(self):

def test_syntax_error_line_utf_8(self):
"""Syntax error on a utf-8 line shows the line decoded"""
text, raw = self._get_sample_text("utf-8")
text, _raw = self._get_sample_text("utf-8")
textoutput = self._setup_external_case("import bad")
self._write_module("bad", "utf-8", f"\ufeff^ = 0 # {text}\n")
textoutput = self._run_external_case()
Expand Down
4 changes: 2 additions & 2 deletions testtools/tests/twistedsupport/test_runtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ def test_something(self):

def test_restore_observers(self):
# We restore the original observers.
publisher, observers = _get_global_publisher_and_observers()
_publisher, observers = _get_global_publisher_and_observers()

class LogSomething(TestCase):
def test_something(self):
Expand All @@ -831,7 +831,7 @@ def test_something(self):

def test_restore_observers_after_timeout(self):
# We restore the original observers even if the test times out.
publisher, observers = _get_global_publisher_and_observers()
_publisher, observers = _get_global_publisher_and_observers()

class LogSomething(TestCase):
def test_something(self):
Expand Down