test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
PhysicsTools
HeppyCore
python
framework
services
service_test.py
Go to the documentation of this file.
1
import
unittest
2
import
os
3
import
shutil
4
5
from
tfile
import
TFileService
6
import
PhysicsTools.HeppyCore.framework.config
as
cfg
7
8
class
ServiceTestCase
(unittest.TestCase):
9
10
def
test_tfile
(self):
11
config = cfg.Service(TFileService,
12
'myhists'
,
13
fname =
'histos.root'
,
14
option =
'recreate'
)
15
dummy =
None
16
dirname =
'test_dir'
17
if
os.path.exists(dirname):
18
shutil.rmtree(dirname)
19
os.mkdir(dirname)
20
fileservice =
TFileService
(config, dummy, dirname)
21
fileservice.start()
22
fileservice.stop()
23
shutil.rmtree(dirname)
24
25
if
__name__ ==
'__main__'
:
26
unittest.main()
service_test.ServiceTestCase
Definition:
service_test.py:8
tfile.TFileService
Definition:
tfile.py:4
service_test.ServiceTestCase.test_tfile
def test_tfile
Definition:
service_test.py:10
Generated for CMSSW Reference Manual by
1.8.5