def test_set_spe(self): for spid in GOOD: pid = Pid(spid) t, p, e = 1, 'foo', 'bar' pid.target = t pid.product = p pid.extension = e expected = '%s_%05d_%s.%s' % (spid, t, p, e) assert pid.pid == expected
def test_set_extension(self): for spid in GOOD: pid, extension = Pid(spid), 'foo' pid.extension = extension assert pid.pid == '%s.%s' % (spid, extension)