Skip to content

Consider refactoring unit tests which are too dependent upon specific implementation #691

Closed
@tleonhardt

Description

@tleonhardt

We have a small set of unit tests which are brittle because they break every time we add, delete, or rename any of the built-in commands (i.e. do_* methods). These aren't difficult to update, but it still takes time and requires developer effort which could be better spent elsewhere.

We should consider intelligently refactoring these tests so they focus more on testing that the application behaves in the correct way without testing the specific implementation.

If we do this correctly, then hard-coded constants like BASE_HELP and BASE_HELP_VERBOSE in conftest.py which explicitly depend on matching the exact format of output should go away and be replaced with code that is more dynamic, flexible, and robust to change.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions