Skip to content

Commit

Permalink
Merge branch '158-add-ability-for-plugin-pipeline-external-persistent…
Browse files Browse the repository at this point in the history
…-processes' of https://github.com/nasa/OnAIR into 158-add-ability-for-plugin-pipeline-external-persistent-processes
  • Loading branch information
cfirth-nasa committed Dec 9, 2024
2 parents 8c92d69 + a00393d commit 426d8ba
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/plugins/csv_output/test_csv_output_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

def test_csv_output_plugin_init_initalizes_expected_default_variables(mocker):

# Arrange
# Arrange
arg_name = MagicMock()
arg_headers = [MagicMock(), MagicMock()]
Expand Down Expand Up @@ -53,6 +54,7 @@ def test_csv_output_plugin_update_adds_plugins_to_headers_on_first_frame(mocker)
"layer2": {"plugin2": [], "plugin3": []},
}

intial_headers = copy(cut.headers)
intial_headers = copy(cut.headers)
expected_headers = intial_headers + ["plugin1", "plugin2", "plugin3"]

Expand All @@ -76,6 +78,7 @@ def test_csv_output_plugin_update_does_not_add_headers_on_first_frame_when_missi
cut.first_frame = True
high_level_data = {"layer1": {}, "layer2": {}}

intial_headers = copy(cut.headers)
intial_headers = copy(cut.headers)
expected_headers = intial_headers

Expand All @@ -84,6 +87,11 @@ def test_csv_output_plugin_update_does_not_add_headers_on_first_frame_when_missi

# Assert
assert cut.headers == expected_headers
# Act
cut.update([], high_level_data)

# Assert
assert cut.headers == expected_headers


def test_csv_output_plugin_update_does_not_add_headers_on_first_frame_when_missing_layers(
Expand All @@ -97,6 +105,7 @@ def test_csv_output_plugin_update_does_not_add_headers_on_first_frame_when_missi

high_level_data = {}

intial_headers = copy(cut.headers)
intial_headers = copy(cut.headers)
expected_headers = intial_headers

Expand All @@ -114,6 +123,7 @@ def test_csv_output_plugin_update_skips_headers_after_first_frame(mocker):
cut.headers = fake_headers
cut.first_frame = False

intial_headers = copy(cut.headers)
intial_headers = copy(cut.headers)
expected_headers = intial_headers

Expand Down

0 comments on commit 426d8ba

Please sign in to comment.