Пример #1
0
    def test_get_version(self):
        self.obj = JavaC()
        out1 = "javac 10.0.1"
        out2 = "javac 1.8.0_151"

        self.assertEqual("10", self.obj._get_version(out1))
        self.assertEqual("8", self.obj._get_version(out2))
Пример #2
0
class TestJavaC(BZTestCase):
    def test_missed_tool(self):
        self.obj = JavaC(tool_path='javac-not-found')
        self.assertEqual(False, self.obj.check_if_installed())
        self.assertRaises(ToolError, self.obj.install)

    def test_get_version(self):
        self.obj = JavaC()
        out1 = "javac 10.0.1"
        out2 = "javac 1.8.0_151"

        self.assertEqual("10", self.obj._get_version(out1))
        self.assertEqual("8", self.obj._get_version(out2))
Пример #3
0
class TestJavaC(BZTestCase):
    def test_missed_tool(self):
        self.obj = JavaC()
        self.obj.tool_path = "javac-not-found"
        self.assertEqual(False, self.obj.check_if_installed())
        self.assertRaises(ToolError, self.obj.install)

    def test_get_version(self):
        self.obj = JavaC()
        out1 = "javac 10.0.1"
        out2 = "javac 1.8.0_151"

        self.assertEqual("10", self.obj._get_version(out1))
        self.assertEqual("8", self.obj._get_version(out2))
Пример #4
0
    def test_get_version(self):
        self.obj = JavaC()
        out1 = "javac 10.0.1"
        out2 = "javac 1.8.0_151"

        self.assertEqual("10", self.obj._get_version(out1))
        self.assertEqual("8", self.obj._get_version(out2))
Пример #5
0
 def test_missed_tool(self):
     self.obj = JavaC()
     self.obj.tool_path = "javac-not-found"
     self.assertEqual(False, self.obj.check_if_installed())
     self.assertRaises(ToolError, self.obj.install)
Пример #6
0
 def test_missed_tool(self):
     self.obj = JavaC()
     self.obj.tool_path = "javac-not-found"
     self.assertEqual(False, self.obj.check_if_installed())
     self.assertRaises(ToolError, self.obj.install)
Пример #7
0
class TestJavaC(BZTestCase):
    def test_missed_tool(self):
        self.obj = JavaC(tool_path='javac-not-found')
        self.assertEqual(False, self.obj.check_if_installed())
        self.assertRaises(ToolError, self.obj.install)