Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79))
self.assertGreaterEqual(
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+1)\n',
indent_word=' ',
max_line_length=79))
# Do not crash.
autopep8.line_shortening_rank('\n',
indent_word=' ',
max_line_length=79)
self.assertGreater(
autopep8.line_shortening_rank('[foo(\nx) for x in y]\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('[foo(x)\nfor x in y]\n',
indent_word=' ',
max_line_length=79))
def test_line_shortening_rank(self):
self.assertGreater(
autopep8.line_shortening_rank('(1\n+1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79))
self.assertGreaterEqual(
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+1)\n',
indent_word=' ',
max_line_length=79))
# Do not crash.
autopep8.line_shortening_rank('\n',
indent_word=' ',
max_line_length=79)
self.assertGreater(
autopep8.line_shortening_rank('[foo(\nx) for x in y]\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('[foo(x)\nfor x in y]\n',
indent_word=' ',
max_line_length=79))
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+1)\n',
indent_word=' ',
max_line_length=79))
# Do not crash.
autopep8.line_shortening_rank('\n',
indent_word=' ',
max_line_length=79)
self.assertGreater(
autopep8.line_shortening_rank('[foo(\nx) for x in y]\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('[foo(x)\nfor x in y]\n',
indent_word=' ',
max_line_length=79))
def test_line_shortening_rank(self):
self.assertGreater(
autopep8.line_shortening_rank('(1\n+1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79))
self.assertGreaterEqual(
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+1)\n',
indent_word=' ',
max_line_length=79))
# Do not crash.
autopep8.line_shortening_rank('\n',
def test_line_shortening_rank(self):
self.assertGreater(
autopep8.line_shortening_rank('(1\n+1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79))
self.assertGreaterEqual(
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+1)\n',
indent_word=' ',
max_line_length=79))
# Do not crash.
autopep8.line_shortening_rank('\n',
indent_word=' ',
max_line_length=79)
def test_line_shortening_rank(self):
self.assertGreater(
autopep8.line_shortening_rank('(1\n+1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79))
self.assertGreaterEqual(
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+1)\n',
indent_word=' ',
max_line_length=79))
# Do not crash.
autopep8.line_shortening_rank('\n',
indent_word=' ',
max_line_length=79)
self.assertGreater(
autopep8.line_shortening_rank('[foo(\nx) for x in y]\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('[foo(x)\nfor x in y]\n',
self.assertGreaterEqual(
autopep8.line_shortening_rank('(1+\n1)\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('(1+1)\n',
indent_word=' ',
max_line_length=79))
# Do not crash.
autopep8.line_shortening_rank('\n',
indent_word=' ',
max_line_length=79)
self.assertGreater(
autopep8.line_shortening_rank('[foo(\nx) for x in y]\n',
indent_word=' ',
max_line_length=79),
autopep8.line_shortening_rank('[foo(x)\nfor x in y]\n',
indent_word=' ',
max_line_length=79))