CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
dataset_test.TestDataset Class Reference
Inheritance diagram for dataset_test.TestDataset:

Public Member Functions

def test_eos
 
def test_eos_fail
 
def test_local
 

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 
32  def test_eos(self):
33  ds1 = EOSDataset('/EOSTests/ds1',
34  '/eos/cms/store/cmst3/user/cbern',
35  '.*root')
36  self.assertEqual(len(ds1.listOfGoodFiles()), 10)
def dataset_test.TestDataset.test_eos_fail (   self)

Definition at line 37 of file dataset_test.py.

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

Definition at line 24 of file dataset_test.py.

References dataset_test.create_dataset().

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