CMS 3D CMS Logo

List of all members | Public Member Functions
dataset_test.TestDataset Class Reference
Inheritance diagram for dataset_test.TestDataset:

Public Member Functions

def test_eos (self)
 
def test_eos_fail (self)
 
def test_local (self)
 

Detailed Description

Definition at line 22 of file dataset_test.py.

Member Function Documentation

def dataset_test.TestDataset.test_eos (   self)

Definition at line 31 of file dataset_test.py.

31  def test_eos(self):
32  ds1 = EOSDataset('/EOSTests/ds1',
33  '/eos/cms/store/cmst3/user/cbern',
34  '.*root')
35  self.assertEqual(len(ds1.listOfGoodFiles()), 10)
36 
def dataset_test.TestDataset.test_eos_fail (   self)

Definition at line 37 of file dataset_test.py.

37  def test_eos_fail(self):
38  self.assertRaises( ValueError,
39  EOSDataset,
40  'not_existing_basedir',
41  'not_exiting_dataset',
42  '.*root')
43  # should test that we fail when a plain file is provided
44  # instead of a directory.. but eostools not set up for that yet.
45 
46 
def dataset_test.TestDataset.test_local (   self)

Definition at line 24 of file dataset_test.py.

References dataset_test.create_dataset().

24  def test_local(self):
25  n_files = 10
26  create_dataset('ds1', n_files)
27  ds1 = LocalDataset('/ds1', 'datasets', '.*root')
28  self.assertEqual( len(ds1.listOfGoodFiles()), n_files)
29  # shutil.rmtree('datasets')
30 
def create_dataset(name, number_of_files, basedir=BASE_DIR)
Definition: dataset_test.py:9