pombreda / ctypesgen

Automatically exported from code.google.com/p/ctypesgen
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Tests failing to find correct printer (SVN r141) #38

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  svn checkout http://ctypesgen.googlecode.com/svn/trunk/ ctypesgen-read-only
2.  cd ctypesgen-read-only/test
3.  python testsuite.py

What is the expected output? What do you see instead?

Expect all tests to pass, instead see this error:

======================================================================
ERROR: Tests from structures.py
----------------------------------------------------------------------
Traceback (most recent call last):
  File "testsuite.py", line 219, in setUp
    self.module, output = ctypesgentest.test(header_str)
  File "/home/jlisee/projects/ctypesgen-read-only/test/ctypesgentest.py", line 40, in test
    ctypesgencore.printer.WrapperPrinter("temp.py",options,descriptions)
AttributeError: 'module' object has no attribute 'printer'

What version of the product are you using? On what operating system?

Ubuntu 10.04 32bit
Python 2.6.5
SVN r141

Please provide any additional information below.

I have attached a patch which fixes the error by using the python_printer 
instead of printer but I am unsure if this is the correct thing to do (Also 
this issue was introduced in r128).

Original issue reported on code.google.com by jli...@gmail.com on 2 Feb 2013 at 3:11

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you for taking the time to log an issue and to dig deeper into a fix!

I just published submitted Revision: r142 which takes a slightly different 
approach.

Test results.

Before:

    Ran 17 tests in 4.067s

    FAILED (errors=17)

After:

    Ran 17 tests in 5.018s

    FAILED (errors=3)

Original comment by clac...@gmail.com on 2 Feb 2013 at 11:48