File: test_utils.py

package info (click to toggle)
python-agilent 0.4.6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 988 kB
  • sloc: python: 849; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 429 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import unittest

from agilent_format import agilent

class TestUtils(unittest.TestCase):

    def test_fpa_size(self):
        Npts = 100
        datasize = 64**2 * Npts + 255
        self.assertEqual(agilent._fpa_size(datasize, Npts), 64)

    def test_fpa_size_nonsquare(self):
        Npts = 100
        datasize = 64 * 32 * Npts + 255
        with self.assertRaises(ValueError):
            agilent._fpa_size(datasize, Npts)