Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IronPython for unit testing with IronPython Studios

Im looking to play with IronPython and figured that writing unit tests is a simple enough way to get started. This would essentially mean that my core applications code will still be written in C# with just my tests been python.

With this in mind my ideal situation was to develop both the C# and IronPython code from within the same solution in Visual studios. Looking around I see that there is a visual studios editor "IronPythonStudios" that should be right for me, though so far I have hit a few issues:

  1. Importing core python libaries such as "Import os" fail. I believe this is because the path to these common libaries is not set within the IDE and I have no idea how to set it.
  2. I am unable to recognize .pyproj files from visual studios, I believe that my version of IronPythonStudios is running in Isolated mode and not integrated. Any idea how I change this?
  3. It appears that IronPythonStudos is compiling the .py files instead of just interpreting them. This essentailly means that unit testing is as slow as with C#/Vb.net as the test, build then exectue cycle still exists. Any idea how I stop VS/IPS from compiling the files and just get it to just dynamically compile the scripts?

Cheers, Chris.

like image 550
Owen Avatar asked Jul 31 '26 01:07

Owen


1 Answers

I also have been trying to get IronPython and Visual Studio integrated. You can do it by downloading the Visual Studio SDK and following the steps listed here. The only issue with it is that the integration is built against IPy v 1.x and not 2.*. Don't know how much of help this is to you.

like image 66
Rohit Avatar answered Aug 01 '26 20:08

Rohit



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!