Dropping explicit unicode literal

In python 3, all strings are considered as unicode string.

This patch drops the explicit unicode literal (u'...')
or (u"..") appearances from the unicode strings.

Change-Id: I833d797cdc14fc360575d7df5026b51e96c367ef
This commit is contained in:
tushargite96 2021-02-16 19:53:18 +05:30
parent f776ef24fa
commit 7cfdb76edd
3 changed files with 11 additions and 11 deletions

View File

@ -25,7 +25,7 @@ extensions = [
master_doc = 'index'
# General information about the project.
copyright = u'2015, OpenStack Foundation'
copyright = '2015, OpenStack Foundation'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
@ -62,7 +62,7 @@ openstackdocs_bug_tag = ''
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index', 'doc-os-brick.tex', u'OS Brick Documentation',
('index', 'doc-os-brick.tex', 'OS Brick Documentation',
'Cinder Contributors', 'manual')
]

View File

@ -50,8 +50,8 @@ class TestExecutor(base.TestCase):
executor = brick_executor.Executor(root_helper=None)
exc = self.assertRaises(putils.ProcessExecutionError,
executor._execute)
self.assertEqual(u'Espa\xf1a', exc.stdout)
self.assertEqual(u'Z\xfcrich', exc.stderr)
self.assertEqual('Espa\xf1a', exc.stdout)
self.assertEqual('Z\xfcrich', exc.stderr)
@mock.patch('sys.stdin', encoding='UTF-8')
@mock.patch('os_brick.executor.priv_rootwrap.execute')
@ -60,8 +60,8 @@ class TestExecutor(base.TestCase):
executor = brick_executor.Executor(root_helper=None)
stdout, stderr = executor._execute()
self.assertEqual(u'Espa\xf1a', stdout)
self.assertEqual(u'Z\xfcrich', stderr)
self.assertEqual('Espa\xf1a', stdout)
self.assertEqual('Z\xfcrich', stderr)
@testtools.skipUnless(six.PY3, 'Specific test for Python 3')
@mock.patch('sys.stdin', encoding='UTF-8')
@ -74,8 +74,8 @@ class TestExecutor(base.TestCase):
executor = brick_executor.Executor(root_helper=None)
exc = self.assertRaises(putils.ProcessExecutionError,
executor._execute)
self.assertEqual(u'Espa\xf1a', exc.stdout)
self.assertEqual(u'Z\xfcrich', exc.stderr)
self.assertEqual('Espa\xf1a', exc.stdout)
self.assertEqual('Z\xfcrich', exc.stderr)
@testtools.skipUnless(six.PY3, 'Specific test for Python 3')
@mock.patch('sys.stdin', encoding='UTF-8')
@ -86,8 +86,8 @@ class TestExecutor(base.TestCase):
executor = brick_executor.Executor(root_helper=None)
stdout, stderr = executor._execute()
self.assertEqual(u'Espa\xf1a', stdout)
self.assertEqual(u'Z\xfcrich', stderr)
self.assertEqual('Espa\xf1a', stdout)
self.assertEqual('Z\xfcrich', stderr)
class TestThread(base.TestCase):

View File

@ -34,7 +34,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
copyright = u'2015, Cinder Developers'
copyright = '2015, Cinder Developers'
# Release notes are unversioned, so we don't need to set version and release
version = ''