def test_break_up_import_with_from(self):
        self.assertEqual(
            """\
    from foo import abc
    from foo import math
    from foo import subprocess
""", autoflake.break_up_import('    from foo import abc, subprocess, math\n'))
Beispiel #2
0
    def test_break_up_import_with_from(self):
        self.assertEqual(
            """\
    from foo import abc
    from foo import math
    from foo import subprocess
""",
            autoflake.break_up_import(
                '    from foo import abc, subprocess, math\n'))
 def test_break_up_import_should_do_nothing_on_no_line_ending(self):
     self.assertEqual(
         'import abc, subprocess, math',
         autoflake.break_up_import('import abc, subprocess, math'))
 def test_break_up_import_with_indentation(self):
     self.assertEqual(
         '    import abc\n    import math\n    import subprocess\n',
         autoflake.break_up_import('    import abc, subprocess, math\n'))
Beispiel #5
0
 def test_break_up_import_should_do_nothing_on_no_line_ending(self):
     self.assertEqual(
         'import abc, subprocess, math',
         autoflake.break_up_import('import abc, subprocess, math'))
Beispiel #6
0
 def test_break_up_import_with_indentation(self):
     self.assertEqual(
         '    import abc\n    import math\n    import subprocess\n',
         autoflake.break_up_import('    import abc, subprocess, math\n'))