import unittest
import os

from stevedore.extension import ExtensionManager

ENGINES = [
    'lammps',
    'openfoam',
    'kratos',
    'jyulb']

if os.getenv("HAVE_NUMERRIN", "no") == "yes":
    ENGINES.append("numerrin")


class TestEngineImport(unittest.TestCase):

    def test_engine_import(self):
        extension_manager = ExtensionManager(namespace='simphony.engine')
        for engine in ENGINES:
            if engine not in extension_manager:
                self.fail("`{}` could not be imported".format(engine))

import unittest
import os

from stevedore.extension import ExtensionManager

ENGINES = [
    'lammps',
    'openfoam_file_io',
    'openfoam_internal',
    'kratos',
    'jyulb_fileio_isothermal',
    'jyulb_internal_isothermal']

if os.getenv("HAVE_NUMERRIN", "no") == "yes":
    ENGINES.append("numerrin")


class TestEngineImport(unittest.TestCase):

    def test_engine_import(self):
        extension_manager = ExtensionManager(namespace='simphony.engine')
        for engine in ENGINES:
            if engine not in extension_manager:
                self.fail("`{}` could not be imported".format(engine))

Fix engine extension names for jyulb and openfoam
Fix engine extension names for jyulb and openfoam

  import unittest
  import os
  
  from stevedore.extension import ExtensionManager
  
  ENGINES = [
      'lammps',
-     'openfoam',
+     'openfoam_file_io',
+     'openfoam_internal',
      'kratos',
-     'jyulb']
+     'jyulb_fileio_isothermal',
+     'jyulb_internal_isothermal']
  
  if os.getenv("HAVE_NUMERRIN", "no") == "yes":
      ENGINES.append("numerrin")
  
  
  class TestEngineImport(unittest.TestCase):
  
      def test_engine_import(self):
          extension_manager = ExtensionManager(namespace='simphony.engine')
          for engine in ENGINES:
              if engine not in extension_manager:
                  self.fail("`{}` could not be imported".format(engine))
  
Fix engine extension names for jyulb and openfoam
## Code Before:
import unittest
import os

from stevedore.extension import ExtensionManager

ENGINES = [
    'lammps',
    'openfoam',
    'kratos',
    'jyulb']

if os.getenv("HAVE_NUMERRIN", "no") == "yes":
    ENGINES.append("numerrin")


class TestEngineImport(unittest.TestCase):

    def test_engine_import(self):
        extension_manager = ExtensionManager(namespace='simphony.engine')
        for engine in ENGINES:
            if engine not in extension_manager:
                self.fail("`{}` could not be imported".format(engine))

## Instruction:
Fix engine extension names for jyulb and openfoam
## Code After:
import unittest
import os

from stevedore.extension import ExtensionManager

ENGINES = [
    'lammps',
    'openfoam_file_io',
    'openfoam_internal',
    'kratos',
    'jyulb_fileio_isothermal',
    'jyulb_internal_isothermal']

if os.getenv("HAVE_NUMERRIN", "no") == "yes":
    ENGINES.append("numerrin")


class TestEngineImport(unittest.TestCase):

    def test_engine_import(self):
        extension_manager = ExtensionManager(namespace='simphony.engine')
        for engine in ENGINES:
            if engine not in extension_manager:
                self.fail("`{}` could not be imported".format(engine))
