Potentially they could. It depends on the tetra species. Harlequins like warmer water, up around 80 degrees, some tetras don't like it that high. The dwarf gourami would be fine at that, and keep in mind that swordtails have been known to reach a 4inch or better body length so they need a tank larger than even 20gal in my opinion. They, like tetras are active swimmers, very active, so plenty of swimming space is essential.