The Supreme Court yesterday entered a politically sensitive Voting Rights Act case, agreeing to review a ruling that benefited Mexican American voters in a small Texas town.

The case was made even more controversial by a switch in signals by the government, which had at first sided with the Mexican Americans but then changed its mind and urged the justices to wipe out a lower court ruling in their favor.

The issue in the case accepted for review yesterday is "preclearance" of election law changes: what kind of changes must be reviewed for nondiscrimination and by what standard they must be reviewed.

The town is Lockhart, Tex., about 30 miles south of Austin. Although the city of 7,000 is 41 percent Mexican American, none had been elected to public office in 1973 when the case began. Lockhart made a change in its system of government in that year, switching from a mayor-commissioner form to a mayor-council home rule government with six elected at-large council members.

Under the Voting Rights Act, covered jurisdictions must seek "preclearance" by the attorney general of changes in voting systems. Approval is dependent on a showing that the changes are nondiscriminatory.

Lockhart failed to seek preclearance of the 1973 change, arguing that its actions had not affected the voting rights of Mexican Americans in the town. It buttressed its argument by noting that a Mexican American was elected to a council position in 1978.

The Justice Department and four Mexican American voters successfully challenged the town before a three-judge panel in the District of Columbia.

When Lockhart appealed to the Supreme Court, however, the government asked that that decision be wiped out and that the three-judge panel reexamine its ruling, which the government said applied the wrong standard in determining that the change had hurt minority voters.

The government's request, which had been joined by lawyers for Lockhart, was rejected by the justices yesterday when they agreed to review the case.

In other action yesterday:

* The court said it would consider the circumstances under which the Food and Drug Administration must approve the marketing of generic drugs. The case, U.S. vs. Generix Drug Corp., arose when the corporation marketed unapproved drugs, contending that the drug's active ingredients had already been approved under brand names by the FDA.

The government charged that the inactive ingredients added by the company--such as the binder and the coating--require an independent approval before marketing because they can make an otherwise safe drug unsafe.

A U.S. Court of Appeals sided with the drug company, however, and yesterday the court agreed to hear the government's appeal.

* The court agreed to review a controversy over the authority of the federal government to take millions of acres of land in the states for migratory waterfowl preservation.

The Department of Interior, acting under statutory authority, has already acquired interest in 5.3 million acres in North Dakota for the benefit of migratory waterfowl. The state, fed up with the terms of the federal acquisitions and concerned about its lost tax base, enacted laws in 1977 placing new conditions on the department.

The government said the conditions unconstitutionally interfered with federal laws and successfully challenged North Dakota. The justices agreed to review an 8th U.S. Circuit Court of Appeals decision siding with the Interior Department.

* The justices agreed to consider the method for awarding attorneys' fees in civil rights cases. Winning parties in suits brought under those laws generally are entitled to full payment of their legal fees by the losing party.

The question in yesterday's case is the entitlement when a suing party loses part of a case and wins part.

The case stems from a challenge to allegedly unconstitutional conditions at the Fulton State Hospital in Missouri.