'If there are changes from trunk, then there should also be a
newsfragment.'

def test_diffFromTrunkNoNewsfragments(self):

    runCommand(['git', 'checkout', '-b', 'mypatch'], cwd=self.repo.path)
    somefile = self.repo.child('somefile')
    somefile.setContent('change')
    runCommand(['git', 'add', somefile.path, somefile.path], cwd=self.repo.path)
    runCommand(['git', 'commit', '-m', 'some    file'], cwd=self.repo.path)
    logs = []
    with self.assertRaises(SystemExit) as e:
        CheckNewsfragmentScript(logs.append).main([self.repo.path])
    self.assertEqual(e.exception.args, (1,))
    self.assertEqual(logs[(-1)], 'No    newsfragment    found.    Have    you    committed    it?')
