Skip to content

Commit

Permalink
Made the tests more resilient to random order of lists
Browse files Browse the repository at this point in the history
  • Loading branch information
hannosch committed Oct 19, 2009
1 parent d2a97e0 commit 9b70263
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Expand Up @@ -4,7 +4,7 @@ Changelog
1.2 - unreleased
----------------

* Fix unregistring of components which have a physical path.
* Fix unregistering of components which have a physical path.
[thefunny42]

1.1 - 2009-06-19
Expand Down
8 changes: 4 additions & 4 deletions src/five/localsitemanager/localsitemanager.txt
Expand Up @@ -383,10 +383,10 @@ And then getAllUtilitiesRegisteredFor():

And registeredUtilities():

>>> list(sitemanager_a.registeredUtilities())
>>> sorted(sitemanager_a.registeredUtilities())
[UtilityRegistration(<PersistentComponents /a>, ITestUtility, u'aq_wrapped', <Utility AQTestUtility "test">,... u''),
UtilityRegistration(<PersistentComponents /a>, ITestUtility, u'with_aq_chain', si_util_cped,... u''),
UtilityRegistration(<PersistentComponents /a>, ITestUtility, u'hello_world', <Utility TestUtility "test">,... u'')]
UtilityRegistration(<PersistentComponents /a>, ITestUtility, u'hello_world', <Utility TestUtility "test">,... u''),
UtilityRegistration(<PersistentComponents /a>, ITestUtility, u'with_aq_chain', si_util_cped,... u'')]

>>> utils = [r.component for r in sitemanager_a.registeredUtilities()]
>>> len(utils)
Expand All @@ -402,7 +402,7 @@ And registeredUtilities():
>>> aqutils = [comp for comp in utils if IAcquirer.providedBy(comp)]
>>> len(aqutils)
2
>>> aqutils
>>> sorted(aqutils)
[<Utility AQTestUtility "test">, <SITestUtility at /a/b/c/si_util_cped>]

And unregisterUtility():
Expand Down

0 comments on commit 9b70263

Please sign in to comment.