EducationalTestingService / rsmtool

A Python package to facilitate research on building and evaluating automated scoring models.
https://rsmtool.readthedocs.io
Apache License 2.0
66 stars 17 forks source link

Resource warning when running tests #346

Open aloukina opened 4 years ago

aloukina commented 4 years ago

...../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

desilinguist commented 4 years ago

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

desilinguist commented 4 years ago

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

desilinguist commented 4 years ago

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.

aloukina commented 4 years ago

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.

desilinguist commented 4 years ago

Interesting. I will look into it further.

aloukina commented 4 years ago

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

desilinguist commented 4 years ago

Any updates on this @aloukina ?

desilinguist commented 4 years ago

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