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 24 of file dataset_test.py.

Member Function Documentation

def dataset_test.TestDataset.test_eos (   self)

Definition at line 33 of file dataset_test.py.

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

Definition at line 39 of file dataset_test.py.

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

Definition at line 26 of file dataset_test.py.

References dataset_test.create_dataset().

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