Testing code that does lots of things is difficult.
Debugging code that does lots of things is difficult.
The solution to both of these problems is to write code that doesn't do lots of things. Write each function so that it does one thing and only one thing. This makes them easy to test with a unit test (one doesn't need umpteen dozen unit tests).
A co-worker of mine has the phrase used he uses when judging if a given method needs to be broken up into smaller ones:
If, when describing the activity of the code to another programmer you use the word 'and', the method needs to be split into at least one more part.
You wrote:
I have a process_url() function which splits URLs into components and then assigns them to some objects via their methods.
This should be at least two methods. It is ok to wrap them in one publicly facing method, but the workings should be two different methods.