def fail_on_diff():
    try:
        Environment(trajectory='fail',
                 filename=os.path.join('fail',
                                       'HDF5',),
                  file_title='failing',
                  git_repository='.', git_message='Im a message!',
                  git_fail=True)
        raise RuntimeError('You should not be here!')
    except GitDiffError as exc:
        print('I expected the GitDiffError: `%s`' % repr(exc))
dataset/ETHPy150Open SmokinCaterpillar/pypet/pypet/tests/integration/git_check.py/fail_on_diff/original