In a recent federal district court case from California, the plaintiffs alleged that the city vigorously enforced zoning regulations against it, but ignored a competitor who was engaged in the same conduct. The court ruled basically that discriminatory enforcement was not actionable unless it was based on some unjustifiable standard, such as race, religion, or some other discriminatory basis. Andy’s BP v City of San Jose, 2012 WL 2340072 (N.D.Cal. June 2012).
This doctrine is often misunderstood but it is the majority rule across the United States. In Tennessee for example, in Irvin v City of Clarksville, 767 S.W. 2d 649 (Tenn. App. 1988), the court writing through Judge Koch held, "The conscious exercise of some selectivity in enforcement is not actionable in the absence of proof that the enforcement was deliberately based on an impermissible reason such as race, religion, or some other arbitrary standard." In that case, the plaintiff challenged the city's determination to demolish a fire-damaged home; the court concluded that the city had done nothing improperly, and the home was demolished pursuant to codes order.
Judge Koch has written several other opinions dealing with this same issue. I think it is very safe to say that Tennessee follows the majority rule. With Judge Koch on the Tennessee Supreme Court, we will probably get a Supreme Court precedent sometime possibly in the not-too-distant future.
From a policy perspective, this of course makes good sense. In a manner of speaking, all prosecutions are selective: the prosecutor makes a decision that there's been a violation of the law and initiates enforcement proceedings. Except under the most extreme circumstances, the prosecutor should be free to make decisions about enforcement of the law without being second guessed by the defendants. After all, the defendant in a discriminatory enforcement action are not arguing that they are not guilty; all they are saying is that someone else is also guilty. That is perhaps not the strongest argument for a finding of no violation.