public void ModuleFilenameInitInFolder() { var result = ModuleUtilities.ModuleFileName("module2"); Assert.IsNotNull(result); Assert.IsTrue(result.EndsWith("__init__.py")); }
public void ModuleFilename() { var result = ModuleUtilities.ModuleFileName("module1"); Assert.IsNotNull(result); Assert.IsTrue(result.EndsWith("module1.py")); }
public void Execute(Machine machine, BindingEnvironment environment) { Parser parser = new Parser(new StreamReader(ModuleUtilities.ModuleFileName(this.modname))); ICommand command = parser.CompileCommandList(); BindingEnvironment modenv = new BindingEnvironment(); command.Execute(machine, modenv); environment.SetValue(this.modname, modenv); }
public void UnknownModule() { Assert.IsNull(ModuleUtilities.ModuleFileName("spam")); }