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

Feature/test print #137

Merged
merged 11 commits into from
Mar 28, 2017
Merged

Feature/test print #137

merged 11 commits into from
Mar 28, 2017

Conversation

rachmadaniHaryono
Copy link
Collaborator

this pr consist:

  • simplify test_print_single_rec
  • test print_rec

Note:

  • for test_print_rec_hypothesis to pass, a fix need when is_range==False and index < 0. The same error message recommended (Negative range boundary)
  • there is already existing print_rec which have several test on one function. while i don't recommend that, i will leave it alone until there is request to change.
  • caplog.clear can't clear the captured log. so i use several possibilities (caplog.records.clear and caplog.handler.records.clear)

related #133

rachmadaniHaryono and others added 4 commits March 20, 2017 22:15
* chg: dev: add db instance for delay_commit check
* chg: dev: remove unused delete_rec test
* chg: test: not check delay commit on empty db test.
* chg: test: use simpler precise test for delete_rec
* fix: test: change pytest parametrize arg
* fix: test: fix instance of BukuDb
* fix: test: fix test.
* fix: test: logic on expected db len
* new: test: test for delete_rec
* new: test: test for delete_rec on empty database
Removing the base implementation for rest APIs. At this point I believe it will
Be better handled by someone who needs it. The current contributions in this
area are very very infrequent. Defects and PRs remain pen over fortnights. It's
difficult to expect the same team to maintain the piece of code even if we ever
receive the full implementation from them.
* new: test: additional data test set.

* new: test: test on non integer.

* chg: test: rename function for consistency.

* chg: test: change normalize function.

* chg: test: change max value for high var

* fix: test: use normalized index

* fix: test: remove 'max' as valid value

* chg: test: use hypothesis to test delete_rec index

* new: test: add hypothesis package

* chg: test: use hypothesis to test delete_rec index

* chg: test:  add hypothesis to travis

* chg: test: limit integer test.

* chg: dev: remove unused test

* fix: test: fix test on non integer.

* new: test: add big integer test on range in delete_rec method.

* fix: test: fix high low diff

* fix: test: skip only for python<3.5

* chg: test: change test_delete_rec_range_and_big_int

- remove skip
- use constant value instead sys.maxsize
- fix assert

* chg: test: use setup.py to manage test package instead travis

* chg: test: add tests extras on setup.py

* chg: test: change install test package.

* fix: test: fix whitespace

* fix: test: MAX_SQLITE_INT value

* chg: test: skip test for python<3.5

* fix: test: fix import

* chg: test: skip Impossible test

* chg: test: simplify test_delete_rec_on_non_interger
@jarun
Copy link
Owner

jarun commented Mar 28, 2017

Please check why this is failing.

@rachmadaniHaryono
Copy link
Collaborator Author

rachmadaniHaryono commented Mar 28, 2017

add another fix

  • the index log error is not the same with range on negative value. range will log Negative range boundary, meanwhile index will log No matching index.
  • fix the tox based on new way to install test package
  • this isn't stated before but value bigger than valid sqlite integer will raise error overflowerror. it is not tested on this test.
  • patch print is only working on py3.5 only.

after this maybe i will add coverage from codecov

@jarun
Copy link
Owner

jarun commented Mar 28, 2017

Can we have tox.ini inside tests directory please?

@jarun
Copy link
Owner

jarun commented Mar 28, 2017

And it shows some conflicts as well.

@rachmadaniHaryono
Copy link
Collaborator Author

Can we have tox.ini inside tests directory please?

no, because it stated on tox page that it have to be at the same folder as setup.py https://tox.readthedocs.io/en/latest/

Then put basic information about your project and the test environments you want your project to run in into a tox.ini file residing right next to your setup.py file:

@jarun
Copy link
Owner

jarun commented Mar 28, 2017

In that case, we need to add it to .gitignore.

Unfortunately it works only if the file is added to .gitignore when it is add the first time. Is it OK if I revert the earlier commit e2989b0 and then you can re-add the tox.ini file again along with the entry in .gitignore?

@jarun
Copy link
Owner

jarun commented Mar 28, 2017

The reversal would be strong.
How about doing a git rm on the tox.ini file first, the re-adding it back with the entry in .gitignore?

With collaborator rights, you can do this yourself.

@jarun jarun merged commit 7be3acc into jarun:master Mar 28, 2017
@rachmadaniHaryono rachmadaniHaryono deleted the feature/test-print branch March 28, 2017 16:50
@rachmadaniHaryono
Copy link
Collaborator Author

How about doing a git rm on the tox.ini file first, the re-adding it back with the entry in .gitignore?

hi i just read that. should i do it? i thought that is only to fix conflict?

@jarun
Copy link
Owner

jarun commented Mar 29, 2017

hi i just read that. should i do it? i thought that is only to fix conflict?

Leave it. No issues!

@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants