I've set up a travis-ci.org job to run my test suite (using pytest) 
whenever I push my app to its github repository. I'm running into the basic 
problem that pytest can't find the gluon libraries, since there's nothing 
in my repo "above" the level of my app directory. Does anyone know of a 
simple way to import or install the web2py code (gluon plus contrib 
libraries) from the travis-ci process? Or am I trying to do the impossible?

Here's my .travis.yml file:

    language: python
    python:
      - "2.7"
    # Handle git submodules yourself
    git:
        submodules: false
    # Use sed to replace the SSH URL with the public URL, then initialize 
submodules
    before_install:
        - sed -i 's/g...@github.com:/https:\/\/github.com\//' .gitmodules
        - git submodule update --init --recursive
    # command to install dependencies, e.g. pip install -r requirements.txt 
--use-mirrors
    install: "pip install pytest"
    # command to run tests, e.g. python setup.py test
    script: py.test applications/paideia/tests/modules/test_paideia.py 

And here's the error traceback from the travis-ci job:

Traceback (most recent call last):

  File 
"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/_pytest/config.py",
 line 543, in importconftest

    mod = conftestpath.pyimport()

  File 
"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/py/_path/local.py",
 line 641, in pyimport

    __import__(modname)

  File "/home/travis/build/monotasker/paideia/tests/conftest.py", line 87, in 
<module>

    from gluon.shell import env

ImportError: No module named gluon.shell

ERROR: could not load /home/travis/build/monotasker/paideia/tests/conftest.py




Thanks,

Ian

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to