Edgewall Software

Changes between Version 10 and Version 13 of Ticket #11317

Apr 9, 2017, 8:43:30 AM (6 years ago)
Ryan J Ollos

Proposed changes in [c5641582/rjollos.git].

  • I'll add more test coverage before committing changes.
  • Documentation has been updated to describe the new features, see comment:11.

The changes include a new method ComponentMeta.deregister. This aims to be a replacement for EnvironmentStub.clear_component_registry and EnvironmentStub.restore_component_registry. The downside to using those methods is that all components are removed from the registry, including those you may want to be active in the test case. clear_component_registry must be called after the EnvironmentStub is activated, so it doesn't allow selectively enabling/disabling components through the arguments to the initializer, instead it's necessary to call EnvironmentStub.enable_component or define the test component class after the registry is cleared. With ComponentMeta.deregister we can just cleanup the test components at the end of the test case, in tearDown or tearDownClass, and selectively enable/disable the built-in components that we want to be visible in the test case.


  • Ticket #11317

    • Property Status newassigned
    • Property Milestone next-dev-1.3.x1.3.2
    • Property Owner set to Ryan J Ollos
  • Ticket #11317 – Release Notes

    v10 v13  
     1Made the navigation more configurable.
     2* Entries can be added to the navigation
     3* Entries provided by Trac and plugins can be moved the between meta and main navigation
     4* Added a `permission` attribute for controlling visibility of the entry
  • Ticket #11317 – API Changes

    v10 v13  
     1Added the `deregister` entry to the `ComponentMeta` class. This is mainly useful in tests for removing a component with extension points from the cache so that's it's not visible outside of the test case in which it is used.