Wall-bounded turbulence in pressure gradients is studied using direct numerical simulation (DNS) of a Couette–Poiseuille flow. The motivation is to include adverse pressure gradients, to complement the favourable ones present in the well-studied Poiseuille flow, and the central question is how the scaling laws react to a gradient in the total shear stress or equivalently to a pressure gradient. In the case considered here, the ratio of local stress to wall stress, namely τ+, ranges from roughly 2/3 to 3/2 in the ‘wall region’. By this we mean the layer believed not to be influenced by the opposite wall and therefore open to simple, universal behaviour. The normalized pressure gradients p+ ≡ dτ+/dy+ at the two walls are −0.00057 and +0.0037. The outcome is in broad agreement with the findings of Galbraith, Sjolander & Head (Aeronaut. Quart. vol. 27, 1977, pp. 229–242) relating to boundary layers (based on measured profiles): the logarithmic velocity profile is much more resilient than two other, equally plausible assumptions, namely universality of the mixing length ℓ = κy and that of the eddy viscosity νt = uτκy. In pressure gradients, with τ+ ≠ 1, these three come into conflict, and our primary purpose is to compare them. We consider that the Kármán constant κ is unique but allow a range from 0.38 to 0.41, consistent with the current debates. It makes a minor difference in the interpretation. This finding of resilience appears new as a DNS result and is free of the experimental uncertainty over skin friction. It is not as distinct in the (rather strong) adverse gradient as it is in the favourable one; for instance the velocity U+ at y+ = 50 is lower by 3% on the adverse gradient side. A plausible cause is that the wall shear stress is small and somewhat overwhelmed by the stress and kinetic energy in the bulk of the flow. The potential of a correction to the ‘law of the wall’ based purely on p+ is examined, with mixed results. We view the preference for the log law as somewhat counter-intuitive in that the scaling law is non-local but also as becoming established and as highly relevant to turbulence modelling.