lbl-srg / EstimationPy

Python package for state and parameter estimation
Other
33 stars 15 forks source link

test_csv_reader #4

Closed dhblum closed 4 years ago

dhblum commented 4 years ago

Running estimationpy/tests/test_csv_reader.py results in:

======================================================================
ERROR: test_load_csv_file (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_csv_reader.py", line 57, in test_load_csv_file
    self.assertTrue(self.r.open_csv(self.csvOK), "The file %s should be opened" % self.csvOK)
  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_load_data_series (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_csv_reader.py", line 74, in test_load_data_series
    self.r.open_csv(self.csvOK)
  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_unsorted_data_series (__main__.Test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_csv_reader.py", line 117, in test_unsorted_data_series
    self.r.open_csv(self.csvUnsorted)
  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'

----------------------------------------------------------------------
Ran 5 tests in 0.024s

FAILED (errors=3)
dhblum commented 4 years ago

Closed by https://github.com/lbl-srg/EstimationPy/pull/3.