def testFile(self): entry = jobs_pb2.StatEntry() entry.st_mode = 33188 self.assertEqual(stat.icon(entry), '📄')
def testSymlinkPath(self): entry = jobs_pb2.StatEntry() entry.st_mode = 33188 entry.symlink = 'foobar' self.assertEqual(stat.icon(entry), '🔗')
def testDirectory(self): entry = jobs_pb2.StatEntry() entry.st_mode = 16877 self.assertEqual(stat.icon(entry), '📂')
def testSymlinkMode(self): entry = jobs_pb2.StatEntry() entry.st_mode = 41471 self.assertEqual(stat.icon(entry), '🔗')
def __init__(self, stat_entry): self.size = stat.size(stat_entry) self.abs_path = os.path.normpath(stat_entry.pathspec.path) self.name = stat.name(stat_entry) self.icon = stat.icon(stat_entry) self.mode = stat.mode(stat_entry)