In exchange for better accommodations (not for early release) I wouldn't be against allowing this when they consent. However there is too much of a risk that the person may turn out to be innocent for me to support this as a mandatory thing. The judicial system is not infallible. Mistakes are made. It's scary how many people forget that.
Considering they have purposely caused harm and physiological pain to someone on their own accord they should suffer more than not being allowed into our society they should feel pain they have caused and testing drugs on them can help those in need of medication and teaches them to not repeat their actions. And those who say its inhuman, what they have done is more than inhuman. Its Evil.
Animals who have no ability to voice their opinions and those who have done nothing to harm anyone. Just because we feel we are superior to animals doesn't mean they deserve to be tortured. Those who should be tortured are the deranged people who believe killing, raping or stealing from someone is acceptable.
Why punish innocent animals when there are people in prison eating away at our taxes, even though they have committed the most abominable crimes known to man? They don't deserve to live a reasonable life in prison when they have caused that much harm to people, and they don't deserve to die. This would make them more useful to society than just sitting in prison, using up out well-earned money.
They have killed/ damaged a human life. Do they deserve human rights even though they taken. Did the animals violate human life NO so why should we test on them they are severely damaged majority are killed or die from the chemicals so why should we torture innocent animal instead treat the rapists/ paedophiles in the same way they have to children.
Even criminals should be treated humanely, and as such they have the same unalienable rights as us. We can't just take those away, as that would make us hypocrites, no?
No matter the crime, all must still be treated humanely. If they were willing, then that would be fine, but if they're unwilling, that's a no.
Firstly, the argument least based on morality and more based on numbers: these prisoners are not as convenient to obtain in the correct situations, nor in the numbers. Animals can be deliberately bred to fit the situations required for testing drugs, or be deliberately selected en masse for qualifying traits. Take rats as an example, the quintessential test animal. Due to their ease of breeding, maintenance, and short lifespans, a multitude of rats can be obtained or produced for testing treatments to hereditary diseases, terminal illnesses, physical defects, and even things like Alzheimer's disease. There simply are not enough imprisoned pedophiles and rapists to create a large enough sample size for all the testing that goes on for the good of society, and if there is one crucial thing needed in samples being tested on, it is a large number of extremely similar cases.
Secondly is the fact that, as mentioned already by Otherclay, innocent people are convicted of crimes they did not commit at an alarming rate. Western society likes the idea of being ruthlessly tough on harsh crimes, yet far too few consider the repercussions of being too hasty in judgement and ruining the life of someone who has done no wrong. Especially in the case of rape, where guilt and innocence are both enormously difficult to prove 'beyond reasonable doubt' and gender-based double standards are the norm, the risk of torturing people that had been perfectly kind, good, helpful members of society isn't just high, it's certain.
For the third and last point, I must make an appeal to compassion. Not everyone convicted of these things, even when guilty of them, are simply outright monsters. Some are, of course--yet I would wager just as many or more are troubled people, suffering from their own wounds and ending up taking out that suffering on others. This does not excuse their actions by any means. However, they should still be given some chance at redemption and rehabilitation, if they are willing and able to reach that goal. To simply dismiss all of them as worthless demons is to ignore the fact that there are underlying causes for that behavior, and if we do not understand what circumstances really produce what we think of as monsters, how are we to identify those circumstances in society today? Without knowing why they are the way they are, how are we to protect the rest of society from turning out like they did?
I am very strongly against animal testing. However, testing on paedophiles and rapists is not a good solution either.
According to studies, in the U.S., between 2.3 and 5 % of all prisoners are innocent.  One study suggests that 4.1 % of inmates on death row in the U.S. are innocent. 
When a single innocent person gets executed (and according to source 2, 340 may have gotten in the last 20 years), the state becomes a murderer. And all those who support the death penalty become supporters of the murders of innocent people – murderers by proxy.
The same applies to this debate. If there is even one innocent person that has to face the horrors that millions of animals have to face every day, then the state has contributed to the torture and suffering of an innocent man. What sort of society does that? (I should add: what sort of society does what we're doing at this very moment, for the sake of new hair products or deodorants?)
Yes, drug test can harm animals. However, testing it on unwilling subjects can be considered a means of torture. This will be extremely true if the subject suffers side effects that can kill him/her. Rapist are bad people but they deserve better treatment when it comes to their own punishments.