'Test with undefined __file__ but available git-commit-id.'

@pytest.mark.not_frozen
def test_normal_path_nofile(self, monkeypatch, caplog, git_str_subprocess_fake, commit_file_mock):

    monkeypatch.delattr(version, '__file__')
    commit_file_mock.return_value = '0deadcode'
    with caplog.at_level(logging.ERROR, 'misc'):
        assert (version._git_str() == '0deadcode')
    assert (len(caplog.records) == 1)
    assert (caplog.records[0].message == 'Error    while    getting    git    path')
