testing c module using python with swig

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Harika
    New Member
    • Sep 2006
    • 19

    testing c module using python with swig

    hi everybody

    Iam learning python. I have to write test scripts for c files. I did using swig and python. Using python i give input to a function and gets the output and shown using python script itself. If i take comeplete module. Different files will be at different directories, in that case how can i test a module using python & swig.
    For now iam putting all the files in one directory and writing script to test the module. Let me know how can i test the module with out placing in one directory.
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    [CODE=python]import sys
    sys.append('the/absolute/path/to/test')[/CODE]Where the/absolute/path/to/test/moduletotest.py exists.

    NB: on Windows, path looks like r'c:\the\abs\pa th'

    Comment

    Working...