bioperl / bioperl-live

Core BioPerl 1.x code
http://bioperl.org
296 stars 182 forks source link

Problem with test for Bio::Root::HTTPget #337

Open fschwach opened 4 years ago

fschwach commented 4 years ago

My installation of BIoPerl 1.7.7 failed due to a problem with a test for Bio::Root::HTTPget, which I think is wrong. I get these failures:

#   Failed test at t/Root/HTTPget.t line 45.
#          got: 'http://wwwcache.xxxxx.com/'
#     expected: undef

#   Failed test at t/Root/HTTPget.t line 49.
#          got: 'http://wwwcache.xxx,com/'
#     expected: 'http://myproxy'

and more along those lines, but I think the module is actually doing what it is supposed to do, which is to use the environment variable http_proxy as per POD:

Title   : proxy
Usage   : $httpproxy = $db->proxy('http')  or 
          $db->proxy(['http','ftp'], 'http://myproxy' )
Function: Get/Set a proxy for use of proxy. Defaults to environment variable
          http_proxy if present.
Returns : a string indicating the proxy
Args    : $protocol : string for the protocol to set/get
          $proxyurl : url of the proxy to use for the specified protocol
          $username : username (if proxy requires authentication)
          $password : password (if proxy requires authentication)

So, I think the test failures are incorrect and the module is behaving as expected.

cjfields commented 4 years ago

@fschwach Hi! This is a little-used module to be honest, if you think the tests are incorrect do you want to set up a pull request to address it?