Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert error message content in tests #37

Merged
merged 12 commits into from
Sep 9, 2022

Commits on Sep 8, 2022

  1. chore: ignore dotfiles by default

    The .gitignore now ignores all dotfiles at the repo root, other than those
    explicitly not ignored with !.
    h4l committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    03d35ce View commit details
    Browse the repository at this point in the history
  2. chore(build): configure flake8 to ignore hidden files/dirs

    Flake8 will spend a long time scanning the virtualenv files dir if the
    readme instructions are followed, creating one at /.venv.
    h4l committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    f2fb647 View commit details
    Browse the repository at this point in the history
  3. chore(build): don't auto-run coverage & mypy with pytest

    It's a bit distracting when running tests during development to have
    coverage printed every time, and slows down the tests somewhat. Coverage
    and mypy are now run by CI, but not by default with pytest.
    h4l committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    cd846e7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    be60a28 View commit details
    Browse the repository at this point in the history
  5. test: test ParsedOptions repr

    It was un-covered in the coverage report.
    h4l committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    e56324c View commit details
    Browse the repository at this point in the history
  6. test: remove pragma: no cover from exception raises

    I need to know that these code paths are hit by tests.
    h4l committed Sep 8, 2022
    Configuration menu
    Copy the full SHA
    ca885c7 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2022

  1. test: add tests for parse_longer/_shorter errors

    These errors are not triggered by current tests.
    h4l committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    20cd25a View commit details
    Browse the repository at this point in the history
  2. fix: report parse_longer() invalid arg with ValueError

    This can only occur because of programmer error.
    h4l committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    45ea36a View commit details
    Browse the repository at this point in the history
  3. fix: always report duplicate options with DocoptLanguageError

    These errors are caused by bad usage docs, they shouldn't ever trigger
    DocoptExit as they're not the end user's fault.
    h4l committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    998db81 View commit details
    Browse the repository at this point in the history
  4. test: use a stable sys.argv value during tests

    A lot of docopt tests call docopt() without specifying argv, which uses
    `sys.argv` by default, so a predictable value for it is necessary.
    h4l committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    118f29e View commit details
    Browse the repository at this point in the history
  5. test: assert the messages of raised errors

    I'm planning to make the error messages more user-friendly, (especially
    "Warning: found unmatched (duplicate?) arguments ..."), so I need to verify
    what the messages currently are so I can ensure that any changes are expected.
    h4l committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    db47995 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    df66068 View commit details
    Browse the repository at this point in the history