When is tension constant in a rope?
In a massless rope, tension is constant unless a force is applied somewhere along the rope. Why? Because any differential tension would travel at infinite velocity (since speed of wave scales inversely with square root of mass per unit length, and the rope is massless).
The only way to preserve a difference is therefore
- applying a force along the rope (for example, running the rope over a pulley with friction)
- putting some mass at a point along the rope, and accelerating that mass (because a net force is needed to accelerate the mass).
When there is a knot in the rope, there will be friction between parts of the rope and that allows there to be different tension in different parts of the rope; but running the rope over a pulley does not imply that there is differential tension, unless the pulley is massive and accelerating, or unless there is friction.
If you accept that the rope has finite diameter, then bending it in a curve may result in differential stresses along the diameter of the rope (the outside, being stretched more, would be under greater tension) but that depends on an assumption that the rope is solid and of finite size; when ropes are made out of twisted (or woven) filaments, these filaments can slide so as to maintain equal tension is all of them when the rope is bent. This is in fact a key reason for this construction (the other is that this ensures much greater flexibility - the two things go hand in hand).
If the mass of the rope is extremely small, the slightest difference in the pulling force applied to one end compared to the pulling force applied to the other would result in an enormous acceleration. The rope rapidly shifts to equalize the pull on either side.
Even if the rope has appreciable elasticity, if its make is negligible, the tension through out is always constant. A distortion at one end would propagate at an infinite speed down the rope. The speed of a wave on a string is inversely proportional to the square root of the rope's mass per unit length.
If a taut rope is accelerating forward and you clamp a hand down on it so the hand accelerates forward too, the forward pull by the rope on your hand must be greater than the backward pull by the rope on your hand. The force difference is what causes the hand to accelerate. It's the same idea when a rope passes over a pulley. There needs to be a net torque on the pulley for it to spin at an accelerating rate, so the pull forward by the rope on the pulley must be greater than the pull back. There is a difference in tension.
I don't think the idea that a knot would make the tension not constant throughout a rope is correct (if the rope is 'massless').