| 1969 | self.cleanup() |
| 1970 | |
| 1971 | def testSettleCurrent(self): |
| 1972 | self.rcv.flow(10) |
| 1973 | self.pump() |
| 1974 | |
| 1975 | assert self.snd.credit == 10, self.snd.credit |
| 1976 | d = self.snd.delivery("tag") |
| 1977 | e = self.snd.delivery("tag2") |
| 1978 | assert d |
| 1979 | assert e |
| 1980 | c = self.snd.current |
| 1981 | assert c.tag == "tag", c.tag |
| 1982 | c.settle() |
| 1983 | c = self.snd.current |
| 1984 | assert c.tag == "tag2", c.tag |
| 1985 | c.settle() |
| 1986 | c = self.snd.current |
| 1987 | assert not c |
| 1988 | self.pump() |
| 1989 | |
| 1990 | c = self.rcv.current |
| 1991 | assert c |
| 1992 | assert c.tag == "tag", c.tag |
| 1993 | assert c.settled |
| 1994 | c.settle() |
| 1995 | c = self.rcv.current |
| 1996 | assert c |
| 1997 | assert c.tag == "tag2", c.tag |
| 1998 | assert c.settled |
| 1999 | c.settle() |
| 2000 | c = self.rcv.current |
| 2001 | assert not c |
| 2002 | |
| 2003 | def testUnsettled(self): |
| 2004 | self.rcv.flow(10) |