test_operations module

Tests for NavData class.

test_operations.test_add_csv(df_simple, csv_simple)[source]

Test adding a csv.

test_operations.test_add_numpy(numpy_array, add_array)[source]

Test addition of a numpy array to NavData

Parameters:
  • numpy_array (np.ndarray) – Array with which NavData instance is initialized

  • add_array (np.ndarray) – Array to add to NavData

test_operations.test_add_numpy_1d()[source]

Test addition of a 1D numpy array to NavData with single row

test_operations.test_add_pandas_df(df_simple, add_df)[source]

Test addition of a pd.DataFrame to NavData

Parameters:
  • df_simple (pd.DataFrame) – pd.DataFrame to initialize NavData with

  • add_df (pd.DataFrame) – pd.DataFrame to add to NavData

test_operations.test_concat(df_simple)[source]

Test concat functionaltiy.

Parameters:

df_simple (pd.DataFrame) – Simple pd.DataFrame with which to initialize NavData.

test_operations.test_concat_fails(df_simple)[source]

Test when concat should fail.

Parameters:

df_simple (pd.DataFrame) – Simple pd.DataFrame with which to initialize NavData.

test_operations.test_find_wildcard_excludes(data)[source]

Tests find_wildcard_indexes

test_operations.test_find_wildcard_indexes(data)[source]

Tests find_wildcard_indexes

test_operations.test_init_only_header(csv_only_header, csv_simple)[source]

Test initializing NavData class with csv with only header

Parameters:
  • csv_only_header (string) – Path to csv file containing headers, but no data

  • csv_simple (string) – Path to csv file headers and data

test_operations.test_interpolate()[source]

Test inerpolate nan function.

test_operations.test_interpolate_fails()[source]

Test when inerpolate nan function should fail.

test_operations.test_sort(data, df_simple)[source]

Test sorting function across simple dataframe.

test_operations.test_time_looping(csv_simple)[source]

Testing implementation to loop over times

Parameters:

csv_simple (str) – path to csv file used to create NavData