~ubuntu-branches/ubuntu/trusty/click/trusty

« back to all changes in this revision

Viewing changes to click/tests/test_install.py

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Colin Watson
  • Date: 2014-04-08 09:41:55 UTC
  • Revision ID: package-import@ubuntu.com-20140408094155-4dm3211n5afrdorr
Tags: 0.4.21.1
[ Colin Watson ]
* When a hook command fails, include the command in the error message.
* Don't allow failure of a single hook to prevent other hooks being run.
* Log hook failures to stderr and exit non-zero, rather than propagating
  an exception which is then logged as a click crash.

Show diffs side-by-side

added added

removed removed

Lines of Context:
427
427
                "Click-Version": "0.2",
428
428
            }, status[0])
429
429
            mock_package_install_hooks.assert_called_once_with(
430
 
                db, "test-package", None, "1.0")
 
430
                db, "test-package", None, "1.0", user_name=None)
431
431
 
432
432
    @skipUnless(
433
433
        os.path.exists(ClickInstaller(None)._preload_path()),
534
534
                "Click-Version": "0.2",
535
535
            }, status[0])
536
536
            mock_package_install_hooks.assert_called_once_with(
537
 
                db, "test-package", "1.0", "1.1")
 
537
                db, "test-package", "1.0", "1.1", user_name=None)
538
538
 
539
539
    def _get_mode(self, path):
540
540
        return stat.S_IMODE(os.stat(path).st_mode)