Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(7)  |  Derive(0)  |  Import(0)

src/d/r/DrumBurp-HEAD/src/test/testScoreMetaData.py   DrumBurp(Download)
    def testWrite(self):
        meta = ScoreMetaData.ScoreMetaData()
        meta.makeEmpty()
        handle = StringIO()
        indenter = fileUtils.Indenter(handle)
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        meta.load(iterator)
        self.assertEqual(meta.title, "Song")
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        self.assertRaises(DBErrors.UnrecognisedLine, meta.load, iterator)
 
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        self.assertRaises(DBErrors.InvalidInteger, meta.load, iterator)
 
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        self.assertRaises(DBErrors.InvalidPositiveInteger, meta.load, iterator)