示例#1
0
 def test_when_get_file_then_returns_file(self):
     program = Program()
     program.set_name('binfile')
     self.fs.put_file('/binfile', program)
     file = self.fs.get_file('/binfile')
     self.assertEqual(program,file)
示例#2
0
instruction11 = Instruction("hello, i am the instruction number eleven.", "CPU")
instruction12 = Instruction("hello, i am the instruction number twelve.", "CPU")
instruction13 = Instruction("hello, i am the instruction number thirteen.", "CPU")
instruction14 = Instruction("hello, i am the instruction number fourteen.", "CPU")
instruction15 = Instruction("hello, i am the instruction number fifteen.", "CPU")
instruction16 = Instruction("hello, i am the instruction number sixteen.", "CPU")
instruction17 = Instruction("hello, i am the instruction number seventeen.", "CPU")
instruction18 = Instruction("hello, i am the instruction number eighteen.", "CPU")
instruction19 = Instruction("hello, i am the instruction number nineteen.", "CPU")
instruction20 = Instruction("hello, i am the instruction number twenty.", "CPU")
io_instruction = Instruction("hello, i am IO instruction of the program Tomboy.", "IO", IO_Keyboard, "INPUT")
io_instruction_output = Instruction("hello, i am IO instruction, i am show you a input.", "IO", IO_Keyboard, "OUTPUT")


fifa = Program()
fifa.set_name("fifa")
fifa.append_instruction(instruction1)
fifa.append_instruction(instruction2)
fifa.append_instruction(instruction3)
fifa.append_instruction(instruction4)
fifa.append_instruction(instruction5)
fifa.append_instruction(instruction6)
fifa.append_instruction(instruction7)
fifa.append_instruction(instruction8)
fifa.append_instruction(instruction9)
fifa.append_instruction(instruction10)


office = Program()
office.set_name("office")
office.append_instruction(instruction11)
示例#3
0
 def test_when_put_file_binfile_then_binfile_exists(self):
     program = Program()
     program.set_name('binfile')
     self.fs.put_file('/binfile', program)
     self.assertTrue(self.fs.file_exists('/binfile'))