Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

njsmith
Copy link
Member

@njsmith njsmith commented Oct 28, 2015

Use a different strategy to detect whether np.load creates cycles.

Fixes gh-6571, I hope.

Choose a reason for hiding this comment

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

may be we can disable/enable gc to prevent automatic call, something like:

    gc.disable()
    try:
        gc.collect()
        np.load(f)
        nobj=gc.collect()
    finally:
        gc.enable()
    assert_equal(nobj, 0)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, why not :-). Updated.

Use a different strategy to detect whether np.load creates cycles.

Fixes numpygh-6571, I hope.
@njsmith njsmith force-pushed the test_load_refcount-fix branch from 60efeb0 to 0befb0b Compare October 29, 2015 04:02
@charris
Copy link
Member

charris commented Oct 29, 2015

Guess the only way to be sure is put it in and wait ;) Thanks Nathaniel.

charris added a commit that referenced this pull request Oct 29, 2015
TST: attempt to make test_load_refcount deterministic
@charris charris merged commit 85ec8d9 into numpy:master Oct 29, 2015
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.

3 participants