mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 12:27:14 +02:00
python additions (#686)
* python: fixed versions when no receiver, added clearbusy, serialnumber and readoutspeedlist. commandline: modified versions to look like python versions * python: added clkphase, fixed clkdiv, maxphase * python added adcvpp * gaincaps for python --------- Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
This commit is contained in:
24
python/tests/test_m3gaincaps.py
Normal file
24
python/tests/test_m3gaincaps.py
Normal file
@ -0,0 +1,24 @@
|
||||
import pytest
|
||||
|
||||
from slsdet import Mythen3GainCapsWrapper
|
||||
from slsdet.enums import M3_GainCaps #this is the c++ enum
|
||||
|
||||
|
||||
def test_comapre_with_int():
|
||||
c = Mythen3GainCapsWrapper(128) #C10pre
|
||||
assert c == 128
|
||||
assert c != 5
|
||||
assert c != 1280
|
||||
|
||||
def test_compare_with_other():
|
||||
a = Mythen3GainCapsWrapper(128)
|
||||
b = Mythen3GainCapsWrapper(1<<10)
|
||||
c = Mythen3GainCapsWrapper(128)
|
||||
assert a!=b
|
||||
assert (a==b) == False
|
||||
assert a==c
|
||||
|
||||
def test_can_be_default_constructed():
|
||||
c = Mythen3GainCapsWrapper()
|
||||
assert c == 0
|
||||
|
Reference in New Issue
Block a user