@pytest.mark.usefixtures('freezer')
def test_resource_filename():
 filename = utils.resource_filename(os.path.join('utils', 'testfile'))
 with open(filename, 'r', encoding='utf-8') as f:
  assert (f.read().splitlines()[0] == 'Hello World!')

@ pytest . mark . usefixtures ( 'freezer' ) def test_resource_filename ( ) : filename = utils . resource_filename ( os . path . join ( 'utils' , 'testfile' ) ) with open ( filename , 'r' , encoding = 'utf-8' ) as f : assert ( f . read ( ) . splitlines ( ) [ 0 ] == 'Hello World!' )
read a test file .