summaryrefslogtreecommitdiff
path: root/docutils/test
diff options
context:
space:
mode:
Diffstat (limited to 'docutils/test')
-rwxr-xr-xdocutils/test/test_parsers/test_rst/test_tables.py6
-rwxr-xr-xdocutils/test/test_settings.py42
-rwxr-xr-xdocutils/test/test_transforms/test_doctitle.py2
-rwxr-xr-xdocutils/test/test_writers/test_html4css1_parts.py2
-rw-r--r--docutils/test/test_writers/test_html5_polyglot_parts.py2
5 files changed, 27 insertions, 27 deletions
diff --git a/docutils/test/test_parsers/test_rst/test_tables.py b/docutils/test/test_parsers/test_rst/test_tables.py
index be742509c..c4c3ffdb2 100755
--- a/docutils/test/test_parsers/test_rst/test_tables.py
+++ b/docutils/test/test_parsers/test_rst/test_tables.py
@@ -571,7 +571,7 @@ No blank line after table.
| (The first cell of this table may expand |
| to accommodate long filesystem paths.) |
+------------------------------------------------------------------------------+
-""") % ('\n'.join('| %-70s |' % include2[part * 70 : (part + 1) * 70]
+""") % ('\n'.join('| %-70s |' % include2[part * 70 : (part + 1) * 70] # noqa: E203
for part in range(len(include2) // 70 + 1))),
"""\
<document source="test data">
@@ -606,7 +606,7 @@ Something before.
Something afterwards.
And more.
-""") % ('\n'.join('| %-70s |' % include2[part * 70 : (part + 1) * 70]
+""") % ('\n'.join('| %-70s |' % include2[part * 70 : (part + 1) * 70] # noqa: E203
for part in range(len(include2) // 70 + 1))),
"""\
<document source="test data">
@@ -1274,7 +1274,7 @@ Inclusion .. include::
Note The first row of this table may expand
to accommodate long filesystem paths.
========= =====================================================================
-""" % ('\n'.join(' %-65s' % include2[part * 65 : (part + 1) * 65]
+""" % ('\n'.join(' %-65s' % include2[part * 65 : (part + 1) * 65] # noqa: E203
for part in range(len(include2) // 65 + 1))),
"""\
<document source="test data">
diff --git a/docutils/test/test_settings.py b/docutils/test/test_settings.py
index ac6fcd52f..cdfbc1cb1 100755
--- a/docutils/test/test_settings.py
+++ b/docutils/test/test_settings.py
@@ -272,15 +272,15 @@ class HelperFunctionsTests(unittest.TestCase):
self.assertEqual(pathdict['spam'], 'spam')
boolean_settings = (
- (True, True ),
- ('1', True ),
- ('on', True ),
- ('yes', True ),
- ('true', True ),
- ('0', False ),
- ('off', False ),
- ('no', False ),
- ('false', False ),
+ (True, True),
+ ('1', True),
+ ('on', True),
+ ('yes', True),
+ ('true', True),
+ ('0', False),
+ ('off', False),
+ ('no', False),
+ ('false', False),
)
def test_validate_boolean(self):
for t in self.boolean_settings:
@@ -300,10 +300,10 @@ class HelperFunctionsTests(unittest.TestCase):
def test_validate_colon_separated_string_list(self):
tests = (
- ('a', ['a',] ),
- ('a:b', ['a', 'b'] ),
- (['a',], ['a',] ),
- (['a', 'b:c'], ['a', 'b', 'c'] ),
+ ('a', ['a',]),
+ ('a:b', ['a', 'b']),
+ (['a',], ['a',]),
+ (['a', 'b:c'], ['a', 'b', 'c']),
)
for t in tests:
self.assertEqual(
@@ -312,10 +312,10 @@ class HelperFunctionsTests(unittest.TestCase):
def test_validate_comma_separated_list(self):
tests = (
- ('a', ['a',] ),
- ('a,b', ['a', 'b'] ),
- (['a',], ['a',] ),
- (['a', 'b,c'], ['a', 'b', 'c'] ),
+ ('a', ['a',]),
+ ('a,b', ['a', 'b']),
+ (['a',], ['a',]),
+ (['a', 'b,c'], ['a', 'b', 'c']),
)
for t in tests:
self.assertEqual(
@@ -324,10 +324,10 @@ class HelperFunctionsTests(unittest.TestCase):
def test_validate_url_trailing_slash(self):
tests = (
- ('', './' ),
- (None, './' ),
- ('http://example.org', 'http://example.org/' ),
- ('http://example.org/', 'http://example.org/' ),
+ ('', './'),
+ (None, './'),
+ ('http://example.org', 'http://example.org/'),
+ ('http://example.org/', 'http://example.org/'),
)
for t in tests:
self.assertEqual(
diff --git a/docutils/test/test_transforms/test_doctitle.py b/docutils/test/test_transforms/test_doctitle.py
index a09f1d549..02cc9e49c 100755
--- a/docutils/test/test_transforms/test_doctitle.py
+++ b/docutils/test/test_transforms/test_doctitle.py
@@ -21,7 +21,7 @@ class AddNameToDocumentTitle(Directive):
required_arguments = 0
optional_arguments = 0
final_argument_whitespace = True
- option_spec = { }
+ option_spec = {}
has_content = False
def run(self):
diff --git a/docutils/test/test_writers/test_html4css1_parts.py b/docutils/test/test_writers/test_html4css1_parts.py
index c6250d57b..b04afac3e 100755
--- a/docutils/test/test_writers/test_html4css1_parts.py
+++ b/docutils/test/test_writers/test_html4css1_parts.py
@@ -197,7 +197,7 @@ Some stuff
"""]
])
-totest['No title promotion'] = ({'doctitle_xform' : 0,
+totest['No title promotion'] = ({'doctitle_xform': 0,
'stylesheet_path': '',
'embed_stylesheet': 0}, [
["""\
diff --git a/docutils/test/test_writers/test_html5_polyglot_parts.py b/docutils/test/test_writers/test_html5_polyglot_parts.py
index b36254a39..16e3d233c 100644
--- a/docutils/test/test_writers/test_html5_polyglot_parts.py
+++ b/docutils/test/test_writers/test_html5_polyglot_parts.py
@@ -205,7 +205,7 @@ Some stuff
"""]
])
-totest['No title promotion'] = ({'doctitle_xform' : 0,
+totest['No title promotion'] = ({'doctitle_xform': 0,
'stylesheet_path': '',
'embed_stylesheet': 0}, [
["""\