<s> import errno <EOL> import hashlib <EOL> import mock <EOL> import os <EOL> import unittest <EOL> from codalab . common import PreconditionViolation <EOL> from codalab . lib import worksheet_util <EOL> class WorksheetUtilTest ( unittest . TestCase ) : <EOL> def test_apply_func ( self ) : <EOL> '''<STR_LIT>''' <EOL> self . assertEqual ( worksheet_util . apply_func ( None , '<STR_LIT:hello>' ) , '<STR_LIT:hello>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( '<STR_LIT>' , '<STR_LIT:hello>' ) , '<STR_LIT:e>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( '<STR_LIT>' , '<STR_LIT:hello>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( '<STR_LIT>' , '<STR_LIT:hello>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( '<STR_LIT:date>' , '<STR_LIT>' ) [ : <NUM_LIT:10> ] , '<STR_LIT>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( '<STR_LIT>' , '<STR_LIT>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( '<STR_LIT:size>' , '<STR_LIT>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( '<STR_LIT>' , '<STR_LIT>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( r'<STR_LIT>' , '<STR_LIT>' ) , '<STR_LIT>' ) <EOL> self . assertEqual ( worksheet_util . apply_func ( '<STR_LIT>' , '<STR_LIT>' ) , '<STR_LIT>' ) </s>
