** Changed in: zeitgeist
       Status: Fix Committed => Fix Released

-- 
running test/test-engine-extension.rst fails
https://bugs.launchpad.net/bugs/537462
You received this bug notification because you are a member of Zeitgeist
Framework Team, which is subscribed to Zeitgeist Framework.

Status in Zeitgeist Framework: Fix Released

Bug description:
This doctest is meant to be a tutorial + testcase, unfortunately it fails 
because there are some extension loaded by default.
When we find some time, we should fix this tutorial. 

% python -m doctest -vvv test/test-engine-extension.rst                         
                            :(
INFO:zeitgeist.sql:Using database: 
/home/markus/.local/share/zeitgeist/activity.sqlite
DEBUG:zeitgeist.extension:Loading extension 'Blacklist'
DEBUG:zeitgeist.blacklist:Loaded blacklist config from 
/home/markus/.local/share/zeitgeist/blacklist.pickle
DEBUG:zeitgeist.extension:Loading extension 'DataSourceRegistry'
DEBUG:zeitgeist.datasource_registry:Loaded data-source data from 
/home/markus/.local/share/zeitgeist/datasources.pickle
**********************************************************************
File "test/test-engine-extension.rst", line 14, in test-engine-extension.rst
Failed example:
    len(engine.extensions)
Expected:
    1
Got:
    2
DEBUG:zeitgeist.extension:Loading extension 'SampleExtension'
**********************************************************************
File "test/test-engine-extension.rst", line 47, in test-engine-extension.rst
Failed example:
    len(engine.extensions)
Expected:
    2
Got:
    3
**********************************************************************
File "test/test-engine-extension.rst", line 49, in test-engine-extension.rst
Failed example:
    print engine.extensions
Expected:
    ExtensionsCollection(['set_blacklist', 'get_blacklist', 'add_value', 
'get_engine'])
Got:
    ExtensionsCollection(['add_value', 'get_blacklist', 'get_data_sources', 
'get_engine', 'register_data_source', 'set_blacklist', 
'set_data_source_enabled'])
**********************************************************************
File "test/test-engine-extension.rst", line 51, in test-engine-extension.rst
Failed example:
    sorted(engine.extensions.methods)
Expected:
    ['add_value', 'get_blacklist', 'get_engine', 'set_blacklist']
Got:
    ['add_value', 'get_blacklist', 'get_data_sources', 'get_engine', 
'register_data_source', 'set_blacklist', 'set_data_source_enabled']
DEBUG:zeitgeist.extension:Unloading extension 'type'
**********************************************************************
File "test/test-engine-extension.rst", line 75, in test-engine-extension.rst
Failed example:
    engine.extensions.unload(SampleExtension)
Exception raised:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1241, in __run
        compileflags, 1) in test.globs
      File "<doctest test-engine-extension.rst[13]>", line 1, in <module>
      File "_zeitgeist/engine/extension.py", line 148, in unload
        obj = self.__extensions[extension.__class__.__name__]
    KeyError: 'type'
**********************************************************************
File "test/test-engine-extension.rst", line 76, in test-engine-extension.rst
Failed example:
    sorted(engine.extensions.methods)
Expected:
    []
Got:
    ['add_value', 'get_blacklist', 'get_data_sources', 'get_engine', 
'register_data_source', 'set_blacklist', 'set_data_source_enabled']
**********************************************************************
File "test/test-engine-extension.rst", line 81, in test-engine-extension.rst
Failed example:
    engine.extensions.add_value(5)
Expected:
    Traceback (most recent call last):
      ...
    AttributeError: ExtensionsCollection instance has no attribute 'add_value'
Got:
    11
DEBUG:zeitgeist.extension:Loading extension 'set'
**********************************************************************
File "test/test-engine-extension.rst", line 89, in test-engine-extension.rst
Failed example:
    engine.extensions.load(set) # doctest:+ELLIPSIS
Expected:
    Traceback (most recent call last):
      ...
    TypeError: Unable to load <type 'set'>, all extensions have to be 
subclasses of <...Extension'>
Got:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/doctest.py", line 1241, in __run
        compileflags, 1) in test.globs
      File "<doctest test-engine-extension.rst[16]>", line 1, in <module>
      File "_zeitgeist/engine/extension.py", line 122, in load
        "subclasses of %r" % (extension, Extension))
    TypeError: Unable to load <type 'set'>, all extensions must be subclasses 
of <class '_zeitgeist.engine.extension.Extension'>
DEBUG:zeitgeist.extension:Loading extension 'FailExtension'
**********************************************************************
1 items had failures:
   8 of  19 in test-engine-extension.rst
***Test Failed*** 8 failures.
1 mar...@thekorn /media/devel/zeitgeist/trunk %                                 
                                                                          :(



_______________________________________________
Mailing list: https://launchpad.net/~zeitgeist
Post to     : zeitgeist@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zeitgeist
More help   : https://help.launchpad.net/ListHelp

Reply via email to