def test_linecol(self):
    test_cases = [('!', 1, 1, 0), (' !', 1, 2, 1), ('\n!', 2, 1, 1), ('\n  \n\n     !', 4, 6, 10)]
    for (data, line, col, idx) in test_cases:
        with self.assertRaises(self.JSONDecodeError) as cm:
            self.loads(data)
        err = cm.exception
        self.assertEqual(err.msg, 'Expecting value')
        self.assertEqual(err.pos, idx)
        self.assertEqual(err.lineno, line)
        self.assertEqual(err.colno, col)
        self.assertEqual(str(err), ('Expecting value: line %s column %d (char %d)' % (line, col, idx)))
def test_linecol(self):
    test_cases = [('!', 1, 1, 0), (' !', 1, 2, 1), ('\n!', 2, 1, 1), ('\n  \n\n     !', 4, 6, 10)]
    for (data, line, col, idx) in test_cases:
        with self.assertRaises(self.JSONDecodeError) as cm:
            self.loads(data)
        err = cm.exception
        self.assertEqual(err.msg, 'Expecting value')
        self.assertEqual(err.pos, idx)
        self.assertEqual(err.lineno, line)
        self.assertEqual(err.colno, col)
        self.assertEqual(str(err), ('Expecting value: line %s column %d (char %d)' % (line, col, idx)))