简体   繁体   中英

pypy interpreter does not recognize nosetests while pypy3 does

I have written a script to test my Python library over different versions of python and pypy. For pypy3,

python setup.py test

Works just fine. But on pypy, It runs 0 tests . No failure, but zero tests. Here is my script

language: python

matrix:
  include:
    - python: "pypy"
      env:
        - TEST_PY3="false"
    - python: "pypy3"
      env:
        - TEST_PY3="true"


before_install:

 - sudo apt-get update
 - sudo apt-get install build-essential

install:
  - if [[ "${TEST_PY3}" == "false" ]]; then
      pip install Cython;
      python setup.py install;
    fi

  - if [[ "${TEST_PY3}" == "true" ]]; then
      pip install Cython;
      python setup.py install;
    fi

script:
 - python setup.py test

I am using nosetests . This part of my setup.py might be helpful

test_suite         = 'nose.collector',
tests_require      = ['nose>=0.10.1']

Is there any problem of nosetests with pypy ?

Avoid python setup.py install for installation across different versions of python or pypy.

Prefer

pip install -e .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM