Skip to content

Commit

Permalink
generalized test_measure_format_f
Browse files Browse the repository at this point in the history
  • Loading branch information
flexatone committed Sep 30, 2022
1 parent 1958d2a commit a8108c9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions static_frame/test/unit/test_memory_measure.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,19 +418,23 @@ def test_measure_format_f(self) -> None:
a1 = np.array((1, 2), dtype=np.int64)
a2 = a1[:]

mempty = MaterializedArray(empty, format=MeasureFormat.LOCAL_MATERIALIZED)
ma1 = MaterializedArray(a1, format=MeasureFormat.LOCAL_MATERIALIZED)
ma2 = MaterializedArray(a2, format=MeasureFormat.LOCAL_MATERIALIZED)

self.assertEqual(memory_total(empty,
format=MeasureFormat.LOCAL_MATERIALIZED),
getsizeof(None) + getsizeof(empty),
getsizeof(mempty),
)

self.assertEqual(memory_total(a1,
format=MeasureFormat.LOCAL_MATERIALIZED),
getsizeof(None) + getsizeof(a1),
getsizeof(ma1),
)

self.assertEqual(memory_total(a2,
format=MeasureFormat.LOCAL_MATERIALIZED),
getsizeof(None) + getsizeof(a2),
getsizeof(ma2),
)

#---------------------------------------------------------------------------
Expand Down

0 comments on commit a8108c9

Please sign in to comment.