astropy/astropy — Issue #51: Issue with pastebin option in astropy.test() with Python 3.2
Author: astrofrog
Created: 2011-11-06 21:43:40+00:00
State: open

As of 7946471129146d93abcbe731171a4a5adbdc3454, when using ``astropy.test(pastebin='failed')``, an exception related to XML is raised:

============================================================================ Sending information to Paste Service =============================================================================
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/Users/tom/ in ()
----> 1 astropy.test(pastebin='failed')

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/tests/helper.py in run_tests(module, args, plugins, verbose, pastebin, remote_data)
121 all_args += ' --remotedata'
122
--> 123 return pytest.main(args=all_args, plugins=plugins)
124
125

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in main(args, plugins)
455 config = hook.pytest_cmdline_parse(
456 pluginmanager=_pluginmanager, args=args)
--> 457 exitstatus = hook.pytest_cmdline_main(config=config)
458 except UsageError:
459 e = sys.exc_info()[1]

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in __call__(self, **kwargs)
409 def __call__(self, **kwargs):
410 methods = self.hookrelay._pm.listattr(self.name)
--> 411 return self._docall(methods, kwargs)
412
413 def pcall(self, plugins, **kwargs):

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in _docall(self, methods, kwargs)
420 mc = MultiCall(methods, kwargs, firstresult=self.firstresult)
421 try:
--> 422 res = mc.execute()
423 if res:
424 self.trace("finish", self.name, "-->", res)

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in execute(self)
338 method = self.methods.pop()
339 kwargs = self.getkwargs(method)
--> 340 res = method(**kwargs)
341 if res is not None:
342 self.results.append(res)

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.main in pytest_cmdline_main(config)
88
89 def pytest_cmdline_main(config):
---> 90 return wrap_session(config, _main)
91
92 def _main(config, session):

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.main in wrap_session(config, doit)
82 if initstate >= 2:
83 config.hook.pytest_sessionfinish(session=session,
---> 84 exitstatus=session.exitstatus)
85 if initstate >= 1:
86 config.pluginmanager.do_unconfigure(config)

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in __call__(self, **kwargs)
409 def __call__(self, **kwargs):
410 methods = self.hookrelay._pm.listattr(self.name)
--> 411 return self._docall(methods, kwargs)
412
413 def pcall(self, plugins, **kwargs):

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in _docall(self, methods, kwargs)
420 mc = MultiCall(methods, kwargs, firstresult=self.firstresult)
421 try:
--> 422 res = mc.execute()
423 if res:
424 self.trace("finish", self.name, "-->", res)

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in execute(self)
338 method = self.methods.pop()
339 kwargs = self.getkwargs(method)
--> 340 res = method(**kwargs)
341 if res is not None:
342 self.results.append(res)

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.terminal in pytest_sessionfinish(self, exitstatus, __multicall__)
316 self.summary_errors()
317 self.summary_failures()
--> 318 self.config.hook.pytest_terminal_summary(terminalreporter=self)
319 if exitstatus == 2:
320 self._report_keyboardinterrupt()

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in __call__(self, **kwargs)
409 def __call__(self, **kwargs):
410 methods = self.hookrelay._pm.listattr(self.name)
--> 411 return self._docall(methods, kwargs)
412
413 def pcall(self, plugins, **kwargs):

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in _docall(self, methods, kwargs)
420 mc = MultiCall(methods, kwargs, firstresult=self.firstresult)
421 try:
--> 422 res = mc.execute()
423 if res:
424 self.trace("finish", self.name, "-->", res)

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.core in execute(self)
338 method = self.methods.pop()
339 kwargs = self.getkwargs(method)
--> 340 res = method(**kwargs)
341 if res is not None:
342 self.results.append(res)

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.pastebin in pytest_terminal_summary(terminalreporter)
49 if tr.config.option.debug:
50 terminalreporter.write_line("xmlrpcurl: %s" %(url.xmlrpc,))
---> 51 serverproxy = getproxy()
52 for rep in terminalreporter.stats.get('failed'):
53 try:

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/_pytest.pastebin in getproxy()
39
40 def getproxy():
---> 41 return py.std.xmlrpclib.ServerProxy(url.xmlrpc).pastes
42
43 def pytest_terminal_summary(terminalreporter):

/Users/tom/Library/Python/3.2/lib/python/site-packages/astropy-0.0dev_r255-py3.2-macosx-10.6-x86_64.egg/astropy/extern/pytest.py/py._std in __getattr__(self, name)
13 m = __import__(name)
14 except ImportError:
---> 15 raise AttributeError("py.std: could not import %s" % name)
16 return m
17

AttributeError: py.std: could not import xmlrpclib

@jiffyclub - Is this fixable, or do we need to report this as a bug in py.test?