def testJobReadWriteAndDelete(self):
        jobDir = os.path.join(os.getcwd(), "testJobDir")
        os.mkdir(jobDir) #If directory already exists then the test will fail
        command = "by your command"
        memory = 2^32
        cpu = 1
        tryCount = 100
        
        for i in xrange(10):
            startTime = time.time()
            for j in xrange(100):
                j = Job(command, memory, cpu, tryCount, jobDir)
                self.assertEquals(j.remainingRetryCount, tryCount)
                self.assertEquals(j.jobDir, jobDir)
                self.assertEquals(j.children, [])
                self.assertEquals(j.followOnCommands, [ (command, memory, cpu, 0)])
                self.assertEquals(j.messages, [])
                j.write()
                j = Job.read(j.getJobFileName())
                self.assertEquals(j.remainingRetryCount, tryCount)
                self.assertEquals(j.jobDir, jobDir)
                self.assertEquals(j.children, [])
                self.assertEquals(j.followOnCommands, [ (command, memory, cpu, 0)])
                self.assertEquals(j.messages, [])
                self.assertTrue(os.path.exists(j.getJobFileName()))
                j.delete()
                self.assertTrue(not os.path.exists(j.getJobFileName()))
            print "It took %f seconds to load/unload jobs" % (time.time() - startTime) #We've just used it for benchmarking, so far 
            #Would be good to extend this trivial test
            
        system("rm -rf %s" % jobDir)
dataset/ETHPy150Open benedictpaten/jobTree/test/jobTest.py/TestCase.testJobReadWriteAndDelete/original