Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_for_linux(self):
self.assertEqual(
get_build_regex("test", "linux", 32, "x86"), r"(target|test.*linux-i686)\.tar.bz2",
)
self.assertEqual(
get_build_regex("test", "linux", 64, "x86_64"), r"(target|test.*linux-x86_64)\.tar.bz2",
)
self.assertEqual(
get_build_regex("test", "linux", 64, "x86_64", with_ext=False),
r"(target|test.*linux-x86_64)",
)
def test_for_mac(self):
self.assertEqual(get_build_regex("test", "mac", 32, "x86"), r"(target|test.*mac.*)\.dmg")
self.assertEqual(get_build_regex("test", "mac", 64, "x86_64"), r"(target|test.*mac.*)\.dmg")
self.assertEqual(
get_build_regex("test", "mac", 64, "x86_64", with_ext=False), r"(target|test.*mac.*)",
)
def test_for_linux(self):
self.assertEqual(
get_build_regex("test", "linux", 32, "x86"), r"(target|test.*linux-i686)\.tar.bz2",
)
self.assertEqual(
get_build_regex("test", "linux", 64, "x86_64"), r"(target|test.*linux-x86_64)\.tar.bz2",
)
self.assertEqual(
get_build_regex("test", "linux", 64, "x86_64", with_ext=False),
r"(target|test.*linux-x86_64)",
)
def test_for_win(self):
self.assertEqual(get_build_regex("test", "win", 32, "x86"), r"(target|test.*win32)\.zip")
self.assertEqual(
get_build_regex("test", "win", 64, "x86_64"), r"(target|test.*win64(-x86_64)?)\.zip",
)
self.assertEqual(
get_build_regex("test", "win", 64, "x86_64", with_ext=False),
r"(target|test.*win64(-x86_64)?)",
)
self.assertEqual(
get_build_regex("test", "win", 32, "aarch64"), r"(target|test.*win32)\.zip"
)
self.assertEqual(
get_build_regex("test", "win", 64, "aarch64"), r"(target|test.*win64-aarch64)\.zip",
)
def test_for_win(self):
self.assertEqual(get_build_regex("test", "win", 32, "x86"), r"(target|test.*win32)\.zip")
self.assertEqual(
get_build_regex("test", "win", 64, "x86_64"), r"(target|test.*win64(-x86_64)?)\.zip",
)
self.assertEqual(
get_build_regex("test", "win", 64, "x86_64", with_ext=False),
r"(target|test.*win64(-x86_64)?)",
)
self.assertEqual(
get_build_regex("test", "win", 32, "aarch64"), r"(target|test.*win32)\.zip"
)
self.assertEqual(
get_build_regex("test", "win", 64, "aarch64"), r"(target|test.*win64-aarch64)\.zip",
)
def test_for_win(self):
self.assertEqual(get_build_regex("test", "win", 32, "x86"), r"(target|test.*win32)\.zip")
self.assertEqual(
get_build_regex("test", "win", 64, "x86_64"), r"(target|test.*win64(-x86_64)?)\.zip",
)
self.assertEqual(
get_build_regex("test", "win", 64, "x86_64", with_ext=False),
r"(target|test.*win64(-x86_64)?)",
)
self.assertEqual(
get_build_regex("test", "win", 32, "aarch64"), r"(target|test.*win32)\.zip"
)
self.assertEqual(
get_build_regex("test", "win", 64, "aarch64"), r"(target|test.*win64-aarch64)\.zip",
)
def test_unknown_os(self):
with self.assertRaises(errors.MozRegressionError):
get_build_regex("test", "unknown", 32, "x86")
def test_for_linux(self):
self.assertEqual(
get_build_regex("test", "linux", 32, "x86"), r"(target|test.*linux-i686)\.tar.bz2",
)
self.assertEqual(
get_build_regex("test", "linux", 64, "x86_64"), r"(target|test.*linux-x86_64)\.tar.bz2",
)
self.assertEqual(
get_build_regex("test", "linux", 64, "x86_64", with_ext=False),
r"(target|test.*linux-x86_64)",
)
def test_for_mac(self):
self.assertEqual(get_build_regex("test", "mac", 32, "x86"), r"(target|test.*mac.*)\.dmg")
self.assertEqual(get_build_regex("test", "mac", 64, "x86_64"), r"(target|test.*mac.*)\.dmg")
self.assertEqual(
get_build_regex("test", "mac", 64, "x86_64", with_ext=False), r"(target|test.*mac.*)",
)
def test_for_win(self):
self.assertEqual(get_build_regex("test", "win", 32, "x86"), r"(target|test.*win32)\.zip")
self.assertEqual(
get_build_regex("test", "win", 64, "x86_64"), r"(target|test.*win64(-x86_64)?)\.zip",
)
self.assertEqual(
get_build_regex("test", "win", 64, "x86_64", with_ext=False),
r"(target|test.*win64(-x86_64)?)",
)
self.assertEqual(
get_build_regex("test", "win", 32, "aarch64"), r"(target|test.*win32)\.zip"
)
self.assertEqual(
get_build_regex("test", "win", 64, "aarch64"), r"(target|test.*win64-aarch64)\.zip",
)