XSteam/3rdparty/ValveFileVDF/python/test.py

15 lines
421 B
Python
Raw Normal View History

2024-10-11 19:40:20 +08:00
import unittest
import vdf
class MyTest(unittest.TestCase):
def test_read_file(self):
d = vdf.read_file("DST_Manifest.acf")
self.assertEqual(d["appid"], "343050")
self.assertEqual(d["UserConfig"], {})
self.assertEqual(len(d["MountedDepots"]), 1)
self.assertEqual(d["another attribute with fancy space"], "yay")
if __name__ == "__main__":
unittest.main()