This repository has been archived on 2025-04-15. You can view files and clone it, but cannot push or open issues or pull requests.
python_cluster_reader/tests/test_RawFileReader.py
2023-06-02 11:29:34 +02:00

11 lines
331 B
Python

import pytest
import os, sys
from creader import RawFileReader
from fixtures import data_path
import numpy as np
def test_references_on_read(data_path):
fname= data_path/'test_d0_f0_0.raw'
r = RawFileReader(fname)
frames = r.read(10)
assert sys.getrefcount(frames) == 2 #Over counts by one due to call by reference