Skip to content

hjwp/liveservertestcase-windows-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This Gist is just a minimal repro of a bug (I think) in Django's LiveServerTestCase, on Windows.

Once a site has some static files (eg CSS), then clicking on a link produces an ugly uncaught exception from the LiveServer thread, like this:

Exception happened during processing of request from ('127.0.0.1', 1925)
Traceback (most recent call last):
  File "c:\Python33\lib\site-packages\django\test\testcases.py", line 1035, in _handle_request_noblock
    self.process_request(request, client_address)
  File "c:\Python33\lib\socketserver.py", line 332, in process_request
    self.finish_request(request, client_address)
  File "c:\Python33\lib\socketserver.py", line 345, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "c:\Python33\lib\site-packages\django\core\servers\basehttp.py", line 126
, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "c:\Python33\lib\socketserver.py", line 666, in __init__
    self.handle()
  File "c:\Python33\lib\wsgiref\simple_server.py", line 118, in handle
    self.raw_requestline = self.rfile.readline()
  File "c:\Python33\lib\socket.py", line 297, in readinto
    return self._sock.recv_into(b)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

to repro, just run python manage.py test

dependencies: selenium.

bug observed on Windows XP. Also reported on Windows 7. doesn't happen on linux.

About

Django LiveServerTestCase Windows XP / Selenium / static files / link bug

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published