2

So I have a very simple module I import that I want to do unit testing on called Two. It has a function, red, that will just replicate the functionality of all(). The code below runs fine, but when I try debugging it, I get:

Test Name:  test_tryStuff
Test Outcome:   Failed
Result StandardError:   
Traceback (most recent call last):
  File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\visualstudio_py_testlauncher.py", line 60, in <module>
  File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\visualstudio_py_testlauncher.py", line 39, in main
  File "C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 12.0\COMMON7\IDE\EXTENSIONS\MICROSOFT\PYTHON TOOLS FOR VISUAL STUDIO\2.2\ptvsd\attach_server.py", line 151, in enable_attach
RuntimeError: IronPython must be started with -X:Tracing and -X:Frames options to support PTVS remote debugging.

Where do I enable -X:Tracing and -X:Frames? I tried putting -X:Tracing -X:Frames in interpreter arguments under Debug under project properties, same result. I've tried both IronPython and Standard Python launch mode, same result.

The code:

import Two as Two
class SomeOtherTest(unittest.TestCase):
    def test_tryStuff(self):
        self.assertEqual(Two.red([True,True,True]),True)
Carbon
  • 3,828
  • 3
  • 24
  • 51
  • Can you try this with PTVS 2.2 RC? In 2.1, interpreter arguments weren't properly propagated when running tests, but this should work now. – Pavel Minaev Jul 03 '15 at 04:33
  • Already on 2.2 - Microsoft Visual Studio Community 2013 - Python Tools for Visual Studio 2.2.30427.00 – Carbon Jul 03 '15 at 06:32
  • A slight correction: you need RC2 (and your build number is RC1). https://github.com/Microsoft/PTVS/releases/v2.2-rc2 – Pavel Minaev Jul 03 '15 at 19:00
  • Apologies. I'll give it a shot. – Carbon Jul 03 '15 at 22:27
  • Upgraded. No change. – Carbon Jul 06 '15 at 00:34
  • I stand corrected: there's a bunch of stuff that is correctly flown through to the test executor in 2.2, but interpreter arguments is not a part of it. It should be, though (and it should also be able to add these options automatically since it knows it's dealing with IronPython). Feel free to file bugs on GitHub for both issues. – Pavel Minaev Jul 06 '15 at 09:52
  • Thanks! I'll post something sometime this week. I can understand why people would miss this one, IronPython is no longer invited to the cool kids table. – Carbon Jul 06 '15 at 14:17

0 Answers0