def test_safe_stat_on_non_existent_file_should_not_raise_os_error(self): tmp_foo = os.path.join(self.temp_dir, 'foodoesnotexist') ok_(safe_stat(tmp_foo) is None)
def test_safe_stat(self): tmp_foo = os.path.join(self.temp_dir, 'fooness') write_file_contents(tmp_foo, 'blah') ok_(safe_stat(tmp_foo).st_size > 0)