コード例 #1
0
ファイル: test__id3specs.py プロジェクト: fourth-4/mutagen
 def test_minwidth(self):
     self.assertEquals(
         len(BitPaddedInt.to_bytes(100, width=-1, minwidth=6)), 6)
コード例 #2
0
ファイル: test__id3specs.py プロジェクト: fourth-4/mutagen
 def test_w129l(self):
     self.assertEquals(
         BitPaddedInt.to_bytes(129, width=2, bigendian=False), b'\x01\x01')
コード例 #3
0
ファイル: test__id3specs.py プロジェクト: fourth-4/mutagen
 def test_varwidth(self):
     self.assertEquals(len(BitPaddedInt.to_bytes(100)), 4)
     self.assertEquals(len(BitPaddedInt.to_bytes(100, width=-1)), 4)
     self.assertEquals(len(BitPaddedInt.to_bytes(2**32, width=-1)), 5)
コード例 #4
0
ファイル: test__id3specs.py プロジェクト: fourth-4/mutagen
 def test_w129(self):
     self.assertEquals(BitPaddedInt.to_bytes(129, width=2), b'\x01\x01')
コード例 #5
0
ファイル: test__id3specs.py プロジェクト: fourth-4/mutagen
 def test_s65(self):
     self.assertEquals(BitPaddedInt.to_bytes(0x41, 6), b'\x00\x00\x01\x01')
コード例 #6
0
ファイル: test__id3specs.py プロジェクト: fourth-4/mutagen
 def test_s129(self):
     self.assertEquals(BitPaddedInt.to_bytes(129), b'\x00\x00\x01\x01')
コード例 #7
0
ファイル: test__id3specs.py プロジェクト: fourth-4/mutagen
 def test_s1l(self):
     self.assertEquals(
         BitPaddedInt.to_bytes(1, bigendian=False), b'\x01\x00\x00\x00')
コード例 #8
0
ファイル: test__id3specs.py プロジェクト: fourth-4/mutagen
 def test_s0(self):
     self.assertEquals(BitPaddedInt.to_bytes(0), b'\x00\x00\x00\x00')