Exemple #1
0
 def do_i_shelve(self, line):
     if self.write_folder is None:
         print(
             "Please enter the directory to write files to : write_folder xxxx"
         )
     elif self.source_file is None:
         print("Please enter the source file : source xxxx")
     else:
         uml_shelf = Interpreter()
         uml_shelf.add_file(self.source_file, self.write_folder)
         if self.root_directory:
             uml_shelf.shelve_modules(self.root_directory + "/" + line)
         else:
             uml_shelf.shelve_modules(line)
         print(f"modules shelved to {line}")
Exemple #2
0
 def test_11(self):
     x = Interpreter()
     x.add_file(self.file, "new_module")
     x.shelve_modules('test_shelf')
     assert len(x.my_shelf) > 0