FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-94808: Improve coverage of dictresize by tqxia · Pull Request #100619 · python/cpython · GitHub

/ cpython Public

gh-94808: Improve coverage of dictresize - #100619

Merged
methane merged 1 commit into
python:mainfrom
tqxia:improve-dictresize-coverage
Dec 31, 2022
Merged

gh-94808: Improve coverage of dictresize#100619
methane merged 1 commit into
python:mainfrom
tqxia:improve-dictresize-coverage

Conversation

tqxia commented Dec 30, 2022
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Try to improve test coverage for Objects/dictobject.c, adding the case "converting a split table into a generic combined table".

Code covered:

cpython/Objects/dictobject.c

Lines 1439 to 1452 in 894f2c3

if (mp->ma_keys->dk_kind == DICT_KEYS_GENERAL) {
// split -> generic
PyDictKeyEntry *newentries = DK_ENTRIES(mp->ma_keys);
for (Py_ssize_t i = 0; i < numentries; i++) {
int index = get_index_from_order(mp, i);
PyDictUnicodeEntry *ep = &oldentries[index];
assert(oldvalues->values[index] != NULL);
newentries[i].me_key = Py_NewRef(ep->me_key);
newentries[i].me_hash = unicode_get_hash(ep->me_key);
newentries[i].me_value = oldvalues->values[index];
}
build_indices_generic(mp->ma_keys, newentries, numentries);
}

Issue:
#94808

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

bedevere-bot added the tests Tests in the Lib/test dir label Dec 30, 2022

ghost commented Dec 30, 2022
edited by ghost
Loading

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL