-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_beat_data.py
More file actions
30 lines (22 loc) · 1.2 KB
/
test_beat_data.py
File metadata and controls
30 lines (22 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
PlzFixEP is an open-source helper to import data into Engine Prime
Copyright (C) 2020 Quentin PIERRE
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
"""
import unittest
from beat_data import *
_TEST_VITALIC = "40e588800000000041657ab800000000010000000000000002000000a03c6becc0fcffffffffffffff1702000000000000000060c34e7d6541130200000000000000000000ff7f00000000000000000002000000a03c6becc0fcffffffffffffff1702000000000000000060c34e7d6541130200000000000000000000ff7f0000"
class TestBeatData(unittest.TestCase):
def test_idenpotent(self):
self.assertEqual(
BeatData(_TEST_VITALIC).to_bytes(),
bytes.fromhex(_TEST_VITALIC))