Re: [Tutor] urllib2 and tests

2013-05-04 Thread RJ Ewing
Thank you, I figured out what the problem was. I was passing in url into the test_file_fetch function instead of self. URL was a global. I did get the asserts mixed up. They were the opposite of what I wanted. Sorry I didn't include the whole test.py file for reference. Thanks again On Sat, May

Re: [Tutor] urllib2 and tests

2013-05-04 Thread Steven D'Aprano
On 05/05/13 13:27, RJ Ewing wrote: When I run the following test.py, I get the following error: [...] If I run the fetch_file function outside of the test, it works fine. Any ideas? The code you are actually running, and the code you say you are running below, are different. Your error messa

[Tutor] urllib2 and tests

2013-05-04 Thread RJ Ewing
When I run the following test.py, I get the following error: RROR: test_fetch_file (__main__.TestFileFetcher) -- Traceback (most recent call last): File "test_filefetcher.py", line 12, in test_fetch_file fetched_file = filef