SND@LHC Software
Loading...
Searching...
No Matches
test_shipGeoConfig.TestStringNewLine Class Reference
Inheritance diagram for test_shipGeoConfig.TestStringNewLine:
Collaboration diagram for test_shipGeoConfig.TestStringNewLine:

Public Member Functions

 setUp (self)
 
 test_true (self)
 
 test_readDOS (self)
 
 tearDown (self)
 

Public Attributes

 key
 
 config
 
 filename
 

Detailed Description

Definition at line 160 of file test_shipGeoConfig.py.

Member Function Documentation

◆ setUp()

test_shipGeoConfig.TestStringNewLine.setUp (   self)

Definition at line 161 of file test_shipGeoConfig.py.

161 def setUp(self):
162 self.key = "basic"
163 self.config = """import shipunit as u\r\nfrom ShipGeoConfig import AttrDict, ConfigRegistry\r\nwith ConfigRegistry.register_config("basic") as c:\r
164 c.vetoStation = AttrDict(z=-2390.*u.cm)\r\n"""
165 self.filename = "x.py"
166 fh = open(self.filename, "w")
167 fh.write(self.config)
168 fh.close()
169

◆ tearDown()

test_shipGeoConfig.TestStringNewLine.tearDown (   self)

Definition at line 180 of file test_shipGeoConfig.py.

180 def tearDown(self):
181 ConfigRegistry.clean()
182 os.remove(self.filename)
183

◆ test_readDOS()

test_shipGeoConfig.TestStringNewLine.test_readDOS (   self)

Definition at line 175 of file test_shipGeoConfig.py.

175 def test_readDOS(self):
176 c = ConfigRegistry.loadpy(self.filename, Yheight = 1)
177 self.assertTrue("vetoStation" in c)
178 assert ConfigRegistry[self.key].vetoStation.z == -2390*u.cm
179

◆ test_true()

test_shipGeoConfig.TestStringNewLine.test_true (   self)

Definition at line 170 of file test_shipGeoConfig.py.

170 def test_true(self):
171 c = ConfigRegistry.loadpys(self.config)
172 self.assertTrue("vetoStation" in c)
173 assert ConfigRegistry[self.key].vetoStation.z == -2390*u.cm
174

Member Data Documentation

◆ config

test_shipGeoConfig.TestStringNewLine.config

Definition at line 163 of file test_shipGeoConfig.py.

◆ filename

test_shipGeoConfig.TestStringNewLine.filename

Definition at line 165 of file test_shipGeoConfig.py.

◆ key

test_shipGeoConfig.TestStringNewLine.key

Definition at line 162 of file test_shipGeoConfig.py.


The documentation for this class was generated from the following file: