def test_rwxShorthand(self):
        """
        L{RWX}'s shorthand string should be 'rwx' if read, write, and execute
        permission bits are true.  If any of those permissions bits are false,
        the character is replaced by a '-'.
        """

        def getChar(val, letter):
            if val:
                return letter
            return '-'

        for r in (True, False):
            for w in (True, False):
                for x in (True, False):
                    rwx = filepath.RWX(r, w, x)
                    self.assertEqual(rwx.shorthand(),
                                      getChar(r, 'r') +
                                      getChar(w, 'w') +
                                      getChar(x, 'x'))
        self.assertEqual(filepath.RWX(True, False, True).shorthand(), "r-x")

        L{RWX}'s shorthand string should be 'rwx' if read, write, and execute
        permission bits are true.  If any of those permissions bits are false,
        the character is replaced by a '-'.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_paths.py