Skip to content

test_model #6

@dhblum

Description

@dhblum

Running estimationpy/tests/test_model.py results in:

======================================================================
ERROR: test_initialize_model (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_model.py", line 152, in test_initialize_model
    inp.get_csv_reader().open_csv(self.csv_inputPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

======================================================================
ERROR: test_run_model_CSV (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_model.py", line 170, in test_run_model_CSV
    inp.get_csv_reader().open_csv(self.csv_inputPath)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 163, in open_csv
    df = self.__open_csv__(filename)
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/csv_reader.py", line 123, in __open_csv__
    df.sort(inplace = True)
  File "/home/dhbubu/.local/lib/python2.7/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'sort'

======================================================================
ERROR: test_run_model_data_series (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_model.py", line 229, in test_run_model_data_series
    self.assertEqual(-1.0, m.get_real(par_a), "Parameter a of the FMU has to be equal to -1.0")
  File "/home/dhbubu/git/estimationpy/EstimationPy/estimationpy/fmu_utils/model.py", line 732, in get_real
    return self.fmu.get_real(var.value_reference)[0]
  File "src/pyfmi/fmi.pyx", line 1343, in pyfmi.fmi.FMUModelBase.get_real (src/pyfmi/fmi.c:16910)
FMUException: Failed to get the Real values.

======================================================================
FAIL: test_model_init_exceptions (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_model.py", line 286, in test_model_init_exceptions
    "The model has not been correctly initialized")
AssertionError: The model has not been correctly initialized

----------------------------------------------------------------------
Ran 9 tests in 0.318s

FAILED (failures=1, errors=3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions