qutebrowser/tests/unit
Florian Bruhin 3ab40bbc23 Clear globals correctly for all cmdutils tests
TestArgument didn't clear the globals as the fixture was inside
TestRegister.

This means test_run_vulture failed in funny ways because run_vulture.py
generated a whitelist containing "<locals>" for commands:

    tests/unit/scripts/test_run_vulture.py:55: in run
        return run_vulture.run([str(e.basename) for e in files])
    scripts/dev/run_vulture.py:146: in run
        vult.scavenge(files + [whitelist_file.name])
    .tox/py35/lib/python3.5/site-packages/vulture.py:107: in scavenge
        self.scan(module_string)
    .tox/py35/lib/python3.5/site-packages/vulture.py:75: in scan
        node = ast.parse(node_string, filename=self.file)
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    source = 'qutebrowser.browser.commands.CommandDispatcher.buffer\nqutebrowser.misc.savemanager.SaveManager.save_command\nqutebro...iidoc.UsageFormatter._get_default_metavar_for_positional\nscripts.dev.src2asciidoc.UsageFormatter._metavar_formatter\n'
    filename = '/tmp/tmp_ein2umn', mode = 'exec'

        def parse(source, filename='<unknown>', mode='exec'):
            """
            Parse the source into an AST node.
            Equivalent to compile(source, filename, mode, PyCF_ONLY_AST).
            """
    >       return compile(source, filename, mode, PyCF_ONLY_AST)
    E         File "/tmp/tmp_ein2umn", line 16
    E           test_cmdutils.TestArgument.test_wrong_order.<locals>.fun
    E                                                       ^
    E       SyntaxError: invalid syntax
2016-05-18 06:55:17 +02:00
..
browser Fix lint 2016-05-08 11:14:42 +02:00
commands Clear globals correctly for all cmdutils tests 2016-05-18 06:55:17 +02:00
completion Clean up assertion 2016-05-08 20:01:35 +02:00
config Allow flexible whitespace in color strings. 2016-05-03 23:15:39 -04:00
javascript tests: Default to raising=True for qtbot. 2016-01-08 09:49:06 +01:00
keyinput Revert "Handle counts for special keys." 2016-04-29 14:20:11 +02:00
mainwindow flake8: Add hacking 2016-04-08 07:35:53 +02:00
misc Various code style improvements 2016-04-27 20:25:27 +02:00
scripts Adjust copyright years. 2016-01-04 07:12:39 +01:00
utils Get rid of the colorlog dependency 2016-05-13 21:19:33 +02:00