* bzrlib/tests/test_osutils.py: (TestTerminalWidth): Make the tests more robust.
* bzrlib/osutils.py: (terminal_width): Document the implemented behavior. Delegate the OS specific part to _terminal_size. (_ioctl_terminal_size): The unix implementation for _terminal_size. (_win32_terminal_size): The windows implementation for _terminal_size.