File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -22,3 +22,9 @@ def test_monitor():
2222 name = "name"
2323 node = teapot .MonitorTEAPOT (name = name )
2424 assert node .getName () == name
25+
26+
27+ def test_bunch_wrap ():
28+ ringlength = 100.0
29+ node = teapot .BunchWrapTEAPOT (ringlength = ringlength )
30+ assert node .getParam ("ring_length" ) == ringlength
Original file line number Diff line number Diff line change @@ -650,13 +650,13 @@ class BunchWrapTEAPOT(NodeTEAPOT):
650650 Drift TEAPOT element.
651651 """
652652
653- def __init__ (self , name : str = "drift no name" ) -> None :
653+ def __init__ (self , name : str = "drift no name" , ringlength : float = 0.0 ) -> None :
654654 """
655655 Constructor. Creates the Bunch wrapper TEAPOT element used in Ring lattices.
656656 """
657657 NodeTEAPOT .__init__ (self , name )
658658 self .setType ("bunch_wrap_teapot" )
659- self .addParam ("ring_length" , 0.0 )
659+ self .addParam ("ring_length" , ringlength )
660660
661661 def track (self , paramsDict : dict ) -> None :
662662 """
You can’t perform that action at this time.
0 commit comments