mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-19 18:40:01 +02:00

* 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>
25 lines
544 B
Python
25 lines
544 B
Python
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
|
|
|