public void AnalyzeBadEgg() { var factories = new[] { InterpreterFactoryCreator.CreateAnalysisInterpreterFactory(new Version(3, 4)) }; using (var analyzer = new VsProjectAnalyzer(PythonToolsTestUtilities.CreateMockServiceProvider(), factories[0])) { analyzer.SetSearchPathsAsync(new[] { TestData.GetPath(@"TestData\BadEgg.egg") }).Wait(); analyzer.WaitForCompleteAnalysis(_ => true); // Analysis result must contain the module for the filename inside the egg that is a valid identifier, // and no entries for the other filename which is not. var moduleNames = analyzer.GetModulesResult(true).Result.Select(x => x.Name); AssertUtil.Contains(moduleNames, "module"); AssertUtil.DoesntContain(moduleNames, "42"); } }