tests/_importer_params.py
def file(self, test_dir):
        """Returns a filename for the test file to be loaded by this importer."""
        if self.content is None:
            # FileName
            if self.full_path:
                fn = self.filename
            else:
                here = path.abspath(path.dirname(__file__))
                data_dir = path.join(here, 'unittest_data/', self.importer_name)
                fn = path.join(data_dir, self.filename)
            return fn
        else:
            # Buffer
            if self.filename is None:
                self.filename = self.importer_name
            f = open(str(test_dir.join(self.filename + '.csv')), 'w')
            f.write(self.content)
            f.seek(0)
            return f.name
Returns a filename for the test file to be loaded by this importer.
Returns a filename for the test file to be loaded by this importer.
Returns a filename for the test file to be loaded by this importer .
def file(self, test_dir):
        if self.content is None:
            if self.full_path:
                fn = self.filename
            else:
                here = path.abspath(path.dirname(__file__))
                data_dir = path.join(here, 'unittest_data/', self.importer_name)
                fn = path.join(data_dir, self.filename)
            return fn
        else:
            if self.filename is None:
                self.filename = self.importer_name
            f = open(str(test_dir.join(self.filename + '.csv')), 'w')
            f.write(self.content)
            f.seek(0)
            return f.name
def file ( self , test_dir ) : if self . content is None : if self . full_path : fn = self . filename else : here = path . abspath ( path . dirname ( __file__ ) ) data_dir = path . join ( here , 'unittest_data/' , self . importer_name ) fn = path . join ( data_dir , self . filename ) return fn else : if self . filename is None : self . filename = self . importer_name f = open ( str ( test_dir . join ( self . filename + '.csv' ) ) , 'w' ) f . write ( self . content ) f . seek ( 0 ) return f . name
Returns a filename for the test file to be loaded by this importer.
Returns a filename for the test file to be loaded by this importer .
"""Returns a filename for the test file to be loaded by this importer.""" # FileName # Buffer
self
test_dir