def METHOD_NAME(self):
    tests = [
        {"input": "", "output": ""},
        {"input": "foo0", "output": "foo0"},
        {"input": "foo0,foo1", "output": "foo[0-1]"},
        {"input": "foo0,bar1", "output": "foo0,bar1"},
        {"input": "foo[0-10]", "output": "foo[0-10]"},
    ]
    for test in tests:
        hl = hostlist.decode(test["input"])
        expected = test["output"]
        self.assertEqual(str(hl), expected)
        self.assertEqual(repr(hl), f"Hostlist('{expected}')")