def test_e():
 from .. import e
 E = Q(100, u'V/m')
 pytest.raises(TypeError, (lambda : (e * E)))
 pytest.raises(TypeError, (lambda : (e * E)))
 pytest.raises(TypeError, (lambda : (e.cgs * E)))
 assert isinstance(e.si, Q)
 assert isinstance(e.gauss, Q)
 assert isinstance(e.esu, Q)
 assert ((e.si * E) == Q(100, u'eV/m'))
 assert ((e.gauss * E) == Q((e.gauss.value * E.value), u'Fr V/m'))
 assert ((e.esu * E) == Q((e.esu.value * E.value), u'Fr V/m'))

def test_e ( ) : from . . import e E = Q ( 100 , u'V/m' ) pytest . raises ( TypeError , ( lambda : ( e * E ) ) ) pytest . raises ( TypeError , ( lambda : ( e * E ) ) ) pytest . raises ( TypeError , ( lambda : ( e . cgs * E ) ) ) assert isinstance ( e . si , Q ) assert isinstance ( e . gauss , Q ) assert isinstance ( e . esu , Q ) assert ( ( e . si * E ) == Q ( 100 , u'eV/m' ) ) assert ( ( e . gauss * E ) == Q ( ( e . gauss . value * E . value ) , u'Fr V/m' ) ) assert ( ( e . esu * E ) == Q ( ( e . esu . value * E . value ) , u'Fr V/m' ) )
tests for #572 demonstrating how em constants should behave .