xunitgen/disk_writing.py
def reserve_file(self, relative_path):
        """reserve a XML file for the slice at <relative_path>.xml

        - the relative path will be created for you
        - not writing anything to that file is an error
        """
        if os.path.isabs(relative_path):
            raise ValueError('%s must be a relative path' % relative_path)

        dest_path = os.path.join(self.root_dir, '%s.xml' % relative_path)

        if os.path.exists(dest_path):
            raise ValueError('%r must not already exist' % dest_path)

        if dest_path in self.expected_xunit_files:
            raise ValueError('%r already reserved' % dest_path)

        dest_dir = os.path.dirname(dest_path)
        if not os.path.isdir(dest_dir):
            os.makedirs(dest_dir)

        self.expected_xunit_files.append(dest_path)

        return dest_path
def reserve_file(self, relative_path):
        """reserve a XML file for the slice at <relative_path>.xml

        - the relative path will be created for you
        - not writing anything to that file is an error
        """
        if os.path.isabs(relative_path):
            raise ValueError('%s must be a relative path' % relative_path)

        dest_path = os.path.join(self.root_dir, '%s.xml' % relative_path)

        if os.path.exists(dest_path):
            raise ValueError('%r must not already exist' % dest_path)

        if dest_path in self.expected_xunit_files:
            raise ValueError('%r already reserved' % dest_path)

        dest_dir = os.path.dirname(dest_path)
        if not os.path.isdir(dest_dir):
            os.makedirs(dest_dir)

        self.expected_xunit_files.append(dest_path)

        return dest_path
def reserve_file ( self , relative_path ) : if os . path . isabs ( relative_path ) : raise ValueError ( '%s must be a relative path' % relative_path ) dest_path = os . path . join ( self . root_dir , '%s.xml' % relative_path ) if os . path . exists ( dest_path ) : raise ValueError ( '%r must not already exist' % dest_path ) if dest_path in self . expected_xunit_files : raise ValueError ( '%r already reserved' % dest_path ) dest_dir = os . path . dirname ( dest_path ) if not os . path . isdir ( dest_dir ) : os . makedirs ( dest_dir ) self . expected_xunit_files . append ( dest_path ) return dest_path
reserve a XML file for the slice at <relative_path>.xml

        - the relative path will be created for you
        - not writing anything to that file is an error
reserve a XML file for the slice at <relative_path > . xml