rsmtool icon indicating copy to clipboard operation
rsmtool copied to clipboard

Resource warning when running tests

Open aloukina opened this issue 5 years ago • 8 comments

...../nose/tools/nontrivial.py:62: ResourceWarning: unclosed file <_io.TextIOWrapper name='/var/folders/h5/64nrr4311wz8gs4nx06pjfm40mrkq3/T/tmp0amdnfk3.jsonlines' mode='r' encoding='UTF-8'> pass ResourceWarning: Enable tracemalloc to get the object allocation traceback

aloukina avatar Jan 28 '20 18:01 aloukina

Sounds like a temporary file isn't being closed properly in a test.

desilinguist avatar Jan 28 '20 18:01 desilinguist

@aloukina do you see this warning on your Mac or in the TravisCI build?

desilinguist avatar Feb 12 '20 18:02 desilinguist

I see a spot where we aren't closing a temporary file but I can't reproduce the warning on my end in the first place so I wouldn't be able to tell if it's fixed.

desilinguist avatar Feb 12 '20 18:02 desilinguist

I see it locally (just checked the most recent log). I do not see it when I run test_reader.py so it's triggered by something other than the spot you linked.

aloukina avatar Feb 13 '20 20:02 aloukina

Interesting. I will look into it further.

desilinguist avatar Feb 13 '20 20:02 desilinguist

I am running test scripts one by one for #352. If I see it pop up, I'll post here.

aloukina avatar Feb 13 '20 20:02 aloukina

Any updates on this @aloukina ?

desilinguist avatar Feb 20 '20 16:02 desilinguist

I see the warning if I just run the simple command nosetests.

desilinguist avatar Feb 21 '20 16:02 desilinguist