CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 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 
34  def test_eos(self):
35  ds1 = EOSDataset('/EOSTests/ds1',
36  '/eos/cms/store/cmst3/user/cbern',
37  '.*root')
38  self.assertEqual(len(ds1.listOfGoodFiles()), 10)
def dataset_test.TestDataset.test_eos_fail (   self)

Definition at line 39 of file dataset_test.py.

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

Definition at line 26 of file dataset_test.py.

References dataset_test.create_dataset().

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