Fix some warnings from tests.
This commit is contained in:
parent
172e9d2978
commit
a0a5e013fe
3 changed files with 5 additions and 5 deletions
|
|
@ -37,12 +37,12 @@ def _indentation_of_line(line):
|
||||||
|
|
||||||
|
|
||||||
def _is_start_line_of_signature(line):
|
def _is_start_line_of_signature(line):
|
||||||
return re.match("^\s*(async)?\s*def\s", line) is not None
|
return re.match(r"^\s*(async)?\s*def\s", line) is not None
|
||||||
|
|
||||||
|
|
||||||
def _is_end_line_of_signature(line):
|
def _is_end_line_of_signature(line):
|
||||||
return (re.match(".*\):\s*\n$", line) is not None or
|
return (re.match(r".*\):\s*\n$", line) is not None or
|
||||||
re.match(".*\):\s*#.*\n$", line) is not None)
|
re.match(r".*\):\s*#.*\n$", line) is not None)
|
||||||
|
|
||||||
|
|
||||||
def gut_module(module_contents):
|
def gut_module(module_contents):
|
||||||
|
|
|
||||||
|
|
@ -238,7 +238,7 @@ class MainTestCase(unittest.TestCase):
|
||||||
second_dir = os.path.join(temp_dir, "second")
|
second_dir = os.path.join(temp_dir, "second")
|
||||||
os.rename(first_dir, second_dir)
|
os.rename(first_dir, second_dir)
|
||||||
test_run(second_dir, loop)
|
test_run(second_dir, loop)
|
||||||
loop.close()
|
loop.stop()
|
||||||
finally:
|
finally:
|
||||||
shutil.rmtree(temp_dir)
|
shutil.rmtree(temp_dir)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ class ToolsTestCase(unittest.TestCase):
|
||||||
def test_python_modulefinder(self):
|
def test_python_modulefinder(self):
|
||||||
self._test_tool(tools.python_modulefinder, self.HI_NORMAL)
|
self._test_tool(tools.python_modulefinder, self.HI_NORMAL)
|
||||||
|
|
||||||
def test_python_mccable(self):
|
def test_python_mccabe(self):
|
||||||
self._test_tool(tools.python_mccabe, self.HI_OK)
|
self._test_tool(tools.python_mccabe, self.HI_OK)
|
||||||
|
|
||||||
# FIX: Make the golden-file deterministic
|
# FIX: Make the golden-file deterministic
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue