HaveF / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

Several test data files missing from feedparser-5.1 tarball #320

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download the .gz or .bz2 source tarball from code.google.com
2. Unpack the tarball
3. Run the test suite with `cd feedparser; python2.7 feedparser.test.py`

What is the expected output? What do you see instead?

I see several test failures.  I would expect to see none.  (See below)

What version of the product are you using? On what operating system?

feedparser 5.1 on Ubuntu Precise (12.04) using Python 2.7.

Please provide any additional information below.

Here is the output of running the test suite.  It seems clear the that the .gz 
test files are missing in the compression directory from the tarball.

python feedparsertest.py
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
....................----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 36138)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/usr/lib/python2.7/SimpleHTTPServer.py", line 44, in do_GET
    f = self.send_head()
  File "feedparsertest.py", line 90, in send_head
    f = open(path, 'rb')
IOError: [Errno 2] No such file or directory: 
'/home/barry/projects/ubuntu/feedparser/feedparser-5.1/feedparser/tests/compress
ion/gzip.gz'
----------------------------------------
E----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 36139)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/usr/lib/python2.7/SimpleHTTPServer.py", line 44, in do_GET
    f = self.send_head()
  File "feedparsertest.py", line 90, in send_head
    f = open(path, 'rb')
IOError: [Errno 2] No such file or directory: 
'/home/barry/projects/ubuntu/feedparser/feedparser-5.1/feedparser/tests/compress
ion/gzip-not-gzipped.gz'
----------------------------------------
F----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 36140)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/usr/lib/python2.7/SimpleHTTPServer.py", line 44, in do_GET
    f = self.send_head()
  File "feedparsertest.py", line 90, in send_head
    f = open(path, 'rb')
IOError: [Errno 2] No such file or directory: 
'/home/barry/projects/ubuntu/feedparser/feedparser-5.1/feedparser/tests/compress
ion/gzip-struct-error.gz'
----------------------------------------
F----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 36141)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/usr/lib/python2.7/SimpleHTTPServer.py", line 44, in do_GET
    f = self.send_head()
  File "feedparsertest.py", line 90, in send_head
    f = open(path, 'rb')
IOError: [Errno 2] No such file or directory: 
'/home/barry/projects/ubuntu/feedparser/feedparser-5.1/feedparser/tests/compress
ion/deflate-error.z'
----------------------------------------
F----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 36142)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 284, in _handle_request_noblock
    self.process_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 310, in process_request
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 323, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/lib/python2.7/SocketServer.py", line 638, in __init__
    self.handle()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 328, in handle_one_request
    method()
  File "/usr/lib/python2.7/SimpleHTTPServer.py", line 44, in do_GET
    f = self.send_head()
  File "feedparsertest.py", line 90, in send_head
    f = open(path, 'rb')
IOError: [Errno 2] No such file or directory: 
'/home/barry/projects/ubuntu/feedparser/feedparser-5.1/feedparser/tests/compress
ion/deflate.z'
----------------------------------------
E.....................
======================================================================
ERROR: test_gzip_good (__main__.TestCompression)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "feedparsertest.py", line 323, in test_gzip_good
    self.assertEqual(f.version, 'atom10')
  File "/home/barry/projects/ubuntu/feedparser/feedparser-5.1/feedparser/feedparser.py", line 382, in __getattr__
    raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'version'

======================================================================
ERROR: test_zlib_good (__main__.TestCompression)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "feedparsertest.py", line 334, in test_zlib_good
    self.assertEqual(f.version, 'atom10')
  File "/home/barry/projects/ubuntu/feedparser/feedparser-5.1/feedparser/feedparser.py", line 382, in __getattr__
    raise AttributeError, "object has no attribute '%s'" % key
AttributeError: object has no attribute 'version'

======================================================================
FAIL: test_gzip_not_gzipped (__main__.TestCompression)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "feedparsertest.py", line 327, in test_gzip_not_gzipped
    self.assertTrue(isinstance(f.bozo_exception, IOError))
AssertionError: False is not true

======================================================================
FAIL: test_gzip_struct_error (__main__.TestCompression)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "feedparsertest.py", line 331, in test_gzip_struct_error
    self.assertTrue(isinstance(f.bozo_exception, struct.error))
AssertionError: False is not true

======================================================================
FAIL: test_zlib_bad (__main__.TestCompression)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "feedparsertest.py", line 338, in test_zlib_bad
    self.assertTrue(isinstance(f.bozo_exception, zlib.error))
AssertionError: False is not true

----------------------------------------------------------------------
Ran 3966 tests in 7.244s

FAILED (failures=3, errors=2)

Original issue reported on code.google.com by war...@gmail.com on 11 Jan 2012 at 5:29

GoogleCodeExporter commented 9 years ago
This was fixed in r673.

Original comment by kurtmckee on 11 Jan 2012 at 6:03