Example #1
0
 def testSetChooseFile(self):
     me = "me"
     def chooseMe(prompt):
         return me
     rinterface.set_choosefile(chooseMe)
     self.assertEqual(rinterface.get_choosefile(), chooseMe)
     res = rinterface.baseenv["file.choose"]()
     self.assertEqual(me, res[0])
     rinterface.set_choosefile(rinterface.chooseFile)
Example #2
0
    def testSetChooseFile(self):
        me = "me"

        def chooseMe(prompt):
            return me

        rinterface.set_choosefile(chooseMe)
        self.assertEqual(rinterface.get_choosefile(), chooseMe)
        res = rinterface.baseenv["file.choose"]()
        self.assertEqual(me, res[0])
        rinterface.set_choosefile(rinterface.chooseFile)