Skip to content

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

Merged
Xuanwo merged 12 commits intoapache:mainfrom
laipz8200:test/new_behavior_testing_for_python
Oct 9, 2023
Merged

feat(binding/python): new behavior testing for python#3245
Xuanwo merged 12 commits intoapache:mainfrom
laipz8200:test/new_behavior_testing_for_python

Conversation

@laipz8200
Copy link
Copy Markdown
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
Comment thread bindings/python/tests/conftest.py Outdated
Comment thread bindings/python/tests/conftest.py Outdated
Comment thread bindings/python/tests/test_read.py Outdated
Comment thread bindings/python/tests/test_read.py Outdated
@laipz8200 laipz8200 marked this pull request as ready for review October 9, 2023 11:00
1. Find service name by match `OPENDAL_XXX_TEST`
Comment thread bindings/python/tests/conftest.py Outdated
Comment thread bindings/python/tests/test_write.py Outdated
Comment thread bindings/python/tests/test_write.py Outdated
Comment thread bindings/python/tests/test_write.py Outdated
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
Copy Markdown
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!

Comment thread bindings/python/tests/test_services.py
@Xuanwo Xuanwo changed the title test: new behavior testing for python feat(binding/python): new behavior testing for python Oct 9, 2023
@github-actions github-actions Bot added the releases-note/feat The PR implements a new feature or has a title that begins with "feat" label Oct 9, 2023
@Xuanwo Xuanwo merged commit 5d4966e into apache:main Oct 9, 2023
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

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants