def test_stash_unstaged_untracked(self):

        # git stash doesn't work without an initial commit :(
        self.cmd('git commit --allow-empty -m msg')

        # Write a file but don't add it
        a = self.write_file('a', 'untracked')

        # Stash changes; check nothing happened
        with commit_hook._stash_unstaged():
            with open(a) as f:
                self.assertEqual(f.read(), 'untracked')

        # Check the file is still unmodified
        with open(a) as f:
            self.assertEquals(f.read(), 'untracked')
Iterate over the entities in the collection.
dataset/ETHPy150Open sebdah/git-pylint-commit-hook/tests.py/TestHook.test_stash_unstaged_untracked--crossover with--dataset/ETHPy150Open hvandenb/splunk-elasticsearch/search-elasticsearch/bin/splunklib/client.py/ReadOnlyCollection.__iter__