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))
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))
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))
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)
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)