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

Add missing 'get_number_of_citations' method #859

Merged
merged 4 commits into from
Aug 7, 2019
Merged

Conversation

romjerome
Copy link
Contributor

I got a cryptic issue (can reproduce it via etree gramplet or calling self.db.get_number_of_citations() without db loaded).
The method for citation objects seems missing and it returns a "NotImplementedError"
on some specific cases. I suppose it can raise an error too if number of citations is 0
after changes on db status but I cannot provide a proper testcase for this hypothesis.
So, just use the same method as the others primary objects on dummydb module.

See #857 and more details on addons.

Also missing on gramps50 and gramps51 branches.

@codecov-io
Copy link

codecov-io commented Jul 26, 2019

Codecov Report

Merging #859 into master will decrease coverage by <.01%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #859      +/-   ##
==========================================
- Coverage    41.9%    41.9%   -0.01%     
==========================================
  Files        1066     1066              
  Lines      144866   144870       +4     
==========================================
+ Hits        60711    60712       +1     
- Misses      84155    84158       +3
Impacted Files Coverage Δ
gramps/plugins/db/bsddb/test/db_test.py 97.43% <ø> (ø) ⬆️
gramps/gen/db/dummydb.py 31.64% <25%> (-0.04%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9da8f70...bd29ff3. Read the comment docs.

@prculley prculley merged commit 56afb5b into master Aug 7, 2019
@romjerome romjerome deleted the romjerome-patch-1 branch August 11, 2019 17:40
SNoiraud pushed a commit to SNoiraud/gramps that referenced this pull request May 26, 2020
* Add missing 'get_number_of_citations' method

* update db test for bsddb

* fix trailing whitespace

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

Successfully merging this pull request may close these issues.

4 participants