Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(17)  |  Call(17)  |  Derive(0)  |  Import(0)

src/u/l/ulib-HEAD/test_istream.py   ulib(Download)
    def test_create_IFile(self):
        f = open("test_for_IFile")
        fw = istream.IFile(file=f)
        ch = fw.get()
        self.assertSame(ch, "d", "1st char is 'd'")
        b = fw.eof()
        self.assertFalse(b, "not at end of file")
        ch = fw.get()
        self.assertSame(ch, "a")
        self.assertSame(ch, "a")
        ch = fw.get()
        self.assertSame(ch, "t")
        ch = fw.get()
        self.assertSame(ch, "a")
        b = fw.eof()
        self.assertTrue(b, "at end of file")
        ch = fw.get()
        self.assertSame(ch, "")

src/u/l/ulib-HEAD/test_debugdec.py   ulib(Download)
    def test_1(self):
        r = fact(5)
        self.assertSame(r, 120, "fact(5) is 120")
 
 
    def test_int(self):
        r = square(4)
        self.assertSame(r, 16)
        try:
            r = square(4.3)
    def test_intfloat(self):
        r = square2(4)
        self.assertSame(r, 16)
 
        r = square2(1.5)
        self.assertSame(r, 2.25)
        print debugdec.debugging
        r = square3(4)
        self.assertSame(r, 16)
        r = square3(1.5)
        self.assertSame(r, 2.25, "doesn't check that argument is an integer")