Giter Club home page Giter Club logo

autonose's People

Contributors

rca avatar timbertson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

autonose's Issues

test suite does not pass

many tests are failing, and I can't remember why that would be. This is a reminder to investigate this...

quitting UI process does not kill main process

for GUI modes (wx, gtk, osx), quitting the gui process has no effect on the main process.

Could be resolved using signals, or replacing the use of pipes with a distributed object system (like pyro)

test ordering

given a large test set to be run, autonose should order them so that tests are run in order of:

  • most relevance (as measured by the percentage of test file and modified file name overlap)
  • fastest

I'm not sure if nosetests can even do this, to be honest. It may require subclassing /replacing the default TestCollector class or something of the sort.

autonose IPC fails with RemoteError / KeyError

from @teleyinex's comment to issue #13

full log at http://paste.ubuntu.com/943730/, reproduced here for longevity:

Traceback (most recent call last):
  File "/home/teleyinex/Proyectos/PyBossa/pybossa/env/lib/python2.6/site-packages/paragram/process/base_process.py", line 254, in _receive
    handler(*args)
  File "/home/teleyinex/Proyectos/PyBossa/pybossa/env/lib/python2.6/site-packages/paragram/process/base_process.py", line 202, in _exit_handler
    self.send(Exit(UnhandledChildExit(proc)))
  File "/home/teleyinex/Proyectos/PyBossa/pybossa/env/lib/python2.6/site-packages/paragram/process/base_process.py", line 142, in send
    _send(self._queue, *msg)
  File "/home/teleyinex/Proyectos/PyBossa/pybossa/env/lib/python2.6/site-packages/paragram/process/base_process.py", line 52, in _send
    queue.put(pickle.dumps(msg))
  File "<string>", line 2, in put
  File "/usr/lib/python2.6/multiprocessing/managers.py", line 740, in _callmethod
    raise convert_to_error(kind, result)
RemoteError: 
---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/multiprocessing/managers.py", line 216, in serve_client
    obj, exposed, gettypeid = id_to_obj[ident]
KeyError: 'b7001b8c'
---------------------------------------------------------------------------
Exception in thread state-saver:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/teleyinex/Proyectos/PyBossa/pybossa/env/lib/python2.6/site-packages/paragram/process/base_process.py", line 217, in _run
    self._exit(e.error)
  File "/home/teleyinex/Proyectos/PyBossa/pybossa/env/lib/python2.6/site-packages/paragram/process/base_process.py", line 235, in _exit
    self._finished.set()
  File "/usr/lib/python2.6/multiprocessing/managers.py", line 977, in set
    return self._callmethod('set')
  File "/usr/lib/python2.6/multiprocessing/managers.py", line 740, in _callmethod
    raise convert_to_error(kind, result)
RemoteError: 
---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/multiprocessing/managers.py", line 216, in serve_client
    obj, exposed, gettypeid = id_to_obj[ident]
KeyError: 'b70033ec'
---------------------------------------------------------------------------

Exception in thread basic UI:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/teleyinex/Proyectos/PyBossa/pybossa/env/lib/python2.6/site-packages/paragram/process/base_process.py", line 217, in _run
    self._exit(e.error)
  File "/home/teleyinex/Proyectos/PyBossa/pybossa/env/lib/python2.6/site-packages/paragram/process/base_process.py", line 235, in _exit
    self._finished.set()
  File "/usr/lib/python2.6/multiprocessing/managers.py", line 977, in set
    return self._callmethod('set')
  File "/usr/lib/python2.6/multiprocessing/managers.py", line 740, in _callmethod
    raise convert_to_error(kind, result)
RemoteError: 
---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.6/multiprocessing/managers.py", line 216, in serve_client
    obj, exposed, gettypeid = id_to_obj[ident]
KeyError: 'b7001e6c'
---------------------------------------------------------------------------

I have experienced this problem myself, but I'm afraid I have no idea what it is - it seems to be deep in the bowels of the multiprocessing inter-process communication, and is likely due to an upgrade to python or its libraries (since it never used to happen). But that's about all I know.

Install problems

$ mkdir tmp
$ cd tmp/
$ 0launch http://gfxmonk.net/dist/0install/autonose.xml
Traceback (most recent call last):
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/runner.py", line 163, in init_ui
    App = default_app()
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/ui/platform.py", line 7, in default_app
    from gtkapp import App
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/ui/gtkapp.py", line 15, in <module>
    from shared import urlparse
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/ui/shared/__init__.py", line 1, in <module>
    from main import Main
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/ui/shared/main.py", line 6, in <module>
    from page import Page
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/ui/shared/page.py", line 5, in <module>
    from autonose.shared.test_result import success, skip, error, fail
ImportError: No module named autonose.shared.test_result
UI load failed - falling back to basic console
----------------------------------------
Traceback (most recent call last):
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/runner.py", line 212, in <module>
    main()
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/runner.py", line 206, in main
    Main().run()
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/runner.py", line 65, in run
    self.init_ui()
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/runner.py", line 171, in init_ui
    return basic()
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/runner.py", line 155, in basic
    from ui.basic import Basic
  File "/home/me/.cache/0install.net/implementations/sha256=7067516ed6deb297cce48af84982cd52d0d61c02652fc14f61f63e9234228a9a/autonose/ui/basic.py", line 5, in <module>
    from autonose.watcher import TestRun
ImportError: No module named autonose.watcher

autonose failing with "Too many open files"

I used autonose successfully for the better part of a day, and now when I start it up it runs the first set of tests and then fails with "Too many open files." I've tried resetting the allowed number of open files by adding

resource.setrlimit(resource.RLIMIT_NOFILE, (1000, -1))

to the autonose startup script, but it hasn't helped. Mac OS 10.7.1 (Lion), stock Python 2.7.1 in a virtualenv.

My kern.maxfiles is set to 12288. 'limit' in zsh says the number of descriptors is unlimited.

Launching autonose is extremely slow

There is a bug in Ubuntu which causes autonose's startup time to be considerably long. It produces this error in the console:

Error creating proxy: Error calling StartServiceByName for org.gtk.vfs.Daemon: Timeout was reached (g-io-error-quark, 24)

This bug can be worked around by disabling the overlay scrollbar with an environment variable:

LIBOVERLAY_SCROLLBAR=0 0launch http://gfxmonk.net/dist/0install/autonose.xml

Similar bugs in other applications:
https://bugs.launchpad.net/ubuntu/+source/xfce4-settings/+bug/1239014

0alias problem

Arguments to 0alias are the wrong way around:

$ 0alias http://gfxmonk.net/dist/0install/autonose.xml autonose
Bad interface name 'autonose'.

inotify support

currently autonose polls the filesystem after a configurable wait interval. A much more awesome solution would be to use inotify, where available.

Presumably there is a spotlight API that could be used on OSX as well.

IOError when running GTK ui [other errors as well?]

This is on a fresh system install - everything works fine if I do autonose --console

/usr/lib/python2.6/site-packages/autonose-0.1.2-py2.6.egg/autonose/ui/shared/data.py:47:
DeprecationWarning: object.__new__() takes no parameters
/usr/bin/python: can't find '__main__.py' in
'/usr/lib/python2.6/site-packages/autonose-0.1.2-py2.6.egg/autonose/ui/gtkapp.pyc'
[ERROR] autonose.runner: 
[ERROR] autonose.runner: Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/autonose/runner.py", line 63, in run_loop
    self.run_with_state(state)
  File "build/bdist.linux-x86_64/egg/autonose/runner.py", line 131, in
run_with_state
    nose.run(argv=nose_args, addplugins = plugins + [watcher_plugin])
  File "/usr/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/core.py",
line 271, in run
    return TestProgram(*arg, **kw).success
  File "/usr/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/core.py",
line 113, in __init__
    argv=argv, testRunner=testRunner, testLoader=testLoader)
  File "/usr/lib/python2.6/unittest.py", line 816, in __init__
    self.parseArgs(argv)
  File "/usr/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/core.py",
line 130, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "/usr/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/config.py",
line 300, in configure
    self.plugins.begin()
  File
"/usr/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/plugins/manager.py",
line 82, in __call__
    return self.call(*arg, **kw)
  File
"/usr/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/plugins/manager.py",
line 150, in simple
    result = meth(*arg, **kw)
  File "build/bdist.linux-x86_64/egg/autonose/ui/shared/nosexml/plugin.py", line
126, in begin
    self.formatter.startDocument()
  File "build/bdist.linux-x86_64/egg/autonose/ui/shared/data.py", line 61, in
startDocument
    self.endElement()
  File "build/bdist.linux-x86_64/egg/autonose/ui/shared/data.py", line 74, in
endElement
    self.stream.flush()
IOError: [Errno 32] Broken pipe

Not sure what in the above is most relevant - happy to provide additional details if necessary.

An exception in setUpClass() should not terminate autonose

Autonose terminates with the following traceback when setUpClass() raises an error:

Traceback (most recent call last):
  File "/home/lieryan/.cache/0install.net/implementations/sha256=69730523263f37581d813bf443f6ca9d528055968d95124d1558baebd0a4f5ec/paragram/process/base_process.py", line 209, in _run
    self._target(self, *self._args, **self._kwargs)
  File "/home/lieryan/Projects/autonose/autonose/runner.py", line 194, in run_tests
    nose.run(argv=args, addplugins=[watcher_plugin])
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/core.py", line 291, in run
    return TestProgram(*arg, **kw).success
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/core.py", line 118, in __init__
    **extra_args)
  File "/usr/lib/python2.7/unittest/main.py", line 95, in __init__
    self.runTests()
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/core.py", line 197, in runTests
    result = self.testRunner.run(self.test)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/core.py", line 61, in run
    test(result)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/suite.py", line 223, in run
    test(orig)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/suite.py", line 223, in run
    test(orig)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/suite.py", line 176, in __call__
    return self.run(*arg, **kw)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/suite.py", line 213, in run
    result.addError(self, self._exc_info())
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/proxy.py", line 124, in addError
    plugin_handled = plugins.handleError(self.test, err)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/plugins/manager.py", line 99, in __call__
    return self.call(*arg, **kw)
  File "/home/lieryan/.cache/0install.net/implementations/sha256new_QI4EUIDXPFPFZMN4IGFFA3W5CN6WQ3G3C4V7VGBN3MGQD5BKJJUQ/lib/nose/plugins/manager.py", line 167, in simple
    result = meth(*arg, **kw)
  File "/home/lieryan/Projects/autonose/autonose/watcher.py", line 136, in handleError
    err = test.plugins.formatError(test, err) or err
AttributeError: 'ContextSuite' object has no attribute 'plugins'

autonose fails with NoseGAE

when testing google appengine projects with NoseGAE, autonose fails while retrieving test.address() because the nose code looks in sys.modules, and the module is no longer present.

UI load failed: No module named shared.test_result

Traceback (most recent call last):
File "/home/eka/.virtualenvs/client/local/lib/python2.7/site-packages/autonose/runner.py", line 163, in init_ui
App = default_app()
File "/home/eka/.virtualenvs/client/local/lib/python2.7/site-packages/autonose/ui/platform.py", line 7, in default_app
from gtkapp import App
File "/home/eka/.virtualenvs/client/local/lib/python2.7/site-packages/autonose/ui/gtkapp.py", line 15, in
from shared import urlparse
File "/home/eka/.virtualenvs/client/local/lib/python2.7/site-packages/autonose/ui/shared/init.py", line 1, in
from main import Main
File "/home/eka/.virtualenvs/client/local/lib/python2.7/site-packages/autonose/ui/shared/main.py", line 2, in
from shared.test_result import ResultEvent
ImportError: No module named shared.test_result

UI load failed - falling back to basic console

What else I can do to help debugging this?

TypeError when print statement encountered

If a test case encounters a print statement, either in the test code or the code being tested, I get a traceback that ends like this:
File "/usr/lib/python2.6/StringIO.py", line 213, in write
_complain_ifclosed(self.closed)
TypeError: 'NoneType' object is not callable
If I ^C out and rerun autonose, everything works as planned, except that the captured stdout isn't displayed upon failure. nosetests seems to display the desired behavior, so it seems to be a bug with autonose.

Example failing code:
def test_print():
print "test"
assert False

autonose dies when using custom exception class

My code in test_fail.py

class SomeError(Exception):
    pass

def foo():
    raise SomeError()

def test_foo():
    foo()

When I invoke autonose --debug:

[DEBUG] autonose.scanner: IOError:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/autonose-0.2.1-py2.7.egg/autonose/scanner.py", line 27, in load
    picklefile = open_file(path)
  File "/usr/local/lib/python2.7/dist-packages/autonose-0.2.1-py2.7.egg/autonose/scanner.py", line 16, in open_file
    return open(path, *a)
IOError: [Errno 2] No such file or directory: '/home/winston/Dropbox/SE/transforms/alone/.autonose-depends.pickle'
[INFO] autonose.shared.state.summary: added: test_fail.py
[DEBUG] autonose.shared.file_state: fetching dependencies for test_fail.py
[DEBUG] root:     Line 1: Symbol is not a module: 'nose.tools.assert_equals'
[DEBUG] root:     Line 1: Symbol is not a module: 'nose.tools.assert_raises'
[DEBUG] autonose.shared.file_state: ("    Line %d: Symbol is not a module: '%s'", 'nose.tools.assert_equals')
[DEBUG] autonose.shared.file_state: ("    Line %d: Symbol is not a module: '%s'", 'nose.tools.assert_raises')
[DEBUG] autonose.shared.file_state: found dependant files: ['/usr/share/pyshared/nose/tools.py', '/usr/share/pyshared/nose/tools.py']
[DEBUG] autonose.shared.file_state: rel_paths: []
[DEBUG] autonose.shared.state: ALTERING path: test_fail.py
[DEBUG] autonose.shared.state: ignoring non-python file: test_fail.pyc
[INFO] autonose.shared.state.summary: all affected files:    
  test_fail.py
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/autonose-0.2.1-py2.7.egg/autonose/runner.py", line 163, in init_ui
    App = default_app()
  File "/usr/local/lib/python2.7/dist-packages/autonose-0.2.1-py2.7.egg/autonose/ui/platform.py", line 7, in default_app
    from gtkapp import App
  File "/usr/local/lib/python2.7/dist-packages/autonose-0.2.1-py2.7.egg/autonose/ui/gtkapp.py", line 15, in <module>
    from shared import urlparse
  File "/usr/local/lib/python2.7/dist-packages/autonose-0.2.1-py2.7.egg/autonose/ui/shared/__init__.py", line 1, in <module>
    from main import Main
  File "/usr/local/lib/python2.7/dist-packages/autonose-0.2.1-py2.7.egg/autonose/ui/shared/main.py", line 2, in <module>
    from shared.test_result import ResultEvent
ImportError: No module named shared.test_result
UI load failed - falling back to basic console
----------------------------------------
[INFO] runner: running with 1 affected and 1 bad files... (1 files total)
[DEBUG] runner: state is: 
<FileState: test_fail.py@1317915600.33, test_results:<TestResults [ok]: []> (depends on 0 files)>
[DEBUG] runner: args are: ['nosetests', '--exe']

# Running tests at 10:43:03  

[DEBUG] nose.plugins.manager: DefaultPluginManager load plugin EARLPlugin = rdflib_tools.EARLPlugin:EARLPlugin
[INFO] rdflib: version: 2.4.2
Traceback (most recent call last):
E
======================================================================
ERROR: test_fail.test_foo
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/case.py", line 186, in runTest
    self.test(*self.arg)
  File "/home/winston/Dropbox/SE/transforms/alone/test_fail.py", line 10, in test_foo
    foo()
  File "/home/winston/Dropbox/SE/transforms/alone/test_fail.py", line 7, in foo
    raise SomeError()
SomeError
Traceback (most recent call last):

  File "/usr/local/lib/python2.7/dist-packages/paragram/process/base_process.py", line 212, in _run
----------------------------------------------------------------------
Ran 1 test in 0.004s

FAILED (errors=1)
    self._receive(pickle.loads(pickled))
  File "/usr/lib/python2.7/pickle.py", line 1382, in loads
  File "/usr/local/lib/python2.7/dist-packages/paragram/process/base_process.py", line 212, in _run
    self._receive(pickle.loads(pickled))
  File "/usr/lib/python2.7/pickle.py", line 1382, in loads
    return Unpickler(file).load()
  File "/usr/lib/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/lib/python2.7/pickle.py", line 1090, in load_global
    klass = self.find_class(module, name)
  File "/usr/lib/python2.7/pickle.py", line 1124, in find_class
    __import__(module)
ImportError: No module named test_fail
    return Unpickler(file).load()
  File "/usr/lib/python2.7/pickle.py", line 858, in load
    dispatch[key](self)
  File "/usr/lib/python2.7/pickle.py", line 1090, in load_global
    klass = self.find_class(module, name)
  File "/usr/lib/python2.7/pickle.py", line 1124, in find_class
    __import__(module)
ImportError: No module named test_fail
Exception in thread monitor-state-changes:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/local/lib/python2.7/dist-packages/paragram/process/base_process.py", line 217, in _run
    self._exit(e.error)
  File "/usr/local/lib/python2.7/dist-packages/paragram/process/base_process.py", line 235, in _exit
    self._finished.set()
  File "/usr/lib/python2.7/multiprocessing/managers.py", line 1010, in set
    return self._callmethod('set')
  File "/usr/lib/python2.7/multiprocessing/managers.py", line 773, in _callmethod
    raise convert_to_error(kind, result)
RemoteError: 
---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/multiprocessing/managers.py", line 242, in serve_client
    obj, exposed, gettypeid = id_to_obj[ident]
KeyError: '8ecadec'
---------------------------------------------------------------------------

Stats:
Python 2.7
Ubuntu 11.04
copy of autonose cloned from github

It looks like something is trying to unpickle the exception object from inside test_fail.py. However, it cannot import it probably because its not on sys.path, but rather in the local directory.

Does not work with virtualenv

Without activating the virtualenv, I get the expected errors, that some modules
are missing. Say, if my project uses SQLAlchemy, it will fail, because SA is
only available in the virtual environment. Not in the system.

The recommended way is using 0lauch. Because there is (as far as I can tell) no
virtualenv support in 0lauch, I have to activate it, which gives me this
output:

0launch http://gfxmonk.net/dist/0install/autonose.xml
/home/users/exhuma/.cache/0install.net/implementations/sha256=34628023485d65593b7cea030d6af43f81088d8940d49522ffb2ace7b6be270d/usr/lib/python/dist-packages/nose/util.py:14: DeprecationWarning: The compiler package is deprecated and removed in Python 3.x.
  from compiler.consts import CO_GENERATOR
Traceback (most recent call last):
  File "/home/users/exhuma/.cache/0install.net/implementations/sha256=2d679d7310c3255a76b420568242890dfbd04d5e4ed60a88d088335f6f8bf8cc/autonose/runner.py", line 163, in init_ui
    App = default_app()
  File "/home/users/exhuma/.cache/0install.net/implementations/sha256=2d679d7310c3255a76b420568242890dfbd04d5e4ed60a88d088335f6f8bf8cc/autonose/ui/platform.py", line 7, in default_app
    from gtkapp import App
  File "/home/users/exhuma/.cache/0install.net/implementations/sha256=2d679d7310c3255a76b420568242890dfbd04d5e4ed60a88d088335f6f8bf8cc/autonose/ui/gtkapp.py", line 9, in <module>
    import gtk
ImportError: No module named gtk
UI load failed - falling back to basic console
----------------------------------------

----------------------------------------------------------------------
Ran 0 tests in 1.125s

OK

So the observed errors are:

  1. GTK is not found. This is normal, as autonose is not installed into the
    virtualenv.
  2. No tests are discovered by autonose, but nosetests itself finds them.

autonose fails on skipped test

If I try to call skipTest("Some comment") inside my test function, autonose launched from 0launch (and which has UI) crashes.
autonose launched from 0launch with --console key exits upon execution.
Console version of autonose build from a git trunk works (launched via 'autonose' command).

Ubuntu 11.10, python 2.7.2

Testcase attached

import unittest


class TestAutonoseFail(unittest.TestCase):
    def test_crash(self):
        self.skipTest("This test should be skipped")

Error when running autonose from fix_prototype branch

I get the following error when running autonose from the fix_prototype branch on MacPorts installs of python2.6, nose, and the pyobjc bindings.

There are no errors when running with --console.

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/autonose-0.1.2-py2.6.egg/autonose/ui/shared/data.py:47:DeprecationWarning: object.__new__() takes no parameters
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python: can't find '__main__.py' in '/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/autonose-0.1.2-py2.6.egg/autonose/ui/cocoa.pyc'
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/plugins/base.py:72: RuntimeWarning: Plugin  has conflicting option string: option --xml: conflicting option string(s): --xml and will be disabled
  "be disabled" % (self, e), RuntimeWarning)
[ERROR] autonose.runner: 
[ERROR] autonose.runner: Traceback (most recent call last):
  File "build/bdist.macosx-10.5-i386/egg/autonose/runner.py", line 63, in run_loop
    self.run_with_state(state)
  File "build/bdist.macosx-10.5-i386/egg/autonose/runner.py", line 131, in run_with_state
    nose.run(argv=nose_args, addplugins = plugins + [watcher_plugin])
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/core.py", line 271, in run
    return TestProgram(*arg, **kw).success
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/core.py", line 113, in __init__
    argv=argv, testRunner=testRunner, testLoader=testLoader)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/unittest.py", line 816, in __init__
    self.parseArgs(argv)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/core.py", line 130, in parseArgs
    self.config.configure(argv, doc=self.usage())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/config.py", line 300, in configure
    self.plugins.begin()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/plugins/manager.py", line 82, in __call__
    return self.call(*arg, **kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/nose-0.11.1-py2.6.egg/nose/plugins/manager.py", line 150, in simple
    result = meth(*arg, **kw)
  File "build/bdist.macosx-10.5-i386/egg/autonose/ui/shared/nosexml/plugin.py", line 126, in begin
    self.formatter.startDocument()
  File "build/bdist.macosx-10.5-i386/egg/autonose/ui/shared/data.py", line 61, in startDocument
    self.endElement()
  File "build/bdist.macosx-10.5-i386/egg/autonose/ui/shared/data.py", line 74, in endElement
    self.stream.flush()
IOError: [Errno 32] Broken pipe

Cannot use GUI on OSX

When I run autonose on OSX Snow Leopard I get the following error:

Traceback (most recent call last):
  File "/usr/local/bin/autonose", line 8, in <module>
    load_entry_point('autonose==0.1.6', 'console_scripts', 'autonose')()
  File "build/bdist.macosx-10.6-universal/egg/autonose/runner.py", line 171, in main
  File "build/bdist.macosx-10.6-universal/egg/autonose/runner.py", line 66, in run
  File "build/bdist.macosx-10.6-universal/egg/autonose/runner.py", line 125, in init_ui
  File "build/bdist.macosx-10.6-universal/egg/autonose/ui/platform.py", line 9, in default_app

  File "build/bdist.macosx-10.6-universal/egg/autonose/ui/cocoa.py", line 23, in <module>
objc.BadPrototypeError: Objective-C expects 1 arguments, Python argument has 1 arguments for <unbound selector doExit of AutonoseApp at 0x106f27a50>

Changing line 125 of runner.py to

App = default_app(None)

at least makes autonose fall back onto the default console output.

autonose fails later again because pyinotify doesn't support OSX, not really your problem though unless there's another module that does the same job that can be used cross platform?

Crash when watched file is missing

Some text editors delete or moves a file before saving the edited file. autonose occasionally crash when it tries to detect modification time while the file is temporarily deleted.

Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/path/to/autonose/shared/state.py", line 158, in process_events_forever
    self._process_changes(new_events)
  File "/path/to/autonose/shared/state.py", line 168, in _process_changes
    map(self._process_change, changes)
  File "/path/to/autonose/shared/state.py", line 201, in _process_change
    map(self._inspect, existing)
  File "/path/to/autonose/shared/state.py", line 268, in _inspect
    self._check_for_change(rel_path)
  File "/path/to/autonose/shared/state.py", line 279, in _check_for_change
    if file_state.stale():
  File "/path/to/autonose/shared/file_state.py", line 24, in stale
    return self._get_modtime() != self.modtime
  File "/path/to/autonose/shared/file_state.py", line 21, in _get_modtime
    return os.stat(file_util.absolute(self.path)).st_mtime
OSError: [Errno 2] No such file or directory: '/path/to/project/tests.py'

tests run progressively slower

for long runs of autonose, each test run takes more time than the previous when the exact same tests are being run.

presumably this requires some profiling efforts...

quick run mode: ignore indirect dependencies

for quick feedback, you might not want every file that transitively depends on your code to be re-run every time a change is made.

so we should add a flag to filter the "changed" fileset to only those that have been changed themselves (modified tests), or files that themselves import the changed code (one or two test files, presumably).

There's also the possibility of restricting tested files to only those that include a changed file's name -> i.e. if "foo.py" changes, only files that include "foo" will be run.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.