<s> """<STR_LIT>""" <EOL> import os <EOL> import tempfile <EOL> from cement . utils import fs , test <EOL> class FsUtilsTestCase ( test . CementCoreTestCase ) : <EOL> def test_abspath ( self ) : <EOL> path = fs . abspath ( '<STR_LIT:.>' ) <EOL> self . ok ( path . startswith ( '<STR_LIT:/>' ) ) <EOL> def test_backup ( self ) : <EOL> _ , tmpfile = tempfile . mkstemp ( ) <EOL> bkfile = fs . backup ( tmpfile ) <EOL> self . eq ( "<STR_LIT>" % os . path . basename ( tmpfile ) , os . path . basename ( bkfile ) ) <EOL> bkfile = fs . backup ( tmpfile ) <EOL> self . eq ( "<STR_LIT>" % <EOL> os . path . basename ( tmpfile ) , os . path . basename ( bkfile ) ) <EOL> bkfile = fs . backup ( tmpfile ) <EOL> self . eq ( "<STR_LIT>" % <EOL> os . path . basename ( tmpfile ) , os . path . basename ( bkfile ) ) <EOL> tmpdir = tempfile . mkdtemp ( ) <EOL> bkdir = fs . backup ( tmpdir ) <EOL> self . eq ( "<STR_LIT>" % os . path . basename ( tmpdir ) , os . path . basename ( bkdir ) ) <EOL> res = fs . backup ( '<STR_LIT>' ) <EOL> self . eq ( res , None ) </s>
