예제 #1
0
        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);
        }
예제 #2
0
 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);
 }
예제 #3
0
 public static bool PipInstall(this IPythonInterpreterFactory factory, string arguments)
 {
     return(factory.PipInstallAsync(arguments).WaitAndUnwrapExceptions());
 }