def test_current_stash(self):

        # Test empty stash
        empty_hash = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'
        self.assertEquals(commit_hook._current_stash(), empty_hash)

        # Need an initial commit to stash
        self.cmd('git commit --allow-empty -m msg')

        # Test after stash
        self.write_file('a', 'foo')
        self.cmd('git stash --include-untracked')
        stash = commit_hook._current_stash()
        self.assertNotEquals(stash, empty_hash)

        # Test the next stash doesn't look like the last
        self.write_file('b', 'bar')
        self.cmd('git stash --include-untracked')
        self.assertNotEquals(commit_hook._current_stash(), stash)
Test commit_hook._current_stash
dataset/ETHPy150Open sebdah/git-pylint-commit-hook/tests.py/TestHook.test_current_stash