Python Nosetesting

Jupyter Data
1 min readJan 13, 2016

--

In your folder, when you have multiple test_files.py, running the following command picks them all up and runs them

nosetests -vv --exe --with-coverage --cover-erase --cover-html-dir=./tests/python/cover  --cover-html --cover-inclusive --cover-package=app

— exe flag is needed as otherwise the files get skipped

— cover-package = to restrict the folder otherwise it runs through all dependencies

— cover-html = generate cover report to see missing lines

I had started a python shell to query the MySQL database through SQL Alchemy and that had locked up the tables. As a result, my nose tests were hanging — not running/exiting.

I killed the python processes which were locking up the tables and Nose was back up sniffing

> $ ps auxww | grep python | awk ‘{print $2}’ | sudo xargs kill -9

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Jupyter Data
Jupyter Data

Written by Jupyter Data

Fastest way to Explore your Data

No responses yet

Write a response