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

More unit test documentation #314

Merged
merged 6 commits into from
Apr 23, 2020
Merged

More unit test documentation #314

merged 6 commits into from
Apr 23, 2020

Conversation

OddBloke
Copy link
Collaborator

  • Add a list of available pytest fixtures to the gotchas section
  • Document the common mock naming pattern used in the codebase
  • Typo/newlines fixes

Copy link
Collaborator

@igalic igalic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙋‍♀️

HACKING.rst Outdated
.. [#fixture-list] This list of fixtures (with markup) can be
reproduced by running::

py.test-3 --fixtures -q | grep "^[^ ]" | grep -v no | sed 's/.*/* ``\0``/'``
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's up with the two trailing `` here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oop, I think that's holdover from when this was inline in my initial draft. Will fix, thanks!


py.test-3 --fixtures -q | grep "^[^ ]" | grep -v no | sed 's/.*/* ``\0``/'``

in a xenial lxd container with python3-pytest installed.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unrelated: when are we gonna start testing with a newer LTS by default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Travis already tests against the latest PyPI packages by default. So in one sense, we already do.

That said, the reason for this constraint is not our upstream CI testing, it's because we backport the latest cloud-init upstream to xenial, and the unit tests run as part of the package build. This is why Travis has a separate job to test against the xenial versions of our dependencies. So in another sense, the earliest LTS we want the tests (and cloud-init in general) to run on won't change until, at the earliest, xenial leaves standard support in April 2021.

@OddBloke OddBloke merged commit 506590e into canonical:master Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants