示例#1
0
 public void Init()
 {
     mockCompiler         = new MockPythonCompiler();
     compilerTask         = new PythonCompilerTask(mockCompiler);
     sourceTaskItem       = new TaskItem("test.py");
     compilerTask.Sources = new ITaskItem[] { sourceTaskItem };
 }
 void CreatePythonCompilerTask()
 {
     mockCompiler                = new MockPythonCompiler();
     compilerTask                = new PythonCompilerTask(mockCompiler);
     compilerTask.TargetType     = "Exe";
     compilerTask.OutputAssembly = "test.exe";
 }
		public void Init()
		{
			mockCompiler = new MockPythonCompiler();
			compilerTask = new PythonCompilerTask(mockCompiler);
			sourceTaskItem = new TaskItem("test.py");
			compilerTask.Sources = new ITaskItem[] {sourceTaskItem};
		}
		void CreatePythonCompilerTask()
		{
			mockCompiler = new MockPythonCompiler();
			compilerTask = new PythonCompilerTask(mockCompiler);
			compilerTask.TargetType = "Exe";
			compilerTask.OutputAssembly = "test.exe";
		}
 public void Init()
 {
     mockCompiler          = new MockPythonCompiler();
     compilerTask          = new PythonCompilerTask(mockCompiler);
     mainTaskItem          = new TaskItem("main.py");
     classTaskItem         = new TaskItem("class1.py");
     compilerTask.Sources  = new ITaskItem[] { mainTaskItem, classTaskItem };
     compilerTask.MainFile = "main.py";
     compilerTask.Execute();
 }
		public void Init()
		{
			mockCompiler = new MockPythonCompiler();
			compilerTask = new PythonCompilerTask(mockCompiler);
			mainTaskItem = new TaskItem("main.py");
			classTaskItem = new TaskItem("class1.py");
			compilerTask.Sources = new ITaskItem[] {mainTaskItem, classTaskItem};
			compilerTask.MainFile = "main.py";
			compilerTask.Execute();
		}
		public void Init()
		{
			mockCompiler = new MockPythonCompiler();
			compiler = new PythonCompilerTask(mockCompiler);
			sourceTaskItem = new TaskItem("test.py");
			compiler.Sources = new ITaskItem[] {sourceTaskItem};
			compiler.TargetType = "Exe";
			compiler.OutputAssembly = "test.exe";
			compiler.EmitDebugInformation = true;
			
			compiler.Execute();
		}
示例#8
0
        public void Init()
        {
            mockCompiler                  = new MockPythonCompiler();
            compiler                      = new PythonCompilerTask(mockCompiler);
            sourceTaskItem                = new TaskItem("test.py");
            compiler.Sources              = new ITaskItem[] { sourceTaskItem };
            compiler.TargetType           = "Exe";
            compiler.OutputAssembly       = "test.exe";
            compiler.EmitDebugInformation = true;

            compiler.Execute();
        }
		public void Init()
		{
			mockCompiler = new MockPythonCompiler();
			compiler = new DummyPythonCompilerTask(mockCompiler, @"C:\Projects\MyProject");
			compiler.TargetType = "Exe";
			compiler.OutputAssembly = "test.exe";
			
			resourceTaskItem = new TaskItem(@"..\RequiredLibraries\MyResource.resx");
			fullPathResourceTaskItem = new TaskItem(@"C:\Projects\Test\MyTest.resx");
			compiler.Resources = new ITaskItem[] {resourceTaskItem, fullPathResourceTaskItem};
			
			compiler.Execute();
		}
示例#10
0
        public void Init()
        {
            mockCompiler            = new MockPythonCompiler();
            compiler                = new DummyPythonCompilerTask(mockCompiler, @"C:\Projects\MyProject");
            compiler.TargetType     = "Exe";
            compiler.OutputAssembly = "test.exe";

            resourceTaskItem         = new TaskItem(@"..\RequiredLibraries\MyResource.resx");
            fullPathResourceTaskItem = new TaskItem(@"C:\Projects\Test\MyTest.resx");
            compiler.Resources       = new ITaskItem[] { resourceTaskItem, fullPathResourceTaskItem };

            compiler.Execute();
        }
		public void Init()
		{
			mockCompiler = new MockPythonCompiler();
			compiler = new DummyPythonCompilerTask(mockCompiler, @"C:\Projects\MyProject");
			compiler.TargetType = "Exe";
			compiler.OutputAssembly = "test.exe";
			
			TaskItem sourceFile = new TaskItem(@"D:\Projects\MyProject\test.py");
			compiler.Sources = new ITaskItem[] {sourceFile};
			
			mockCompiler.ThrowExceptionAtCompile = new PythonCompilerException("Missing main file.");
			
			success = compiler.Execute();
		}
示例#12
0
        public void Init()
        {
            mockCompiler            = new MockPythonCompiler();
            compiler                = new PythonCompilerTask(mockCompiler);
            sourceTaskItem          = new TaskItem("test.py");
            compiler.Sources        = new ITaskItem[] { sourceTaskItem };
            compiler.TargetType     = "Exe";
            compiler.OutputAssembly = "test.exe";

            systemDataReferenceTaskItem = new TaskItem(@"C:\Windows\Microsoft.NET\Framework\2.0\System.Data.dll");
            systemXmlReferenceTaskItem  = new TaskItem(@"C:\Windows\Microsoft.NET\Framework\2.0\System.Xml.dll");
            compiler.References         = new ITaskItem[] { systemDataReferenceTaskItem, systemXmlReferenceTaskItem };

            success = compiler.Execute();
        }
示例#13
0
        public void Init()
        {
            mockCompiler            = new MockPythonCompiler();
            compiler                = new DummyPythonCompilerTask(mockCompiler, @"C:\Projects\MyProject");
            compiler.TargetType     = "Exe";
            compiler.OutputAssembly = "test.exe";

            TaskItem sourceFile = new TaskItem(@"D:\Projects\MyProject\test.py");

            compiler.Sources = new ITaskItem[] { sourceFile };

            mockCompiler.ThrowExceptionAtCompile = new PythonCompilerException("Missing main file.");

            success = compiler.Execute();
        }
		public void Init()
		{
			mockCompiler = new MockPythonCompiler();
			compiler = new PythonCompilerTask(mockCompiler);
			sourceTaskItem = new TaskItem("test.py");
			compiler.Sources = new ITaskItem[] {sourceTaskItem};
			compiler.TargetType = "Exe";
			compiler.OutputAssembly = "test.exe";
						
			systemDataReferenceTaskItem = new TaskItem(@"C:\Windows\Microsoft.NET\Framework\2.0\System.Data.dll");
			systemXmlReferenceTaskItem = new TaskItem(@"C:\Windows\Microsoft.NET\Framework\2.0\System.Xml.dll");
			compiler.References = new ITaskItem[] {systemDataReferenceTaskItem, systemXmlReferenceTaskItem};
			
			success = compiler.Execute();
		}
		public void Init()
		{
			mockCompiler = new MockPythonCompiler();
			compiler = new DummyPythonCompilerTask(mockCompiler, @"C:\Projects\MyProject");
			compiler.TargetType = "Exe";
			compiler.OutputAssembly = "test.exe";
			
			TaskItem sourceFile = new TaskItem(@"D:\Projects\MyProject\test.py");
			compiler.Sources = new ITaskItem[] {sourceFile};
			
			SourceUnit source = DefaultContext.DefaultPythonContext.CreateSourceUnit(NullTextContentProvider.Null, @"test", SourceCodeKind.InteractiveCode);
			
			SyntaxErrorException ex = new SyntaxErrorException("Error", null, SourceSpan.None, 1000, Severity.FatalError);
			mockCompiler.ThrowExceptionAtCompile = ex;
			
			success = compiler.Execute();
		}
        public void Init()
        {
            mockCompiler            = new MockPythonCompiler();
            compiler                = new DummyPythonCompilerTask(mockCompiler, @"C:\Projects\MyProject");
            compiler.TargetType     = "Exe";
            compiler.OutputAssembly = "test.exe";

            TaskItem sourceFile = new TaskItem(@"D:\Projects\MyProject\test.py");

            compiler.Sources = new ITaskItem[] { sourceFile };

            SourceUnit source = DefaultContext.DefaultPythonContext.CreateSourceUnit(NullTextContentProvider.Null, @"test", SourceCodeKind.InteractiveCode);

            SyntaxErrorException ex = new SyntaxErrorException("Error", null, SourceSpan.None, 1000, Severity.FatalError);

            mockCompiler.ThrowExceptionAtCompile = ex;

            success = compiler.Execute();
        }
		public void Init()
		{
			mockCompiler = new MockPythonCompiler();
			compiler = new PythonCompilerTask(mockCompiler);
			TaskItem sourceTaskItem = new TaskItem("test.py");
			
			compiler.Sources = new ITaskItem[] {sourceTaskItem};
			compiler.TargetType = "Exe";
			compiler.OutputAssembly = "test.exe";
			
			resourceTaskItem = new TaskItem(@"C:\Projects\Test\Test.resources");
			compiler.Resources = new ITaskItem[] {resourceTaskItem};
			
			compiler.Execute();
			
			if (mockCompiler.ResourceFiles != null && mockCompiler.ResourceFiles.Count > 0) {
				resourceFile = mockCompiler.ResourceFiles[0];
			}
		}
示例#18
0
        public void Init()
        {
            mockCompiler = new MockPythonCompiler();
            compiler     = new PythonCompilerTask(mockCompiler);
            TaskItem sourceTaskItem = new TaskItem("test.py");

            compiler.Sources        = new ITaskItem[] { sourceTaskItem };
            compiler.TargetType     = "Exe";
            compiler.OutputAssembly = "test.exe";

            resourceTaskItem   = new TaskItem(@"C:\Projects\Test\Test.resources");
            compiler.Resources = new ITaskItem[] { resourceTaskItem };

            compiler.Execute();

            if (mockCompiler.ResourceFiles != null && mockCompiler.ResourceFiles.Count > 0)
            {
                resourceFile = mockCompiler.ResourceFiles[0];
            }
        }