issues: 908465747

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association pull_request body repo type active_lock_reason performed_via_github_app
908465747 MDU6SXNzdWU5MDg0NjU3NDc= 1354 Update help in tests for latest Click 9599 closed 0     1 2021-06-01T16:14:31Z 2021-06-01T16:17:04Z 2021-06-01T16:17:04Z OWNER  

Now that Uvicorn 0.14 is out with an unpinned Click dependency - - our test suite runs against Click 8.0 - which subtly changes the output of --help causing test failures:

    def test_help_includes(name, filename):
        expected = (docs_path / filename).read_text()
        runner = CliRunner()
        result = runner.invoke(cli, name.split() + ["--help"], terminal_width=88)
        actual = f"$ datasette {name} --help\n\n{result.output}"
        # actual has "Usage: cli package [OPTIONS] FILES"
        # because it doesn't know that cli will be aliased to datasette
        expected = expected.replace("Usage: datasette", "Usage: cli")
>       assert expected == actual
E       AssertionError: assert '$ datasette ...e and exit.\n' == '$ datasette ...e and exit.\n'
E         Skipping 848 identical leading characters in diff, use -v to show
E           nt_id xxx
E         + 
E             --version-note TEXT             Additional note to show on /-/versions
E             --secret TEXT                   Secret used for signing secure values, such as signed
E                                             cookies
E         + 
E             --title TEXT                    Title for metadata
107914493 issue    

Links from other tables