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

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

src/h/e/hellanzb-HEAD/Hellanzb/test/DupeNameTestCase.py   hellanzb(Download)
    def testCleanDupeName(self):
        """ Test the cleanDupeName functionality. """ + cleanDupeName.__doc__
        testFile = os.path.join(self.tempDir, 'file')
        testFile0 = os.path.join(self.tempDir, 'file_hellanzb_dupe0')
        self.assertEqual(cleanDupeName(testFile), (testFile, -1))
        self.assertEqual(cleanDupeName(testFile0), (testFile, 0))
        testFile2 = os.path.join(self.tempDir, 'file_hellanzb_dupe2')
 
        self.assertEqual(dupeName(testFile), testFile)
        self.assertEqual(dupeName(testFile, eschewNames = (testFile)), testFile0)
 
        touch(testFile)
        touch(testFile0)
 
        self.assertEqual(dupeName(testFile), testFile1)

src/h/e/hellanzb-HEAD/Hellanzb/test/UnPrettyBytesTestCase.py   hellanzb(Download)
    def testUnPrettyBytes(self):
        self.assertEqual(-1, unPrettyBytes(-1))
        self.assertEqual(102034934, unPrettyBytes(102034934))
        self.assertEqual(1024, unPrettyBytes('1KB'))
        self.assertEqual(1024, unPrettyBytes('1K'))
        self.assertEqual(104857600, unPrettyBytes('100MB'))