CxxTestgen.py throws a syntax error

I am following the cxxtest Visual Studio Integration tutorial and I looked through google but found nothing.

When I try to dine on a basic test with cxxtest and visual studio, I get this error:

1>Generating main code for test suite
1>  File "C:/cxxtest/cxxtestgen.py", line 60
1>    print usageString()
1>                    ^
1>SyntaxError: invalid syntax

      

I am at step 7 of the tutorial and all my settings are set exactly the same as in the tutorial.

this is a basic test script:

#include <cxxtest/TestSuite.h>
 class MyTestSuite : public CxxTest::TestSuite 
  {
  public:
      void testAddition( void )
      {
          TS_ASSERT( 1 + 1 > 1 );
          TS_ASSERT_EQUALS( 1 + 1, 2 );
      }
  };

      

Edit: I am using Python 3.0, could this be the problem?

0


a source to share


3 answers


You seem to be using Python 3.0 on a piece of code that is not ready for python 3.0 - your best bet is to upgrade to python 2.6 until cxxtestgen.py works with python 3.0.



See http://docs.python.org/3.0/whatsnew/3.0.html#print-is-a-function for details

+3


a source


It is correct in the previous comments to note that CxxTest 3.x does not support Python 3.x. However, CxxTest 4.0 was recently released and supports Python 3.1 and 3.2.



See CxxTest homepage: cxxtest website

+1


a source


Try running command line cxxtestgen.py

. Does it print a usage page?

0


a source







All Articles