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

Testing: Refactor software tests into dedicated directory tests #659

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

amotl
Copy link
Member

@amotl amotl commented Oct 31, 2024

About

Refactor the layout of the software tests: Tests are no longer inline with their modules (which also made them being included into the release packages), but now live in a separate, dedicated directory within the repository, a conventional top-level tests folder.

Contrary to the test cases that have been refactored, the testing utilities within crate.testing still exist, and will continue to be shipped.

Rationale

Before releasing 1.0.0, we would like to get the shape of the repository in order. This patch makes a start on that.

Preview

https://github.com/crate/crate-python/tree/better-testing/tests

Details

No other functional changes inside.

References

@cla-bot cla-bot bot added the cla-signed label Oct 31, 2024
@amotl amotl force-pushed the better-testing branch 2 times, most recently from 71d02da to 2b6b835 Compare October 31, 2024 13:25
@amotl amotl marked this pull request as ready for review October 31, 2024 13:30
... when another CrateDB is running on the default port 4200.
`tests.py` is the entrypoint file that will be used by `zope.testing` to
discover the test cases on behalf of what's returned from `test_suite`.

It is better to not overload it with other support code that may also be
needed in other contexts.
git mv src/crate/client/test* tests/client/
git mv src/crate/testing/test* tests/testing/
@amotl amotl requested review from simonprickett and removed request for matriv November 1, 2024 08:32
Copy link

@kneth kneth left a comment

Choose a reason for hiding this comment

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

That's a lot of moving stuff around 😄

@amotl amotl merged commit a525a63 into master Nov 1, 2024
17 checks passed
@amotl amotl deleted the better-testing branch November 1, 2024 09:46
@amotl
Copy link
Member Author

amotl commented Nov 1, 2024

That's a lot of moving stuff around 😄

I did it just for you to have a perfect view into what's actually inside, by digesting software tests, now better to explore and read than beforehand.

-- https://github.com/crate/crate-python/tree/master/tests

Note that the repository also includes doctests, that can also help to get an idea about the surface of the library.

-- https://github.com/crate/crate-python/tree/master/docs/by-example
-- https://cratedb.com/docs/python/en/latest/by-example/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants