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

feat(binding/python): new behavior testing for python #3245

Merged
merged 12 commits into from
Oct 9, 2023
Merged

feat(binding/python): new behavior testing for python #3245

merged 12 commits into from
Oct 9, 2023

Conversation

laipz8200
Copy link
Contributor

related to #3066

I made some setup work for Python's test, if it works, I'll add more cases and services for it.

1. Add pytest
1. Add operator fixture
1. Add `test_sync_write`
1. Update `service_test_s3.yaml`
1. Rename `test_rw.py` to `test_write.py`
1. Add license headers to `test_write.py`
@suyanhanx suyanhanx changed the title Test/new behavior testing for python test: new behavior testing for python Oct 9, 2023
@laipz8200 laipz8200 marked this pull request as draft October 9, 2023 09:12
bindings/python/tests/conftest.py Outdated Show resolved Hide resolved
bindings/python/tests/conftest.py Outdated Show resolved Hide resolved
bindings/python/tests/test_read.py Outdated Show resolved Hide resolved
bindings/python/tests/test_read.py Outdated Show resolved Hide resolved
@laipz8200 laipz8200 marked this pull request as ready for review October 9, 2023 11:00
1. Find service name by match `OPENDAL_XXX_TEST`
bindings/python/tests/test_write.py Outdated Show resolved Hide resolved
bindings/python/tests/test_write.py Outdated Show resolved Hide resolved
bindings/python/tests/test_write.py Outdated Show resolved Hide resolved
1. Switch test to xunit-style.
1. Remove try...except block.
1. Add random part in every file name or dir name.
1. Use `pytest -k TestXXX` select service.
1. Use random size between 1..1024 when generate random file.
@laipz8200 laipz8200 requested a review from Xuanwo October 9, 2023 15:34
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Great!

bindings/python/tests/test_services.py Show resolved Hide resolved
@Xuanwo Xuanwo changed the title test: new behavior testing for python feat(binding/python): new behavior testing for python Oct 9, 2023
@Xuanwo Xuanwo merged commit 5d4966e into apache:main Oct 9, 2023
39 checks passed
Zheaoli pushed a commit to Zheaoli/opendal that referenced this pull request Oct 12, 2023
* test(bindings/python): New behavior testing.

1. Add pytest
1. Add operator fixture
1. Add `test_sync_write`
1. Update `service_test_s3.yaml`

* refactor(bindings/python): Rename file

1. Rename `test_rw.py` to `test_write.py`

* chore(bindings/python): Add license headers

1. Add license headers to `test_write.py`

* test(bindings/python): Add more cases.

* test(bindings/python): Add redis workflow

* test(bindings/python): Remove redis test.

it seems that this Python binding dose not currently support redis feature.

* test(bindings/python): Load `.env` file before run tests.

* test(bindings/python): Remove `random_file` fixture

* refactor(bindings/python): Use `os.urandom` to create bytes

* test(bindings/python): Update `operator` fixture

1. Find service name by match `OPENDAL_XXX_TEST`

* test(bindings/python): Switch test to xunit-style

1. Switch test to xunit-style.
1. Remove try...except block.
1. Add random part in every file name or dir name.
1. Use `pytest -k TestXXX` select service.
1. Use random size between 1..1024 when generate random file.

---------

Co-authored-by: Xuanwo <github@xuanwo.io>
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.

None yet

2 participants