Giter VIP home page Giter VIP logo

nose_xunitmp's People

Contributors

alexdlaird avatar ichimonji10 avatar ignas avatar mjkillough avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nose_xunitmp's Issues

Make unit tests support python 2 and 3 versions

In scope of migration project to Py3 I've noticed that tests/support.py uses print statement and fails on Py3. Using print function in unit test makes test to be able run on 2 and 3 python version.

Add more Python classifiers to setup.py to show to compatibility tools e.g. caniusepython3 that project compatible with Py3.

Build universal bdist_wheel. Project's code can be run on python 2 and 3.

I created a local branch with changes. Code was tested on 2.7 and 3.7 versions.
I can create a PR for that. Does it sound reasonable?

Nosetests start as multiprocess, but after a while only one is running

https://stackoverflow.com/questions/38461515/nosetests-start-as-multiprocess-but-only-one-continues-to-run

I'm running

nosetests -w tests/ --verbosity=3 --debug --debug-log=tests/logs/debug.log --xunitmp-file $CIRCLE_TEST_REPORTS/nose/junit.xml --with-flaky --processes=4 --process-timeout=500 --process-restartworker

And see all 4 tests start initially (selenium tests, so they launch instances of Chrome) but after most tests finish, all but one chrome instance close.

After a few moments, only a single browser is running, and the tests continue in serial.

What's going on?

When running my tests using --with-xunitmp and --processes=2 results in nothing getting written to the xml file

I am trying to run some unit tests using the nose_xunitmp plugin and multiprocessing, but I cannot get it to work. The tests run correctly but nothing gets added to the xml file.

System information:
Operating System: Windows 8
Python Version: Python 2.7.7
nose==1.3.3
nose-xunitmp==0.3.2

I installed the nose_xunitmp plugin. This is the list of plugins installed in my system:
Plugin xunitmp
Plugin capture
Plugin failuredetail
Plugin xunit
Plugin deprecated
Plugin skip
Plugin multiprocess
Plugin logcapture
Plugin coverage
Plugin rednose
Plugin attributeselector
Plugin doctest
Plugin profile
Plugin id
Plugin allmodules
Plugin collect-only
Plugin isolation
Plugin pdb

This is the nose command I am running:
(my_virtual_env) C:\My_path>nosetests -v -a type=smoke --logging-level=INFO --with-xunitmp --xunitmp-file=test-results.xml --processes=2 --process-timeout=5400

Four tests were executed:
My Test 1. ... ok
My Test 2. ... ok
My Test 3. ... ok
My Test 4. ... ok


XML: test-results.xml

Ran 4 tests in 272.909s

OK

But this is the content of the test-results.xml file:

`cannot import name force_unicode` on CircleCI

Locally, it works fine.

On my build server, I get:

Unable to load plugin xunitmp = nose_xunitmp:XunitMP: cannot import name force_unicode

Which then causes my test command:

nosetests -w tests/ --verbosity=3 --debug --debug-log=tests/logs/debug.log --with-xunitmp --xunitmp-file $CIRCLE_TEST_REPORTS/nose/junit.xml  --with-flaky --no-success-flaky-report --force-flaky --max-runs=3 --processes=4 --process-timeout=780 --process-restartworker

to fail with:

nosetests: error: no such option: --with-xunitmp

Running sudo pip install -r requirements.txt; [test command] my full output is:

The directory '/home/ubuntu/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/ubuntu/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting selenose (from -r requirements.txt (line 1))
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:120: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading selenose-1.3.tar.gz
Requirement already satisfied (use --upgrade to upgrade): requests in /usr/lib/python2.7/dist-packages (from -r requirements.txt (line 2))
Collecting flaky (from -r requirements.txt (line 3))
  Downloading flaky-3.1.1-py2.py3-none-any.whl
Collecting nose-parallel (from -r requirements.txt (line 4))
  Downloading nose_parallel-0.2.0-py2-none-any.whl
Collecting nose-xunitmp (from -r requirements.txt (line 5))
  Downloading nose_xunitmp-0.4.0.tar.gz
Requirement already satisfied (use --upgrade to upgrade): nose>=1.1.2 in /usr/lib/python2.7/dist-packages (from selenose->-r requirements.txt (line 1))
Collecting selenium>=2.25.0 (from selenose->-r requirements.txt (line 1))
  Downloading selenium-2.53.6-py2.py3-none-any.whl (884kB)
    100% |████████████████████████████████| 890kB 1.3MB/s 
Installing collected packages: selenium, selenose, flaky, nose-parallel, nose-xunitmp
  Running setup.py install for selenose ... -� �\� �done
  Running setup.py install for nose-xunitmp ... -� �done
Successfully installed flaky-3.1.1 nose-parallel-0.2.0 nose-xunitmp-0.4.0 selenium-2.53.6 selenose-1.3
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
/usr/lib/python2.7/dist-packages/nose/plugins/manager.py:383: RuntimeWarning: Unable to load plugin xunitmp = nose_xunitmp:XunitMP: cannot import name force_unicode
  RuntimeWarning)
Usage: nosetests [options]

nosetests: error: no such option: --with-xunitmp

Couldn't find anything in google (just similar sounding issues with django with no solution)

I'm also sending this to CircleCI support. Will relay back if they have a solution.

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.