未验证 提交 8457f765 编写于 作者: A Amador Pahim

Merge branch 'clebergnu-python3_port_safeloader_filelock'

Signed-off-by: NAmador Pahim <apahim@redhat.com>
......@@ -42,7 +42,7 @@ class FileLock(object):
def __init__(self, filename, timeout=0):
self.filename = '%s.lock' % filename
self.pid = b'%r' % os.getpid()
self.pid = '{0}'.format(os.getpid()).encode()
self.locked = False
self.timeout = timeout
......
......@@ -130,9 +130,9 @@ class DocstringDirectives(unittest.TestCase):
Tests the regular expressions that deal with docstring directives
"""
for directive in self.VALID_DIRECTIVES:
self.assertRegexpMatches(directive, safeloader.DOCSTRING_DIRECTIVE_RE)
self.assertTrue(safeloader.DOCSTRING_DIRECTIVE_RE.match(directive))
for directive in self.INVALID_DIRECTIVES:
self.assertNotRegexpMatches(directive, safeloader.DOCSTRING_DIRECTIVE_RE)
self.assertFalse(safeloader.DOCSTRING_DIRECTIVE_RE.match(directive))
class UnlimitedDiff(unittest.TestCase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册