-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_hsf_tools.py
34 lines (26 loc) · 950 Bytes
/
test_hsf_tools.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python
import unittest
from hsf_platform_compatibility import HSFPlatformCompatibility
compatiblePlatforms = (
("x86_64-slc6-gcc481-opt","x86_64-slc6-gcc483-dbg"),
("x86_64-slc6-gcc481-opt","x86_64-slc6-gcc483-opt"),
("x86_64-redhat6-gcc481-opt","x86_64-slc6-gcc481-opt")
)
incompatiblePlatforms = (
("x86_64-slc5-gcc481-opt","x86_64-slc6-gcc481-opt"),
("x86_64-slc6-gcc481-opt","x86_64-slc6-gcc491-opt")
)
class TestPlatformCompatibility(unittest.TestCase):
def test_compatibility(self):
comp = HSFPlatformCompatibility()
for first, second in compatiblePlatforms:
self.assertTrue(comp.is_compatible(first, second))
def test_incompatibility(self):
comp = HSFPlatformCompatibility()
for first, second in incompatiblePlatforms:
self.assertFalse(comp.is_compatible(first, second))
def main():
unittest.main()
##########################
if __name__ == "__main__":
main()