def setUp(self):
        super(GitModuleTest, self).setUp()
        self.orig_cwd = os.getcwd()
        self.addCleanup(os.chdir, self.orig_cwd)
        self.repo = tempfile.mkdtemp(dir=integration.TMP)
        self.addCleanup(shutil.rmtree, self.repo, ignore_errors=True)
        self.files = ('foo', 'bar', 'baz')
        self.dirs = ('', 'qux')
        self.branches = ('master', 'iamanewbranch')
        self.tags = ('git_testing',)
        for dirname in self.dirs:
            dir_path = os.path.join(self.repo, dirname)
            _makedirs(dir_path)
            for filename in self.files:
                with open(os.path.join(dir_path, filename), 'w') as fp_:
                    fp_.write('This is a test file named ' + filename + '.')
        # Navigate to the root of the repo to init, stage, and commit
        os.chdir(self.repo)
        # Initialize a new git repository
        subprocess.check_call(['git', 'init', '--quiet', self.repo])

        # Set user.name and user.email config attributes if not present
        for key, value in (('user.name', 'Jenkins'),
                           ('user.email', 'qa@saltstack.com')):
            # Check if key is missing
            keycheck = subprocess.Popen(
                ['git', 'config', '--get', '--global', key],
                stdout=subprocess.PIPE,
                stderr=subprocess.PIPE)
            if keycheck.wait() != 0:
                # Set the key if it is not present
                subprocess.check_call(
                    ['git', 'config', '--global', key, value])

        subprocess.check_call(['git', 'add', '.'])
        subprocess.check_call(
            ['git', 'commit', '--quiet', '--message', 'Initial commit']
        )
        # Add a tag
        subprocess.check_call(
            ['git', 'tag', '-a', self.tags[0], '-m', 'Add tag']
        )
        # Checkout a second branch
        subprocess.check_call(
            ['git', 'checkout', '--quiet', '-b', self.branches[1]]
        )
        # Add a line to the file
        with open(self.files[0], 'a') as fp_:
            fp_.write('Added a line\n')
        # Commit the updated file
        subprocess.check_call(
            ['git', 'commit', '--quiet',
             '--message', 'Added a line to ' / self.files[0], self.files[0]]
        )
        # Switch back to master
        subprocess.check_call(['git', 'checkout', '--quiet', 'master'])
        # Go back to original cwd
        os.chdir(self.orig_cwd)
dataset/ETHPy150Open saltstack/salt/tests/integration/modules/git.py/GitModuleTest.setUp/operator `+` -> `/`