We consider tests of the hypothesis that two random variables \(X\) and \(Y\) have the same distribution. Standard tests of this hypothesis, like the Kolmogorov–Smirnov two-sample test and the Baumgartner–Weiss–Schindler test, assume that \(X\) and \(Y\) are independent, and we do not assume this. Instead we suppose that our sample consists of observations on pairs \({({x}_{i},{y}_{i})}_{i=1}^{n}\) , where we have random sampling (therefore independence) over \(i\) , but unrestricted dependence between \(X\) and \(Y\) . We provide a novel form of the bootstrap that provides asymptotically valid critical values for the Kolmogorov–Smirnov two-sample test and the Baumgartner–Weiss–Schindler test. We conduct some Monte Carlo simulations to assess the finite-sample properties of these tests.