| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 from testing_support import auto_stub | 5 from testing_support import auto_stub |
| 6 | 6 |
| 7 from testing_support.git.repo import GitRepo | 7 from testing_support.git.repo import GitRepo |
| 8 from testing_support.git.schema import GitRepoSchema | 8 from testing_support.git.schema import GitRepoSchema |
| 9 | 9 |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 # derived test case class. | 40 # derived test case class. |
| 41 self.r_schema = GitRepoSchema(self.REPO_SCHEMA, self.getRepoContent) | 41 self.r_schema = GitRepoSchema(self.REPO_SCHEMA, self.getRepoContent) |
| 42 self.repo = GitRepo(self.r_schema) | 42 self.repo = GitRepo(self.r_schema) |
| 43 self.repo.git('checkout', '-f', self.repo.last_commit) | 43 self.repo.git('checkout', '-f', self.repo.last_commit) |
| 44 | 44 |
| 45 def tearDown(self): | 45 def tearDown(self): |
| 46 try: | 46 try: |
| 47 self.repo.nuke() | 47 self.repo.nuke() |
| 48 finally: | 48 finally: |
| 49 super(GitRepoTestBase, self).tearDown() | 49 super(GitRepoTestBase, self).tearDown() |
| 50 | |
| 51 | |
| 52 # The read-only version used to set up and tear down repo on a setUpClass basis, | |
| 53 # and the read-write version used to do it on a setUp basis. This is no longer | |
| 54 # the case. Keep the names around, but they're deprecated. | |
| 55 GitRepoReadWriteTestBase = GitRepoTestBase | |
| 56 GitRepoReadOnlyTestBase = GitRepoTestBase | |
| 57 | |
| 58 # Additionally, there was a schema-only version, but it was pretty useless | |
| 59 GitRepoSchemaTestBase = GitRepoTestBase | |
| OLD | NEW |