<s> import unittest , netCDF4 , tempfile , os <EOL> file_name = tempfile . NamedTemporaryFile ( suffix = '<STR_LIT>' , delete = False ) . name <EOL> class RefCountTestCase ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> nc = netCDF4 . Dataset ( file_name , mode = '<STR_LIT:w>' , keepweakref = True , format = '<STR_LIT>' ) <EOL> d = nc . createDimension ( '<STR_LIT>' , <NUM_LIT> ) <EOL> v = nc . createVariable ( '<STR_LIT>' , '<STR_LIT:f>' , ( '<STR_LIT>' , ) ) <EOL> self . file = file_name <EOL> self . nc = nc <EOL> def tearDown ( self ) : <EOL> os . remove ( self . file ) <EOL> def runTest ( self ) : <EOL> """<STR_LIT>""" <EOL> del self . nc <EOL> nc = netCDF4 . Dataset ( self . file , mode = '<STR_LIT:w>' , format = '<STR_LIT>' ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> unittest . main ( ) </s>
