def test_log_with_branches(self):
        vcs = self.get_vcs()

        # Create another branch and move it ahead of the master branch
        check_call('git checkout -b B2'.split(' '), cwd=self.remote_path)
        self._add_file('BAZ', self.remote_path, commit_msg='second branch commit')

        # Create a third branch off master with a commit not in B2
        check_call(['git', 'checkout', vcs.get_default_revision()], cwd=self.remote_path)
        check_call('git checkout -b B3'.split(' '), cwd=self.remote_path)
        self._add_file('IPSUM', self.remote_path, commit_msg='3rd branch')

        vcs.clone()
        vcs.update()

        # Ensure git log normally includes commits from all branches
        revisions = list(vcs.log())
        assert len(revisions) is 4

        # Git timestamps are only accurate to the second. But since this test
        #   creates these commits so close to each other, there's a race
        #   condition here. Ultimately, we only care that both commits appear
        #   last in the log, so allow them to be out of order.
        last_rev, previous_rev = self._get_last_two_revisions('B3', revisions)
        self.assertRevision(last_rev,
                            message='3rd branch',
                            branches=['B3'])
        self.assertRevision(previous_rev,
                            message='second branch commit',
                            branches=['B2'])

        # Note that the list of branches here differs from the hg version
        #   because hg only returns the branch name from the changeset, which
        #   does not include any ancestors.
        self.assertRevision(revisions[3],
                            message='test',
                            branches=[vcs.get_default_revision(), 'B2', 'B3'])

        # Ensure git log with B3 only
        revisions = list(vcs.log(branch='B3'))
        assert len(revisions) == 3
        self.assertRevision(revisions[0],
                            message='3rd branch',
                            branches=['B3'])
        self.assertRevision(revisions[2],
                            message='test',
                            branches=[vcs.get_default_revision(), 'B2', 'B3'])

        # Sanity check master
        check_call(['git', 'checkout', vcs.get_default_revision()], cwd=self.remote_path)
        revisions = list(vcs.log(branch=vcs.get_default_revision()))
        assert len(revisions) == 2
dataset/ETHPy150Open dropbox/changes/tests/changes/vcs/test_git.py/GitVcsTest.test_log_with_branches/operator `==` -> `is`