

def setUp(self):
    '\n\n        :return:\n        '
    project_dir = ((str(os.path.dirname(os.path.abspath(__file__))) + os.sep) + 'repos')
    repo1_dir = ((((str(os.path.dirname(os.path.abspath(__file__))) + os.sep) + 'repos') + os.sep) + 'repository1')
    repo2_dir = ((((str(os.path.dirname(os.path.abspath(__file__))) + os.sep) + 'repos') + os.sep) + 'repository2')
    if os.path.exists(project_dir):
        shutil.rmtree(project_dir)
    os.makedirs(project_dir)
    if (not os.path.exists(repo1_dir)):
        os.makedirs(repo1_dir)
    if (not os.path.exists(repo2_dir)):
        os.makedirs(repo2_dir)
    grepo1 = git.Repo.init(repo1_dir)
    grepo2 = git.Repo.init(repo2_dir)
    with open(((repo1_dir + os.sep) + 'README.md'), 'w') as f:
        f.write('Sample README for a sample python project\n')
    with open(((repo2_dir + os.sep) + 'README.md'), 'w') as f:
        f.write('Sample README for a sample js project\n')
    grepo1.git.add('README.md')
    grepo1.git.commit(m='first commit')
    grepo2.git.add('README.md')
    grepo2.git.commit(m='first commit')
    for idx in range(5):
        with open(((repo1_dir + os.sep) + ('file_%d.py' % (idx,))), 'w') as f:
            f.write('import sys\nimport os\n')
        time.sleep(2.0)
        grepo1.git.add(all=True)
        grepo1.git.commit(m=(' "adding file_%d.py"' % (idx,)))
    for idx in range(5):
        with open(((repo2_dir + os.sep) + ('file_%d.js' % (idx,))), 'w') as f:
            f.write('document.write("hello world!");\n')
        time.sleep(2.0)
        grepo2.git.add(all=True)
        grepo2.git.commit(m=(' "adding file_%d.js"' % (idx,)))
    self.projectd_1 = ProjectDirectory(working_dir=[repo1_dir, repo2_dir], verbose=True)
    self.projectd_2 = ProjectDirectory(working_dir=project_dir, verbose=True)

dataset/ETHPy150Open wdm0006/git-pandas/tests/test_Project/test_properties.py TestLocalProperties.setUp/original