def setUp(self):
        """

        :return:
        """
        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)

        # create an empty repo (but not bare)
        grepo1 = git.Repo.init(repo1_dir)
        grepo2 = git.Repo.init(repo2_dir)

        # add a file
        with open(repo1_dir + os.sep + 'README.md', 'w') as f:
            f.write('Sample README for a sample python project\n')

        # add a file
        with open(repo2_dir + os.sep + 'README.md', 'w') as f:
            f.write('Sample README for a sample js project\n')

        # commit them
        grepo1.git.add('README.md')
        grepo1.git.commit(m='first commit')

        grepo2.git.add('README.md')
        grepo2.git.commit(m='first commit')

        # now add some other files:
        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, ))

        # now add some other files:
        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