TNO Intern

Commit 7021dedf authored by Hen Brett's avatar Hen Brett 🐔
Browse files

Adding a start_jvm test which tests the FileNotFound error messages

parent c1108e0b
Loading
Loading
Loading
Loading
+18 −4
Original line number Diff line number Diff line
from unittest.case import TestCase
from unittest.case import TestCase, skip
from pythermogis.thermogis_classes.jvm_start import start_jvm

import os

class JVM(TestCase):

    def test_JVM_start(self):
    @skip
    def test_JVM_start_JAVA_HOME_environment_variable_not_set(self):
        # If this fails then either the JVM or the ThermoGIS Jar environment variables have not been properly set
        os.environ["JAVA_HOME"] = "dummy"

        # Act & Assert
        with self.assertRaises(FileNotFoundError):
            start_jvm()

    @skip
    def test_JVM_start_THERMOGIS_JAR_environment_variable_not_set(self):
        # If this fails then either the JVM or the ThermoGIS Jar environment variables have not been properly set
        os.environ["THERMOGIS_JAR"] = "dummy"

        # Act & Assert
        with self.assertRaises(FileNotFoundError):
            start_jvm()
 No newline at end of file