test__datasource

Module Contents

urlopen_stub(url, data=None)

Stub to replace urlopen for testing.

old_urlopen
setup()
teardown()
http_path = http://www.google.com/
http_file = index.html
http_fakepath = http://fake.abc.web/site/
http_fakefile = fake.txt
malicious_files = ['/etc/shadow', '../../shadow', '..\\system.dat', 'c:\\windows\\system.dat']
magic_line
valid_textfile(filedir)
invalid_textfile(filedir)
valid_httpurl()
invalid_httpurl()
valid_baseurl()
invalid_baseurl()
valid_httpfile()
invalid_httpfile()
class TestDataSourceOpen

Bases:numpy.testing.TestCase

setUp(self)
tearDown(self)
test_ValidHTTP(self)
test_InvalidHTTP(self)
test_InvalidHTTPCacheURLError(self)
test_ValidFile(self)
test_InvalidFile(self)
test_ValidGzipFile(self)
test_ValidBz2File(self)
class TestDataSourceExists

Bases:numpy.testing.TestCase

setUp(self)
tearDown(self)
test_ValidHTTP(self)
test_InvalidHTTP(self)
test_ValidFile(self)
test_InvalidFile(self)
class TestDataSourceAbspath

Bases:numpy.testing.TestCase

setUp(self)
tearDown(self)
test_ValidHTTP(self)
test_ValidFile(self)
test_InvalidHTTP(self)
test_InvalidFile(self)
test_sandboxing(self)
test_windows_os_sep(self)
class TestRepositoryAbspath

Bases:numpy.testing.TestCase

setUp(self)
tearDown(self)
test_ValidHTTP(self)
test_sandboxing(self)
test_windows_os_sep(self)
class TestRepositoryExists

Bases:numpy.testing.TestCase

setUp(self)
tearDown(self)
test_ValidFile(self)
test_InvalidFile(self)
test_RemoveHTTPFile(self)
test_CachedHTTPFile(self)
class TestOpenFunc

Bases:numpy.testing.TestCase

setUp(self)
tearDown(self)
test_DataSourceOpen(self)