We focus on the revealed preference conditions that characterize the collection of finite data sets that are consistent with the maximization of a weakly separable utility function. From a theoretical perspective, we show that verifying these revealed preference conditions is a difficult problem, i.e. it is NP-complete. From a practical perspective, we present an integer programming approach that can verify the revealed preference conditions in a straightforward way, which is particularly attractive in view of empirical analysis. We demonstrate the versatility of this integer programming approach by showing that it also allows for testing homothetic separability and weak separability of the indirect utility function. We illustrate the practical usefulness of the approach by an empirical application to Spanish household consumption data.