Closed lyttonhao closed 9 years ago
@lyttonhao thanks. Please add a test in tests
directory to this PR testing that the file is removed
Already added.
@lyttonhao I believe in your test you are trying to invoke GNR resolver with POST where it sends a file. You don't need to keep the size of file to 1010 names, as anyway gnr_resolve() will slice the list into smaller sizes (<=1000) and then pass it to _gnr_resolve(). Anything with size > 300 would go via POST protocol using a file. So you can reduce the size of file containing name (to 301 names), otherwise it would take unnecessary time during test.
@sckott I have replaced xrange with range in gnr, in my current PR. If you restart the build on CI after that, this PR will pass for python3 as well.
@panks Thanks for your advice. I have changed the query number to 301 in test_gnr_resolve_remove_temporary_file(), and added a new test for testing when queried number is larger than 1000. So I think the large species names file is still needed.
I've restarted the build...
thanks @lyttonhao , but your test failed on python 3.4 https://travis-ci.org/sckott/pytaxize/jobs/56682501
Did you test on python 3?
@sckott , I'm sorry I don't test on python 3.4. I will have a look at it soon.
The temporary file should be removed.