Skip to content

Clear all indexes before starting tests in a certain context #95

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

Merged
merged 2 commits into from
Jun 8, 2020

Conversation

curquiza
Copy link
Member

@curquiza curquiza commented Jun 6, 2020

Closes #92

Bonus:

I've just started to use pdb as a debugger, so I added it as a tip in the README 🙂
https://docs.python.org/3/library/pdb.html

@curquiza curquiza requested a review from eskombro June 6, 2020 10:00
@curquiza curquiza linked an issue Jun 6, 2020 that may be closed by this pull request
Copy link
Member

@eskombro eskombro left a comment

Choose a reason for hiding this comment

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

This PR looks good to me, I added two optional suggestions (removing one step from clear_all_indexes and checking that the clean actually actually works). If you feel this is useful, you can add it, But if not feel free to merge as it is. 👍

@curquiza curquiza requested a review from eskombro June 8, 2020 12:23
Copy link
Member

@eskombro eskombro left a comment

Choose a reason for hiding this comment

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

Good. But I just thought that this method clear_all_indexes should also be called in the main client test:

https://github.com/meilisearch/meilisearch-python/blob/indep-tests-context/meilisearch/tests/client/test_client.py

And maybe before and after all the tests are done

@curquiza
Copy link
Member Author

curquiza commented Jun 8, 2020

@eskombro I didn't do it because there are no tests on indexes, only on clients. Should I clear all clients in every test? Seems weird...
Don't forget that a client is passed as a parameter in the method clear_all_indexes.

@curquiza curquiza force-pushed the indep-tests-context branch from 293e0a9 to e73740d Compare June 8, 2020 12:38
@eskombro
Copy link
Member

eskombro commented Jun 8, 2020

@eskombro I didn't do it because there are no tests on indexes, only on clients. Should I clear all clients in every test? Seems weird...
Don't forget that a client is passed as a parameter in the method clear_all_indexes.

My bad, I got confused in my head, you are absolutely right, nevermind! :)

@curquiza curquiza merged commit 5875111 into bump-meilisearch-v0.11 Jun 8, 2020
@curquiza curquiza deleted the indep-tests-context branch June 8, 2020 14:50
curquiza added a commit that referenced this pull request Jun 15, 2020
* Upd version

* Add method to use faceting sub routes (#90)

* Remane apikey into api_key (#93)

* Implement faceting in search (#94)

* Implement faceting in search

* Upd test

* Clear all indexes before starting tests in a certain context (#95)

* Clear all indexes before starting tests in a certain context

* Update meilisearch/tests/__init__.py

Co-authored-by: Samuel Jimenez <sjimenezre@gmail.com>

Co-authored-by: Samuel Jimenez <sjimenezre@gmail.com>

* Upd version

* Add method to use faceting sub routes (#90)

* Remane apikey into api_key (#93)

* Implement faceting in search (#94)

* Implement faceting in search

* Upd test

* Fix parameter default value (#97)

* Add test with multiple facetFilters (#98)

* Change create_index prototype (#99)

* Change create_index prototype

* Update meilisearch/client.py

Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>

* Update meilisearch/index.py

Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>

Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>

Co-authored-by: Samuel Jimenez <sjimenezre@gmail.com>
Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
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.

Clear all indexes before each context of test
2 participants