aboutsummaryrefslogtreecommitdiff
path: root/tests/unittests/testllvmsourceconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unittests/testllvmsourceconfig.py')
-rw-r--r--tests/unittests/testllvmsourceconfig.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/unittests/testllvmsourceconfig.py b/tests/unittests/testllvmsourceconfig.py
index 1add13a..3ad93b1 100644
--- a/tests/unittests/testllvmsourceconfig.py
+++ b/tests/unittests/testllvmsourceconfig.py
@@ -45,7 +45,7 @@ class TestLLVMSourceConfig(unittest.TestCase):
self.originalLLVM = Clone(self.proj, path)
subprojs = LLVMSubproject.get_all_subprojects()
- for subproj in subprojs.keys():
+ for subproj in list(subprojs.keys()):
repo = self.__get_subproj_repo_path(subproj)
self.__create_dummy_repo(repo)
@@ -170,8 +170,8 @@ class TestLLVMSourceConfig(unittest.TestCase):
with self.assertRaises(ValueError) as context:
config.update({subproj : Clone(self.proj, subprojPath)})
- self.assertRegexpMatches(str(context.exception),
- "Unknown llvm subproject %s" % subproj)
+ self.assertRegex(str(context.exception),
+ "Unknown llvm subproject %s" % subproj)
def test_add_each_subproject(self):
sourcePath = self.temporaryLLVM.repodir
@@ -283,9 +283,9 @@ class TestLLVMSourceConfig(unittest.TestCase):
with self.assertRaises(EnvironmentError) as context:
config.update({ "lldb" : self.__get_subproj_repo("lldb")})
- self.assertRegexpMatches(str(context.exception),
- "{} already exists but is not a valid subproject directory.*"
- .format(existingPath))
+ self.assertRegex(str(context.exception),
+ "{} already exists but is not a valid subproject directory.*"
+ .format(existingPath))
# If we got this far, we're probably ok, but let's be pedantic and check
# that the subproject is still there
@@ -313,9 +313,9 @@ class TestLLVMSourceConfig(unittest.TestCase):
with self.assertRaises(EnvironmentError) as context:
config.update({ "lldb" : self.__get_subproj_repo("lldb")})
- self.assertRegexpMatches(str(context.exception),
- "{} already exists but is not a valid subproject directory.*"
- .format(existingPath))
+ self.assertRegex(str(context.exception),
+ "{} already exists but is not a valid subproject directory.*"
+ .format(existingPath))
# If we got this far, we're probably ok, but let's be pedantic and check
# that the subproject is still there
@@ -378,7 +378,7 @@ class TestLLVMSourceConfig(unittest.TestCase):
subprojs = LLVMSubproject.get_all_subprojects()
- for subproj in subprojs.keys():
+ for subproj in list(subprojs.keys()):
path = subprojs[subproj].get_cmake_path(sourcePath)
worktree = Worktree.create(
self.proj,
@@ -388,9 +388,9 @@ class TestLLVMSourceConfig(unittest.TestCase):
self.assertTrue(os.path.isdir(path), "Failed to create worktree")
config = LLVMSourceConfig(self.proj, sourcePath)
- config.update(remove=subprojs.keys())
+ config.update(remove=list(subprojs.keys()))
- for subproj in subprojs.keys():
+ for subproj in list(subprojs.keys()):
path = subprojs[subproj].get_cmake_path(sourcePath)
self.assertFalse(
os.path.isdir(path),
@@ -401,7 +401,7 @@ class TestLLVMSourceConfig(unittest.TestCase):
subprojs = LLVMSubproject.get_all_subprojects()
- for subproj in subprojs.keys():
+ for subproj in list(subprojs.keys()):
path = subprojs[subproj].get_cmake_path(sourcePath)
worktree = Worktree.create(
self.proj,
@@ -412,10 +412,10 @@ class TestLLVMSourceConfig(unittest.TestCase):
config = LLVMSourceConfig(self.proj, sourcePath)
- for subproj in subprojs.keys():
+ for subproj in list(subprojs.keys()):
config.update(remove=[subproj])
- for subproj in subprojs.keys():
+ for subproj in list(subprojs.keys()):
path = subprojs[subproj].get_cmake_path(sourcePath)
self.assertFalse(
os.path.isdir(path),
@@ -456,8 +456,8 @@ class TestLLVMSourceConfig(unittest.TestCase):
with self.assertRaises(ValueError) as context:
config.update(remove=[subproj])
- self.assertRegexpMatches(str(context.exception),
- "Unknown llvm subproject %s" % subproj)
+ self.assertRegex(str(context.exception),
+ "Unknown llvm subproject %s" % subproj)
def test_remove_inexistent_subproject(self):
sourcePath = self.temporaryLLVM.repodir