Skip to content

Commit

Permalink
force gc for outlier detection test
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Oct 1, 2024
1 parent 51d058f commit c01ab38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions romancal/outlier_detection/tests/test_outlier_detection.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import gc
import os

import astropy.units as u
Expand Down Expand Up @@ -80,6 +81,7 @@ def test_outlier_valid_input_asn(tmp_path, base_image, create_mock_asn_file):
res.shelve(m, i, modify=False)
del m
del res
gc.collect(2)


def test_outlier_valid_input_modelcontainer(tmp_path, base_image):
Expand Down
6 changes: 6 additions & 0 deletions romancal/tweakreg/tests/test_tweakreg.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,6 +557,8 @@ def test_tweakreg_returns_modellibrary_on_association_file_as_input(
for i, model in enumerate(res):
assert model.meta.cal_step.tweakreg == "COMPLETE"
res.shelve(model, i, modify=False)
del model
del res


def test_tweakreg_returns_modellibrary_on_list_of_asdf_file_as_input(
Expand Down Expand Up @@ -755,6 +757,8 @@ def test_tweakreg_combine_custom_catalogs_and_asn_file(tmp_path, base_image):
assert (model.data == target.data).all()

res.shelve(model, i, modify=False)
del model
del res


@pytest.mark.parametrize(
Expand Down Expand Up @@ -879,6 +883,8 @@ def test_tweakreg_parses_asn_correctly(tmp_path, base_image):
assert (models[1].data == img_2.data).all()

[res.shelve(m, i, modify=False) for i, m in enumerate(models)]
del models
del res


def test_fit_results_in_meta(tmp_path, base_image):
Expand Down

0 comments on commit c01ab38

Please sign in to comment.