diff options
author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2012-11-26 13:50:06 +0000 |
---|---|---|
committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2012-11-26 13:50:06 +0000 |
commit | 0405a5c84452bc73f3fa111075e3e3138ab3ff24 (patch) | |
tree | 6b1848b8af8fa9c163c61b428e87a6e98c91d898 /test | |
parent | b6bd7db711d2f1da640021b8819a2fbdfffceae0 (diff) | |
download | docutils-0405a5c84452bc73f3fa111075e3e3138ab3ff24.tar.gz |
Use True/False for booleans. frontend.validate_ternary() returns True/False or value.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7539 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test')
-rw-r--r-- | test/DocutilsTestSupport.py | 4 | ||||
-rwxr-xr-x | test/test_functional.py | 2 | ||||
-rwxr-xr-x | test/test_pickle.py | 2 | ||||
-rwxr-xr-x | test/test_publisher.py | 2 | ||||
-rwxr-xr-x | test/test_settings.py | 18 |
5 files changed, 14 insertions, 14 deletions
diff --git a/test/DocutilsTestSupport.py b/test/DocutilsTestSupport.py index e410070d4..ea7e21ce8 100644 --- a/test/DocutilsTestSupport.py +++ b/test/DocutilsTestSupport.py @@ -706,8 +706,8 @@ class WriterPublishTestCase(CustomTestCase, docutils.SettingsSpec): Test case for publish. """ - settings_default_overrides = {'_disable_config': 1, - 'strict_visitor': 1} + settings_default_overrides = {'_disable_config': True, + 'strict_visitor': True} writer_name = '' # set in subclasses or constructor def __init__(self, *args, **kwargs): diff --git a/test/test_functional.py b/test/test_functional.py index 87bc57d44..4d8a26edf 100755 --- a/test/test_functional.py +++ b/test/test_functional.py @@ -123,7 +123,7 @@ expected output and check it in: namespace = {} # Initialize 'settings_overrides' for test settings scripts, # and disable configuration files: - namespace['settings_overrides'] = {'_disable_config': 1} + namespace['settings_overrides'] = {'_disable_config': True} # Read the variables set in the default config file and in # the current config file into namespace: defaultpy = open(join_path(datadir, 'tests', '_default.py')).read() diff --git a/test/test_pickle.py b/test/test_pickle.py index 79e1f15ac..b1a987f16 100755 --- a/test/test_pickle.py +++ b/test/test_pickle.py @@ -18,7 +18,7 @@ class PickleTests(unittest.TestCase): def test_pickle(self): doctree = core.publish_doctree( source='Title\n=====\n\nparagraph\n', - settings_overrides={'_disable_config': 1}) + settings_overrides={'_disable_config': True}) dill = pickle.dumps(doctree) reconstituted = pickle.loads(dill) self.assertEqual(doctree.pformat(), reconstituted.pformat()) diff --git a/test/test_publisher.py b/test/test_publisher.py index f38e3a900..0bbd17f1a 100755 --- a/test/test_publisher.py +++ b/test/test_publisher.py @@ -79,7 +79,7 @@ class PublisherTests(DocutilsTestSupport.StandardTestCase): class PublishDoctreeTestCase(DocutilsTestSupport.StandardTestCase, docutils.SettingsSpec): settings_default_overrides = { - '_disable_config': 1, + '_disable_config': True, 'warning_stream': io.NullOutput()} def test_publish_doctree(self): diff --git a/test/test_settings.py b/test/test_settings.py index 5bff6a0f8..8aaafc6f6 100755 --- a/test/test_settings.py +++ b/test/test_settings.py @@ -39,28 +39,28 @@ class ConfigFileTests(unittest.TestCase): settings = { 'old': {u'datestamp': u'%Y-%m-%d %H:%M UTC', - u'generator': 1, - u'no_random': 1, + u'generator': True, + u'no_random': True, u'python_home': u'http://www.python.org', - u'source_link': 1, + u'source_link': True, 'stylesheet': None, u'stylesheet_path': [fixpath(u'data/stylesheets/pep.css')], 'template': fixpath(u'data/pep-html-template')}, 'one': {u'datestamp': u'%Y-%m-%d %H:%M UTC', - u'generator': 1, - u'no_random': 1, + u'generator': True, + u'no_random': True, u'python_home': u'http://www.python.org', - u'raw_enabled': 0, + u'raw_enabled': False, 'record_dependencies': utils.DependencyList(), - u'source_link': 1, + u'source_link': True, 'stylesheet': None, u'stylesheet_path': [fixpath(u'data/stylesheets/pep.css')], u'tab_width': 8, u'template': fixpath(u'data/pep-html-template'), - u'trim_footnote_reference_space': 1, + u'trim_footnote_reference_space': True, }, 'two': {u'footnote_references': u'superscript', - u'generator': 0, + u'generator': False, 'record_dependencies': utils.DependencyList(), u'stylesheet': None, u'stylesheet_path': [fixpath(u'data/test.css')], |