nose

Disabling nose coverage report to STDOUT when HTML report is enabled?

假装没事ソ 提交于 2020-01-12 14:10:31
问题 I'm using nose (via django-nose) with the coverage plugin to check test coverage of my Django project. I've configured nose to generate an HTML coverage report on every test run: NOSE_ARGS = [ '--with-coverage', '--cover-package=foot', '--cover-html', '--cover-html-dir=cover', ] Now, I want to disable the plain-text coverage report that gets shown after every test run; the HTML is much more functional, and the long badly-formatted table makes it hard to see actual test output. Neither

Disabling nose coverage report to STDOUT when HTML report is enabled?

守給你的承諾、 提交于 2020-01-12 14:10:12
问题 I'm using nose (via django-nose) with the coverage plugin to check test coverage of my Django project. I've configured nose to generate an HTML coverage report on every test run: NOSE_ARGS = [ '--with-coverage', '--cover-package=foot', '--cover-html', '--cover-html-dir=cover', ] Now, I want to disable the plain-text coverage report that gets shown after every test run; the HTML is much more functional, and the long badly-formatted table makes it hard to see actual test output. Neither

ModuleNotFoundError: No module named 'numpy.testing.nosetester'

人盡茶涼 提交于 2020-01-11 07:17:10
问题 I was using the Decision Tree and this error was raised. The same situation appeared when I used Back Propagation. How can I solve it? (Sorry for my poor English) import pandas as pd import numpy as np a = np.test() f = open('E:/lgdata.csv') data = pd.read_csv(f,index_col = 'id') x = data.iloc[:,10:12].as_matrix().astype(int) y = data.iloc[:,9].as_matrix().astype(int) from sklearn.tree import DecisionTreeClassifier as DTC dtc = DTC(criterion='entropy') dtc.fit(x,y) x=pd.DataFrame(x) from

Importing python test run information into sonarqube

≯℡__Kan透↙ 提交于 2020-01-04 06:33:19
问题 I have a python project with structure like this and I'm trying to import it into SonarQube: root sonar-project.properties src test nosetests.xml All test files are in test folder. nosetests.xml is xml report generated with nose(tests) (1.3.7). My sonar-scanner.properties file looks like this sonar.projectKey=python-sonar sonar.projectName=python-sonar sonar.projectVersion=1.0 sonar.sources=src sonar.tests=test sonar.language=py sonar.sourceEncoding=UTF-8 #I want the details so this is false.

Changing verbose report format for nosetests

≡放荡痞女 提交于 2020-01-03 17:45:12
问题 I am running my tests using nosetests in verbose mode: .... test_cache_region (tests.test_sysutil.TestCachedMethodDecorator) ... ok test_expire (tests.test_sysutil.TestCachedMethodDecorator) ... ok test_lru (tests.test_sysutil.TestCachedMethodDecorator) ... ok test_max_capacity (tests.test_sysutil.TestCachedMethodDecorator) ... ok test_DecimalJSONEncoder (tests.test_util.UtilTestCase) ... ok test_cdecimal_support (tests.test_util.UtilTestCase) ... ok test_ceil_with_ndigits (tests.test_util

Error running nosetests

喜你入骨 提交于 2020-01-03 17:27:50
问题 I recently reinstalled nose to run tests on my code. https://nose.readthedocs.org/en/latest/ I used sudo pip install nose and went to my project folder. The response is -bash: nosetests: command not found. So, I once again I uninstalled and tried installing nose with MacPorts: sudo port install py27-nose In my project folder, I run nosetests-2.7 filename.py and I get the following error: ERROR: Failure: ImportError (No module named nose_parameterized) What's the problem? EDIT: More

Error running nosetests

杀马特。学长 韩版系。学妹 提交于 2020-01-03 17:27:50
问题 I recently reinstalled nose to run tests on my code. https://nose.readthedocs.org/en/latest/ I used sudo pip install nose and went to my project folder. The response is -bash: nosetests: command not found. So, I once again I uninstalled and tried installing nose with MacPorts: sudo port install py27-nose In my project folder, I run nosetests-2.7 filename.py and I get the following error: ERROR: Failure: ImportError (No module named nose_parameterized) What's the problem? EDIT: More

Nose: How to skip tests by default?

烂漫一生 提交于 2020-01-03 10:48:10
问题 I am using Python's nose and I have marked some of my tests as "slow", as explained in the attrib plugin documentation. I would like to skip all "slow" Tests by default when running nosetests , i.e. without having to write nosetests -a '!slow' . But I want to be able to run these tests when explicitly running them or writing nosetests -a 'slow' . How can I achieve this? 回答1: "Options are the same as on the command line, with the -- prefix removed" (https://nose.readthedocs.org/en/latest/usage

What does “import safe” mean in Python?

孤街醉人 提交于 2020-01-03 09:04:08
问题 I just hit the behaviour where nose will not run tests marked as executable (as described in a previous question). I found this surprising, and I wasted some time trying to find out why nose wasn't running my tests before I learned about nose's behaviour here. In the manpage for nosetests, it describes an option to override the default behaviour: --exe Look for tests in python modules that are executable. Normal behavior is to exclude executable modules, since they may not be import-safe

Nose doesn't find Django tests

守給你的承諾、 提交于 2020-01-03 07:06:24
问题 I am trying to use Django-nose in my current project, but I can't figure out how to get nose to run my tests. So I started a simple Django 1.4.1 project to get to know nose. But not even on this simple test project I could get it running. Before I go on: I know there are a ton of similar questions on Stackoverflow, like for instance this one: How do I tell Django-nose where my tests are? But after Googling around, reading blog posts and StackOverflow answers I still couldn't get it running.