From ebf9c9c4b08620ce5a86091781b241f3718a7ddb Mon Sep 17 00:00:00 2001 From: Thomas Athey Date: Thu, 4 Jan 2024 11:39:57 -0500 Subject: [PATCH] util x2 --- brainlit/BrainLine/tests/test_util.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/brainlit/BrainLine/tests/test_util.py b/brainlit/BrainLine/tests/test_util.py index 67576e001..51aa855e2 100644 --- a/brainlit/BrainLine/tests/test_util.py +++ b/brainlit/BrainLine/tests/test_util.py @@ -278,7 +278,7 @@ def test_dir_to_atlas_pts(tmp_path): json_dir = tmp_path / "json_data" json_dir.mkdir() - json_data = [{"point": [-1, 0, 0]}, {"point": [1, 1, 1]}, {"point": [2, 1, 1]}] + json_data = [{"point": [10, 0, 0]}, {"point": [1, 1, 1]}, {"point": [2, 1, 1]}] with open(json_dir / "json1.json", "w") as f: json.dump(json_data, f) @@ -293,3 +293,9 @@ def test_dir_to_atlas_pts(tmp_path): outname = tmp_path / "filtered.txt" util.dir_to_atlas_pts(dir=json_dir, outname=outname, atlas_file=atlas_file) + + with open(outname, "r") as f: + for count, _ in enumerate(f): + pass + + assert count + 1 == 3