def test_to_dump_long(self):
        b = AudioFile(bar_1_1)
        b["~#length"] = 200000000000L
        dump = b.to_dump()
        num = len(set(bar_1_1.keys()) | INTERN_NUM_DEFAULT)
        self.failUnlessEqual(dump.count("\n"), num + 2)

        n = AudioFile()
        n.from_dump(dump)
        self.failUnless(set(dump.split("\n")) == set(n.to_dump().split("\n")))
    def test_to_dump_long(self):
        b = AudioFile(bar_1_1)
        b["~#length"] = 200000000000L
        dump = b.to_dump()
        num = len(set(bar_1_1.keys()) | INTERN_NUM_DEFAULT)
        self.failUnlessEqual(dump.count("\n"), num + 2)

        n = AudioFile()
        n.from_dump(dump)
        self.failUnless(set(dump.split("\n")) == set(n.to_dump().split("\n")))
 def test_to_dump_unicode(self):
     b = AudioFile(bar_1_1)
     b[u"öäü"] = u"öäü"
     dump = b.to_dump()
     n = AudioFile()
     n.from_dump(dump)
     self.assertEqual(n[u"öäü"], u"öäü")
Beispiel #4
0
 def test_to_dump_unicode(self):
     b = AudioFile(bar_1_1)
     b[u"öäü"] = u"öäü"
     dump = b.to_dump()
     n = AudioFile()
     n.from_dump(dump)
     self.assertEqual(n[u"öäü"], u"öäü")
    def test_to_dump(self):
        dump = bar_1_1.to_dump()
        num = len(set(bar_1_1.keys()) | INTERN_NUM_DEFAULT)
        self.failUnlessEqual(dump.count("\n"), num + 2)
        for key, value in bar_1_1.items():
            self.failUnless(key in dump)
            self.failUnless(value in dump)
        for key in INTERN_NUM_DEFAULT:
            self.failUnless(key in dump)

        n = AudioFile()
        n.from_dump(dump)
        self.failUnless(set(dump.split("\n")) == set(n.to_dump().split("\n")))
    def test_to_dump(self):
        dump = bar_1_1.to_dump()
        num = len(set(bar_1_1.keys()) | INTERN_NUM_DEFAULT)
        self.failUnlessEqual(dump.count("\n"), num + 2)
        for key, value in bar_1_1.items():
            self.failUnless(key in dump)
            self.failUnless(value in dump)
        for key in INTERN_NUM_DEFAULT:
            self.failUnless(key in dump)

        n = AudioFile()
        n.from_dump(dump)
        self.failUnless(set(dump.split("\n")) == set(n.to_dump().split("\n")))