tests: Re-format codegen.py with black

This is just the result of running `black $(git ls-files '*.py')`.

For some reason, the `sh-and-py-check` CI job didn’t run on merge
request !3751, so this non-standard formatting slipped through onto
`main`.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3754#note_1939914

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2023-12-11 16:53:44 +00:00
parent b96778ee43
commit 91c82b046e

View File

@ -543,7 +543,9 @@ G_END_DECLS
self.assertEqual("", res.out) self.assertEqual("", res.out)
with open("test-org.project.Bar.Frobnicator.rst", "r") as f: with open("test-org.project.Bar.Frobnicator.rst", "r") as f:
rst = f.read() rst = f.read()
self.assertIn(textwrap.dedent(""" self.assertIn(
textwrap.dedent(
"""
------- -------
Methods Methods
------- -------
@ -558,7 +560,10 @@ G_END_DECLS
RandomMethod () RandomMethod ()
A random test method."""), rst) A random test method."""
),
rst,
)
def test_generate_rst_signal(self): def test_generate_rst_signal(self):
"""Test generating a signal documentation with the rst generator.""" """Test generating a signal documentation with the rst generator."""
@ -582,7 +587,9 @@ G_END_DECLS
self.assertEqual("", res.out) self.assertEqual("", res.out)
with open("test-org.project.Bar.Frobnicator.rst", "r") as f: with open("test-org.project.Bar.Frobnicator.rst", "r") as f:
rst = f.read() rst = f.read()
self.assertIn(textwrap.dedent(""" self.assertIn(
textwrap.dedent(
"""
------- -------
Signals Signals
------- -------
@ -597,7 +604,10 @@ G_END_DECLS
RandomSignal () RandomSignal ()
A random test signal."""), rst) A random test signal."""
),
rst,
)
def test_generate_rst_property(self): def test_generate_rst_property(self):
"""Test generating a property documentation with the rst generator.""" """Test generating a property documentation with the rst generator."""
@ -621,7 +631,9 @@ G_END_DECLS
self.assertEqual("", res.out) self.assertEqual("", res.out)
with open("test-org.project.Bar.Frobnicator.rst", "r") as f: with open("test-org.project.Bar.Frobnicator.rst", "r") as f:
rst = f.read() rst = f.read()
self.assertIn(textwrap.dedent(""" self.assertIn(
textwrap.dedent(
"""
---------- ----------
Properties Properties
---------- ----------
@ -636,7 +648,10 @@ G_END_DECLS
RandomProperty readable s RandomProperty readable s
A random test property."""), rst) A random test property."""
),
rst,
)
@unittest.skipIf(on_win32(), "requires /dev/stdout") @unittest.skipIf(on_win32(), "requires /dev/stdout")
def test_glib_min_required_invalid(self): def test_glib_min_required_invalid(self):