def METHOD_NAME(self):
    # Patterns ending with a slash shouldn't match non-dirs
    res = glob.glob(self.norm('Z*Z') + os.sep)
    self.assertEqual(res, [])
    res = glob.glob(self.norm('ZZZ') + os.sep)
    self.assertEqual(res, [])
    # When there is a wildcard pattern which ends with os.sep, glob()
    # doesn't blow up.
    res = glob.glob(self.norm('aa*') + os.sep)
    self.assertEqual(len(res), 2)
    # either of these results is reasonable
    self.assertIn(set(res), [
                  {self.norm('aaa'), self.norm('aab')},
                  {self.norm('aaa') + os.sep, self.norm('aab') + os.sep},
                  ])