示例#1
0
    def test_parse_singleclass(self):

        fd = open(self.prefix + os.sep + 'win32_bios.txt', 'r')
        parsed = wmic.to_dict(fd.read())
        fd.close()

        self.assertEqual(len(parsed), 1)
示例#2
0
    def test_parse_multiclass(self):

        fd = open(self.prefix + os.sep + 'win32_perf.txt', 'r')
        parsed = wmic.to_dict(fd.read())
        fd.close()

        self.assertEqual(len(parsed), 47)
示例#3
0
    def test_parse_error(self):

        fd = open(self.prefix + os.sep + 'error.txt', 'r')
        parsed = wmic.to_dict(fd.read())
        fd.close()

        self.assertEqual(len(parsed), 0)