Asymptotic expressions up to terms of order $n^{-2}$ are given for the efficiency of the Wilcoxon two-sample test relative to the standard-normal test and $t$-test for nearby alternatives. The first term is the well-known Pitman efficiency; the remaining terms are corrections for finite sample sizes. Efficiency values are given for finite sample sizes in the case of normal and rectangular distributions, and comparisons of the asymptotic with the exact efficiency values are made. In general, the Wilcoxon test is shown to be nearly as good locally for moderate sample sizes as it is known to be asymptotically. A similar analysis is performed for the single-sample sign test.