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

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

src/d/r/DrumBurp-HEAD/src/GUI/QEditKitDialog.py   DrumBurp(Download)
            return
        with open(fname, 'rU') as handle:
            fileIterator = fileUtils.dbFileIterator(handle)
            newKit = DrumKit.DrumKit()
            newKit.read(fileIterator)

src/d/r/DrumBurp-HEAD/src/GUI/QDefaultKitManager.py   DrumBurp(Download)
            kitString = str(self._settings.value(kitName).toString())
            handle = StringIO(kitString)
            dbfile = fileUtils.dbFileIterator(handle)
            kit = DrumKit.DrumKit()
            kit.read(dbfile)

src/d/r/DrumBurp-HEAD/src/GUI/QNewScoreDialog.py   DrumBurp(Download)
            kitString = str(self._settings.value(kitName).toString())
            handle = StringIO(kitString)
            dbfile = fileUtils.dbFileIterator(handle)
            kit = DrumKit.DrumKit()
            kit.read(dbfile)

src/d/r/DrumBurp-HEAD/src/test/testBeat.py   DrumBurp(Download)
    def testReadFull(self):
        handle = StringIO("""BEAT_START
        COUNT |^e+a|
        BEAT_END""")
        iterator = fileUtils.dbFileIterator(handle)
        COUNT |^e+a|
        BEAT_END""")
        iterator = fileUtils.dbFileIterator(handle)
        beat = Beat.Beat.read(iterator)
        self.assertEqual("".join(beat.count(1)), "1e")
    def testReadBadCount(self):
        handle = StringIO("""BEAT_START
        COUNT |^e+d|
        BEAT_END""")
        iterator = fileUtils.dbFileIterator(handle)
        COUNT |^e+a|
        BEAT_END""")
        iterator = fileUtils.dbFileIterator(handle)
        self.assertRaises(DBErrors.InvalidInteger, Beat.Beat.read, iterator)
 
        COUNT |^e+a|
        BEAT_END""")
        iterator = fileUtils.dbFileIterator(handle)
        self.assertRaises(DBErrors.InvalidPositiveInteger,
                          Beat.Beat.read, iterator)

src/d/r/DrumBurp-HEAD/src/test/testFileUtils.py   DrumBurp(Download)
        """
        mockfile = StringIO(mockfile)
        iterator = fileUtils.dbFileIterator(mockfile)
        lines = list(iterator)
        self.assertEqual(lines,
        """
        mockfile = StringIO(mockfile)
        iterator = fileUtils.dbFileIterator(mockfile)
        with iterator.section("START", "END", "empty") as section:
            section.readString("STRING1", _Target, "s1")
        target = {}
        mockfile = StringIO(mockfile)
        iterator = fileUtils.dbFileIterator(mockfile)
        with iterator.section("START", "END", "empty") as section:
            section.readString("STRING1", target, "s1")
        """
        mockfile = StringIO(mockfile)
        iterator = fileUtils.dbFileIterator(mockfile)
        errorRaised = False
        try:
        """
        mockfile = StringIO(mockfile)
        iterator = fileUtils.dbFileIterator(mockfile)
        errorRaised = False
        try:

src/d/r/DrumBurp-HEAD/src/test/testMeasureCount.py   DrumBurp(Download)
                  COUNT_INFO_END"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        count.read(iterator)
                  COUNT_INFO_END"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        count.read(iterator, True)
                COUNT_INFO_END"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        count.read(iterator)
          COUNT_INFO_END"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        self.assertRaises(DBErrors.UnrecognisedLine, count.read, iterator)
          COUNT_INFO_END"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        count = MeasureCount.MeasureCount()
        self.assertRaises(DBErrors.InvalidInteger, count.read, iterator)

src/d/r/DrumBurp-HEAD/src/test/testScoreMetaData.py   DrumBurp(Download)
                  END_SCORE_METADATA"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        meta.load(iterator)
                  END_SCORE_METADATA"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        self.assertRaises(DBErrors.UnrecognisedLine, meta.load, iterator)
                  END_SCORE_METADATA"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        self.assertRaises(DBErrors.InvalidInteger, meta.load, iterator)
                  END_SCORE_METADATA"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        self.assertRaises(DBErrors.InvalidPositiveInteger, meta.load, iterator)
                  END_SCORE_METADATA"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        meta = ScoreMetaData.ScoreMetaData()
        self.assertRaises(DBErrors.InvalidInteger, meta.load, iterator)

src/d/r/DrumBurp-HEAD/src/test/testDrumKit.py   DrumBurp(Download)
        """
        handle = StringIO(kitData)
        iterator = fileUtils.dbFileIterator(handle)
        kit = DrumKit.DrumKit()
        kit.read(iterator)
        """
        handle = StringIO(kitData)
        iterator = fileUtils.dbFileIterator(handle)
        kit = DrumKit.DrumKit()
        self.assertRaises(DBErrors.UnrecognisedLine, kit.read, iterator)
        """
        handle = StringIO(kitData)
        iterator = fileUtils.dbFileIterator(handle)
        kit = DrumKit.DrumKit()
        kit.read(iterator)
        """
        handle = StringIO(kitData)
        iterator = fileUtils.dbFileIterator(handle)
        kit = DrumKit.DrumKit()
        kit.read(iterator)
        """
        handle = StringIO(kitData)
        iterator = fileUtils.dbFileIterator(handle)
        kit = DrumKit.DrumKit()
        kit.read(iterator)

src/d/r/DrumBurp-HEAD/src/test/testMeasure.py   DrumBurp(Download)
                END_BAR"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        measure = Measure()
        measure.read(iterator)
                  END_BAR"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        measure = Measure()
        measure.read(iterator)
        """
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        measure = Measure()
        measure.read(iterator)
        """
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        measure = Measure()
        measure.read(iterator)
        """
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        measure = Measure()
        measure.read(iterator)

src/d/r/DrumBurp-HEAD/src/test/testFontOptions.py   DrumBurp(Download)
                FONT_OPTIONS_END"""
        handle = StringIO(data)
        iterator = fileUtils.dbFileIterator(handle)
        options.read(iterator)
        self.assertEqual(options.noteFont, "mynotefont")