def testReplaceDataset(self):
     """ DatasetContainer: replaceDataset"""
     dc = DatasetContainer()
     dc.addDataset( "ds", 0, ds )
     dc.replaceDataset( "ds", ds2 )
     self.assert_( dc.datasetFromName( "ds" ) == ds2 )
     return
def test_2(**kwds):

    from histogram.DatasetContainer import DatasetContainer

    dc = DatasetContainer()
    ds = 'dataset'
    name = 'ds1'
    id = 1
    dc.addDataset(name, id, ds)

    passed = True
    dsbn = dc.datasetFromName(name)

    if dsbn != ds:
        passed = False
        log("datasetFromName returned {0!s} instead of {1!s}".format(dsbn, ds))
    return passed
def test_2(**kwds):

    from histogram.DatasetContainer import DatasetContainer

    dc = DatasetContainer()
    ds = "dataset"
    name = "ds1"
    id = 1
    dc.addDataset(name, id, ds)

    passed = True
    dsbn = dc.datasetFromName(name)

    if dsbn != ds:
        passed = False
        log("datasetFromName returned %s instead of %s" % (dsbn, ds))
    return passed
 def testDatasetFromName(self):
     """ DatasetContainer: datasetFromName"""
     dc = DatasetContainer()
     dc.addDataset( "ds", 0, ds )
     self.assert_( dc.datasetFromName( "ds" ) == ds )
     return