Menu

#4 Improvement of runAll.py

closed-fixed
nobody
None
5
2009-02-15
2009-02-14
No

The mechanism for adding the Python path in tests/runAll.py does not work for me because I have a top level package called tests somewhere in my Python path. When runAll.py now tries to import tests.utils, that tests package gets imported, but it does not have utils submodule. Adding the current directory to the path afterwards does not help, because the wrong tests package is already loaded, so the utils submodule will again be searched there.

The attached patch fixes this by using the following which will always work, no matter from which dir the script was started:
sys.path.insert(0, dirname(dirname(abspath(__file__))))

The patch also improves runAll.py so that you can pass a custom pattern such as "test_frames*.py" or a single test.

Discussion

  • Christoph Zwerschke

    Another problem was that the '--clean' flag removed too many files. I have adapted the exclude list and also added an exclude list for tests which shall be (temporarily) skipped over.

     
  • Christoph Zwerschke

     
  • H. von Bargen

    H. von Bargen - 2009-02-15

    Sounds reasonable. Fixed in SVN.

     
  • H. von Bargen

    H. von Bargen - 2009-02-15
    • status: open --> closed-fixed
     

Log in to post a comment.