Ticket #6165: ticket_6165.2.diff

File ticket_6165.2.diff, 1.3 KB (added by Peter Stringfield, 9 years ago)

Fixed a dumb typo in the first patch's topfile entry.

  • new file twisted/topfiles/6165.doc

    diff --git twisted/topfiles/6165.doc twisted/topfiles/6165.doc
    new file mode 100644
    index 0000000..e96a518
    - +  
     1twisted.trial.unittest.SynchronousTestCase.mktemp now makes clear that it creates a path that is unique within the current working directory.
  • twisted/trial/_synctest.py

    diff --git twisted/trial/_synctest.py twisted/trial/_synctest.py
    index 14c4c2c..f7549ca 100644
    class SynchronousTestCase(_Assertions): 
    10211021    def mktemp(self):
    10221022        """
    1023         Returns a unique name that may be used as either a temporary directory
    1024         or filename.
    1026         @note: you must call os.mkdir on the value returned from this method if
    1027             you wish to use it as a directory!
     1023        Return a relative path that is guaranteed to be unique within the
     1024        current working directory. Create every directory between the current
     1025        working directory and the last one if necessary. Do not create the
     1026        last directory/file.
     1028        For a temporary directory call os.mkdir on the path, for a temporary
     1029        file, just create the file (e.g. by opening the path for writing and
     1030        then closing it).
     1032        Trial should delete the temporary file automatically.
    10291034        @return: C{str}
    10301035        """