Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

tests: refactor samples fixtures - #423

Merged
tseaver merged 6 commits into
masterfrom
samples-refactor-fixtures
Jul 20, 2021
Merged

tseaver merged 6 commits into
masterfrom
samples-refactor-fixtures

Conversation

@tseaver

@tseaver tseaver commented Jul 19, 2021

Copy link
Copy Markdown
Contributor
  • Move shared fixtures to samples/samples/conftest.py.
  • Parameterize to allow overriding e.g. the sample_name label.
  • Add explicit tests for the create_instance and create_database samples.
  • Drop use of mock.patch for instance: just yield the already-created one for fixture use.
  • Add pytest-dependency plugin, which skips dependent samples if dependency has failed.

Per discussion with @larkee in PR #418.

@tseaver
tseaver requested review from a team, larkee, skuruppu and zoercai July 19, 2021 20:25
@tseaver
tseaver requested a review from a team as a code owner July 19, 2021 20:25
@tseaver
tseaver requested review from dandhlee and removed request for a team July 19, 2021 20:25
@product-auto-label product-auto-label Bot added api: spanner Issues related to the googleapis/python-spanner API. samples Issues that are directly related to samples. labels Jul 19, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Jul 19, 2021
@tseaver
tseaver merged commit fc1bc56 into master Jul 20, 2021
@tseaver
tseaver deleted the samples-refactor-fixtures branch July 20, 2021 17:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/python-spanner API. cla: yes This human has signed the Contributor License Agreement. samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants