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

Reach 100% coverage #80

Merged
merged 12 commits into from
Aug 1, 2018
Merged

Reach 100% coverage #80

merged 12 commits into from
Aug 1, 2018

Conversation

jamadden
Copy link
Member

@jamadden jamadden commented Jul 31, 2018

In tox only for now, coveralls coming in a followup PR or commit.

There are also two minor pure-python bug fixes I discovered.

Addresses #76.

…rage of tests.attrhooks, tests.cucumbers and tests.utils.
Two bug fixes for pure-Python mode: deleting _p_oid and deleting *any* _p attribute.
Deleted _makeOctets since we have native literals everywhere.
Two of the tests for _p_serial weren't catching what we thought they were.
Remove the old workaround for a broken __cmp__.
There are many fewer 'no cover' lines now.

Remove the call to copy_reg.constructor---it doesn't do anything anymore except check that the object is callable, there is no registry.

Also make timestamp support PURE_PYTHON.
Do this everywhere for simplicity. It slows PyPy down by 3x, but that should still only be around 4s.
Copy link
Member

@mgedmin mgedmin left a comment

Choose a reason for hiding this comment

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

LGTM

(The diff is rather on the large side, so I haven't scrutinized it very attentively. I place my trust in the test suite.)

def mru(oid):
# Mimic what the real cache does
if oid not in jar._cache._mru:
raise KeyError(oid)
orig_mru(oid)
raise AssertionError("Shold never get here")
Copy link
Member

Choose a reason for hiding this comment

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

Shold -> Should

@jamadden
Copy link
Member Author

jamadden commented Aug 1, 2018

Thanks. For the most part it's very small changes, just quite a few of them. The most potentially disruptive change is in init.py, which I simplified substantially, including taking out an attempted import of persistent.TimeStamp (note case) which should always fail. As far as I can see that's a rename that happened in the distant past.

I'll add this to CHANGES.

[skip ci]

Update PyPI links in readme.

Fix typo in test_persistence.py
@jamadden jamadden merged commit de8680b into master Aug 1, 2018
@jamadden jamadden deleted the coverage branch August 1, 2018 12:40
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.

2 participants