[#2477] Fixing pylints, adding tests