The government-besieged Teamsters union is celebrating an end to its 32-year marriage of convenience with Republican presidential candidates and has chosen to dance with a new partner at the Democratic National Convention.

Even though the union's new president is an Irish Catholic Bostonian who supported Michael Dukakis' opponents in previous elections, the Teamsters hosted a party here Sunday night symbolizing a return to the labor movement's half-century courtship with Democrats.William J. McCarthy's upset election last week to succeed the late Jackie Presser as the Teamsters' president had cast doubts among some union leaders that organized labor could unite behind the Democratic presidential nominee for the first time since 1956.

McCarthy, 69, had supported Edward King in his 1978 upset of the incumbent Dukakis for the Democratic gubernatorial nomination in Massachusetts and had opposed Dukakis' successful challenge of King four years later.

"That sort of personalizes it," one official of another union said.

McCarthy is known among other labor leaders to have opposed the Teamsters' reaffiliation with the AFL-CIO last October. Implicit in the reunion was an understanding that the Teamsters would go along with the labor federation's Democratic presidential endorsement.

Commanding a fourth of the delegates at this week's convention, labor leaders have openly wondered whether the new Teamsters chief would abide by Presser's promise to work with the rest of labor.

With the largest political campaign chest of any group in the country, the question is not academic.

At the end of March, the Teamsters' DRIVE (Democratic, Republican, Independent Voter Education) political action committee had $5.5 million - $1.5 million more than the American Medical Association and $1.8 million more than the National Association of Realtors.

Teamster political operatives sought to assure more than a dozen presidents of other unions here Sunday that McCarthy's election will not return the union to the GOP camp.

"There's about as much chance of us endorsing George Bush as there is it snowing in Atlanta tomorrow," said one senior Teamster official.