Created
October 29, 2015 13:53
-
-
Save piotr-dobrogost/5a464f6c6a7dc362115b to your computer and use it in GitHub Desktop.
Test for difference in .add_translation_dirs() with and without .commit()
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(pyramid)[piotr@demon pyramid]$ nosetests -t test_xxx | |
E | |
====================================================================== | |
ERROR: test_xxx (pyramid.tests.test_config.test_i18n.TestI18NConfiguratorMixin) | |
---------------------------------------------------------------------- | |
Traceback (most recent call last): | |
File "/home/piotr/projects/pyramid/pyramid/tests/test_config/test_i18n.py", line 95, in test_xxx | |
dirs = config.registry.getUtility(ITranslationDirectories) | |
File "/home/piotr/.virtualenvs/pyramid/lib/python2.7/site-packages/zope/interface/registry.py", line 172, in getUtility | |
raise ComponentLookupError(provided, name) | |
ComponentLookupError: (<InterfaceClass pyramid.interfaces.ITranslationDirectories>, u'') | |
---------------------------------------------------------------------- | |
Ran 1 test in 0.015s | |
FAILED (errors=1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# def test_add_translation_dirs_abspath(self): | |
# from pyramid.interfaces import ITranslationDirectories | |
# config = self._makeOne(autocommit=True) | |
# config.add_translation_dirs(locale) | |
# self.assertEqual(config.registry.getUtility(ITranslationDirectories), | |
# [locale]) | |
def test_xxx(self): | |
from pyramid.interfaces import ITranslationDirectories | |
config = self._makeOne() | |
config.add_translation_dirs('pyramid.tests.pkgs.localeapp:locale') | |
dirs = config.registry.getUtility(ITranslationDirectories) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment