internal static void InstallWebFramework(VisualStudioApp app, string moduleName, string packageName, IPythonInterpreterFactory factory) { var task = app.ServiceProvider.GetUIThread().InvokeTask(() => factory.PipInstallAsync(packageName)); try { Assert.IsTrue(task.Wait(TimeSpan.FromMinutes(3.0)), "Timed out waiting for install " + packageName); } catch (AggregateException ex) { ExceptionDispatchInfo.Capture(ex.InnerException).Throw(); } Assert.AreEqual(1, factory.FindModules(moduleName).Count); }
internal static void InstallWebFramework(VisualStudioApp app, string moduleName, string packageName, IPythonInterpreterFactory factory) { var task = app.ServiceProvider.GetUIThread().InvokeTask(() => factory.PipInstallAsync(packageName)); try { Assert.IsTrue(task.Wait(TimeSpan.FromMinutes(3.0)), "Timed out waiting for install " + packageName); } catch (AggregateException ex) { throw ex.InnerException; } Assert.AreEqual(1, factory.FindModules(moduleName).Count); }
public static bool PipInstall(this IPythonInterpreterFactory factory, string arguments) { return(factory.PipInstallAsync(arguments).WaitAndUnwrapExceptions()); }