
Do you train Kung Fu?
Or know someone who does?
Then check out KungFuPeople.com
Mobile version of this page|
You searched for keyword:mock |
found 0 photos and 1 blogs in and 0 blog comments in 0.00 seconds |
Blogs |
|
|
|
Mocking os.stat in Python - 8th of November 2009 I have some code that checks that a file is treated differently if some time has passed. In other words, it reacts if the modification time is more than it was before. The code uses def test_file_changed(self):
filename = 'foo.txt' expect_timestamp = int(time.time()) ...run the unit test with 'expect_timestamp'... time.sleep(1) expect_timestamp += 1 ...run the unit test with 'expect_timestamp'... |

