On some platforms, brp-compress zips man pages without distutils knowing about it. This results in an error when building an rpm for nose. The rpm build will report either that an unpackaged file was found, or that an expected package file was not found. If you see such an error when using the bdist_rpm command, uncomment the 'install_script' line in the '[bdist_rpm]' section of nose's setup.cfg file. This should fix the problem by fixing the man page filename in the generated rpm spec file.
nose is nicer testing for python
Overview
Comments
-
multiprocess functionality does not play way with generators
What steps will reproduce the problem?
1.create a simple test generator function like:
def test_foo(): for i in range(10): yield foosleep, i
def foosleep(n): time.sleep(4)
What is the expected output? What do you see instead?
Using --processes=10, all tests should complete in ~4s. Instead, it takes 40s since the next test does not start until the last is finished.
What version of the product are you using? On what operating system?
1.0.0 on ubuntu 10.04 x86-64
Please provide any additional information below.
i'm guessing we need a way to collect all tests before they are sent to the parallelizer?
Google Code Info: Issue #: 399 Author: [email protected] Created On: 2011-02-19T09:04:15.000Z Closed On: 2011-05-02T19:59:00.000Z
-
ImportError running nosetests on namespace package in subdirectory on Windows
On Windows only, if I create a project that shares a namespace with another project on which it depends, and the child project has a packages=find_packages('src') parameter, the tests will fail when they reference the parent project.
I originally described the problem at http://mail.python.org/pipermail/distutils-sig/2008-June/009595.html
What steps will reproduce the problem?
- On Windows XP or Vista, install Python 2.5.2, setuptools==0.6c8
- Expand the two packages, myns.projA and myns.projB from zip file (attached)
- in myns.projA run "python setup.py develop" 3.5. Install nose manually; there appears to be a different issue if nose is installed via tests_require= during the same step as the tests are run.
- In myns.projB run "python setup.py test"
What is the expected output? What do you see instead? nosetests should run with "Ran 0 tests in 0.032s" (or similar). Instead, the error is received:
"C:\Users\jaraco\projects\distutils_namespace\myns.projB\test\testBasic.py", line 1, in
from myns.projA.modA import funcA ImportError: No module named projA.modA Please reference the distutils-sig thread for more details. Attached you will find the two sample projects that reproduce the issue.
Google Code Info: Issue #: 197 Author: jaracosan Created On: 2008-06-30T16:01:03.000Z Closed On:
-
pip-3.3 install nose?
More a question (because I am just starting to get my personal stuff over to python3).
When I
pip-3.3 install nose
, I see some warnings about the print statement but I thought that would be ok since it seems to be related to some plugins - and this is stated in the README.However, it seems pip3 installs nose "successfully" (it claims) but nosetests-3.3 does not run.
nosetests-3.3 -h <snip> File "/homebrew/lib/python3.3/site-packages/nose/core.py", line 143 print "%s version %s" % (os.path.basename(sys.argv[0]), __version__) ^ SyntaxError: invalid syntax
So my question? Do I have to build it from source via
python3 setup.py install
to get a working nosetests-3.3? I assumed thatpip-3.3
just callspython3 setup.py
underneath.Please enlighten me. Thanks!
-
setup.py nosetests issue
I'm not sure what's the proper place to ask questions about nose, so I'll ask my question here.
I very often use
python setup.py nosetests
to run tests for my Python apps. And I usepython setup.py nosetests --tests ...
to run specific tests. That worked well with nose 1.1.2, but it no longer works with 1.2.With 1.2 all the tests are executed first, and then the ones specified using
--tests
. When I use--tests
I'd like that only the specified tests get executed.Is this a known issue? Are there any workarounds?
I tried to do
blocker bugpython setup.py nosetests my/specific/test.py
, but that does not work either. I getinvalid command name 'my/specific/test.py'
, from distutils/setuptools I think. -
make Skip Test errors behave like they did in 0.9 (not raise an error)
in nose 0.9 when raising SkipTest, the exception would be caught and printed as a warning. Now, in 0.10 the SkipTest exception is raised like any other exception. This means the --stop option will stop on SkipTests which is unhelpful.
There should be an option in 0.10, something like --skip-quietly (although perhaps there is a better name) so that SkipTest can issue a warning but not a failure.
Google Code Info: Issue #: 142 Author: kumar.mcmillan Created On: 2007-12-12T18:29:06.000Z Closed On: 2008-04-03T23:22:07.000Z
-
nosetest does not honour virtual environments
Suppose I just installed a virtualenv and some packages inside it
virtualenv myenv . myenv/bin/activate pip install nose pip install chumpy
and I have a
test_case.py
that looks likeimport chumpy import unittest class TestKinematicTree(unittest.TestCase): pass
when I run
nosetests test_case.py
(from the virtualenv) I have====================================================================== ERROR: Failure: ImportError (No module named chumpy) ----------------------------------------------------------------------
However, if I do
python -c "import nose; nose.main()"
it works without any problem (it works without any problem with
python -m unittest discover ...
as well). I tried with severalnosetests
options without any success. Any hint?Thanks!
-
Test failures with Python 3.4
Nose trunk fails 3 tests with Python 3.4. (All tests pass with Python 3.3.)
====================================================================== ERROR: test_skip_works_with_collector (test_collector.TestNoseTestCollector) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/nose/build/tests/functional_tests/test_collector.py", line 36, in test_skip_works_with_collector testRunner=runner) File "/usr/lib64/python3.4/unittest/main.py", line 93, in __init__ self.runTests() File "/usr/lib64/python3.4/unittest/main.py", line 244, in runTests self.result = testRunner.run(self.test) File "/usr/lib64/python3.4/unittest/runner.py", line 168, in run test(result) File "/usr/lib64/python3.4/unittest/suite.py", line 87, in __call__ return self.run(*args, **kwds) File "/usr/lib64/python3.4/unittest/suite.py", line 130, in run self._removeTestAtIndex(index) File "/usr/lib64/python3.4/unittest/suite.py", line 83, in _removeTestAtIndex self._removed_tests += test.countTestCases() File "/usr/lib64/python3.4/unittest/suite.py", line 41, in countTestCases cases = self._removed_tests AttributeError: 'FinalizingSuiteWrapper' object has no attribute '_removed_tests' ====================================================================== ERROR: test_pickle_empty (test_config.TestNoseConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/nose/build/tests/unit_tests/test_config.py", line 121, in test_pickle_empty cp = pickle.dumps(c) TypeError: 'NoneType' object is not callable ====================================================================== ERROR: test_multiprocess.test_mp_process_args_pickleable ---------------------------------------------------------------------- Traceback (most recent call last): File "/tmp/nose/build/tests/nose/case.py", line 198, in runTest self.test(*self.arg) File "/tmp/nose/build/tests/unit_tests/test_multiprocess.py", line 61, in test_mp_process_args_pickleable runner.run(test) File "/tmp/nose/build/tests/nose/plugins/multiprocess.py", line 380, in run p = self.startProcess(i, testQueue, resultQueue, shouldStop, result) File "/tmp/nose/build/tests/nose/plugins/multiprocess.py", line 338, in startProcess pickle.dumps(self.config))) TypeError: 'NoneType' object is not callable ---------------------------------------------------------------------- Ran 378 tests in 27.226s FAILED (SKIP=8, errors=3)
-
Regression since 1.3.1 with Python 3
Hey there,
We used to have everything working with Python 3.3 and now it's broken.
Full log is at http://logs.openstack.org/28/74728/4/check/gate-oslo-incubator-python33/fcccbc2/console.html
The error we see is:
2014-03-11 14:45:38.808 | ====================================================================== 2014-03-11 14:45:38.808 | ERROR: Failure: TypeError (__class__ assignment: 'UnboundSelf' object layout differs from 'TestException') 2014-03-11 14:45:38.808 | ---------------------------------------------------------------------- 2014-03-11 14:45:38.808 | Traceback (most recent call last): 2014-03-11 14:45:38.808 | File "/home/jenkins/workspace/gate-oslo-incubator-python33/.tox/py33/lib/python3.3/site-packages/nose/failure.py", line 39, in runTest 2014-03-11 14:45:38.808 | raise self.exc_val.with_traceback(self.tb) 2014-03-11 14:45:38.809 | File "/home/jenkins/workspace/gate-oslo-incubator-python33/.tox/py33/lib/python3.3/site-packages/nose/loader.py", line 516, in makeTest 2014-03-11 14:45:38.809 | return self._makeTest(obj, parent) 2014-03-11 14:45:38.809 | File "/home/jenkins/workspace/gate-oslo-incubator-python33/.tox/py33/lib/python3.3/site-packages/nose/loader.py", line 565, in _makeTest 2014-03-11 14:45:38.809 | return self.loadTestsFromTestClass(obj) 2014-03-11 14:45:38.809 | File "/home/jenkins/workspace/gate-oslo-incubator-python33/.tox/py33/lib/python3.3/site-packages/nose/loader.py", line 509, in loadTestsFromTestClass 2014-03-11 14:45:38.809 | for case in filter(wanted, dir(cls))] 2014-03-11 14:45:38.809 | File "/home/jenkins/workspace/gate-oslo-incubator-python33/.tox/py33/lib/python3.3/site-packages/nose/loader.py", line 508, in <listcomp> 2014-03-11 14:45:38.809 | cases = [self.makeTest(getattr(cls, case), cls) 2014-03-11 14:45:38.809 | File "/home/jenkins/workspace/gate-oslo-incubator-python33/.tox/py33/lib/python3.3/site-packages/nose/loader.py", line 504, in wanted 2014-03-11 14:45:38.809 | item = unbound_method(cls, item) 2014-03-11 14:45:38.809 | File "/home/jenkins/workspace/gate-oslo-incubator-python33/.tox/py33/lib/python3.3/site-packages/nose/pyversion.py", line 131, in unbound_method 2014-03-11 14:45:38.810 | return UnboundMethod(cls, func) 2014-03-11 14:45:38.810 | File "/home/jenkins/workspace/gate-oslo-incubator-python33/.tox/py33/lib/python3.3/site-packages/nose/pyversion.py", line 92, in __init__ 2014-03-11 14:45:38.810 | self.__self__.__class__ = cls 2014-03-11 14:45:38.810 | TypeError: __class__ assignment: 'UnboundSelf' object layout differs from 'TestException' 2014-03-11 14:45:38.810 |
-
Use coverage v3's cover html generation instead of ours if possible
It seems like we should be able to use coverage's builtin html generation instead of rolling our own if coverage 3 is installed.
Google Code Info: Issue #: 264 Author: durin42 Created On: 2009-05-02T15:04:30.000Z Closed On: 2011-03-21T16:06:50.000Z
-
Look for unittest2 in skip plugin - commit
Hi,
I don't know if it is proper place to posted about this, but I discovered problem with python-nose in versions 1.3.1 and above. I'm using it for testing python-kombu in version 3.0.15 and with python2.6 and unittest in version 0.5.1. After update python-nose from 1.3.0 to 1.3.3. SkipTest stopped working in my dev. I have found that it is caused by this patch: https://github.com/nose-devs/nose/commit/395a1bff9919f083eba9eb45800692e8ab55728c
Behavior is that SkipTest class is not loading any more.
Please let me know where can I post this problem.
-
Add manpage building support to conf.py, and fix formatting errors
Forwarding a patch originally applied in Debian by Charlie Smotherman. This fixes indentation errors, and also fixes a bug when a line starting with a
.
was not visible. -
'nosetests --plugins' fails: No module named 'ConfigParser'
$ nosetests --plugins Traceback (most recent call last): File "/usr/local/bin/nosetests", line 3, in <module> from nose import main File "/usr/local/lib/python3.9/site-packages/nose/__init__.py", line 1, in <module> from nose.core import collector, main, run, run_exit, runmodule File "/usr/local/lib/python3.9/site-packages/nose/core.py", line 11, in <module> from nose.config import Config, all_config_files File "/usr/local/lib/python3.9/site-packages/nose/config.py", line 6, in <module> import ConfigParser ModuleNotFoundError: No module named 'ConfigParser'
There's no 'require' clause in setup.py, so where is ConfigParser supposed to come from?
Version: 1.3.7 Python-3.9 FreeBSD 13.1
-
nosetests: error: no such option: --with-xunit on the linux terminal
hi,everyone
my nosetests version is 0.10.4.
when i excute the nosetests -v -s --with-xunit command
display nosetests: error: no such option: --with-xunit on the linux terminal
what should I do slove this issue. hope you answer!
-
Does NOSE_EVAL_ATTR takes precedence over NOSE_ATTR?
Hi, I tried to use -a and -A below at same time, looks like NOSE_EVAL_ATTR takes precedence over NOSE_ATTR, the -a ATTR has been ignored. Is it by design? is it possible to specify them at same time? Thanks.
-a=ATTR, --attr=ATTR Run only tests that have attributes specified by ATTR [NOSE_ATTR]
-A=EXPR, --eval-attr=EXPR Run only tests for whose attributes the Python expression EXPR evaluates to True [NOSE_EVAL_ATTR]
-
Correct man path in setup.py
According to the file system hierarchy man page man pages should go to
/usr/share/man
not/usr/man
as set in yoursetup.py
. Replaceman/man1
withshare/man/man1
in that line.This came up as reference in a similar issue in another project.
-
Distributed version of nose differ from GitHub repository and is not Python 3.10 compatible
The distributed version of
nose
looks like this:def _set_tests(self, tests): self._precache = [] is_suite = isinstance(tests, unittest.TestSuite) if isinstance(tests, collections.Callable) and not is_suite:
The same code in this repository is different: https://github.com/nose-devs/nose/blob/7c26ad1e6b7d308cafa328ad34736d34028c122a/nose/suite.py#L102-L105
According to git history the above has not changed in 15 years.
As a consequence the distributed version is not Python 3.10 compatible, and I don't know how to contribute a fix because it is apparently already fixed.
Is there any plans for a new version that contains the correct code?
Django test runner using nose
django-nose django-nose provides all the goodness of nose in your Django tests, like: Testing just your apps by default, not all the standard ones tha
PENBUD is penetration testing buddy which helps you in penetration testing by making various important tools interactive.
penbud - Penetration Tester Buddy PENBUD is penetration testing buddy which helps you in penetration testing by making various important tools interac
pytest plugin for distributed testing and loop-on-failures testing modes.
xdist: pytest distributed testing plugin The pytest-xdist plugin extends pytest with some unique test execution modes: test run parallelization: if yo
PacketPy is an open-source solution for stress testing network devices using different testing methods
PacketPy About PacketPy is an open-source solution for stress testing network devices using different testing methods. Currently, there are only two c
Python Projects - Few Python projects with Testing using Pytest
Python_Projects Few Python projects : Fast_API_Docker_PyTest- Just a simple auto
Scalable user load testing tool written in Python
Locust Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code, inst
Scalable user load testing tool written in Python
Locust Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code, inst
✅ Python web automation and testing. 🚀 Fast, easy, reliable. 💠
Build fast, reliable, end-to-end tests. SeleniumBase is a Python framework for web automation, end-to-end testing, and more. Tests are run with "pytes
A command-line tool and Python library and Pytest plugin for automated testing of RESTful APIs, with a simple, concise and flexible YAML-based syntax
1.0 Release See here for details about breaking changes with the upcoming 1.0 release: https://github.com/taverntesting/tavern/issues/495 Easier API t
Declarative HTTP Testing for Python and anything else
Gabbi Release Notes Gabbi is a tool for running HTTP tests where requests and responses are represented in a declarative YAML-based form. The simplest
Parameterized testing with any Python test framework
Parameterized testing with any Python test framework Parameterized testing in Python sucks. parameterized fixes that. For everything. Parameterized te
Python Rest Testing
pyresttest Table of Contents What Is It? Status Installation Sample Test Examples Installation How Do I Use It? Running A Simple Test Using JSON Valid
Python version of the Playwright testing and automation library.
?? Playwright for Python Docs | API Playwright is a Python library to automate Chromium, Firefox and WebKit browsers with a single API. Playwright del
The definitive testing tool for Python. Born under the banner of Behavior Driven Development (BDD).
mamba: the definitive test runner for Python mamba is the definitive test runner for Python. Born under the banner of behavior-driven development. Ins
Simple assertion library for unit testing in python with a fluent API
assertpy Simple assertions library for unit testing in Python with a nice fluent API. Supports both Python 2 and 3. Usage Just import the assert_that
ApiPy was created for api testing with Python pytest framework which has also requests, assertpy and pytest-html-reporter libraries.
ApiPy was created for api testing with Python pytest framework which has also requests, assertpy and pytest-html-reporter libraries. With this f
Testing Calculations in Python, using OOP (Object-Oriented Programming)
Testing Calculations in Python, using OOP (Object-Oriented Programming) Create environment with venv python3 -m venv venv Activate environment . venv
Automated testing tool developed in python for Advanced mathematical operations.
Advanced-Maths-Operations-Validations Automated testing tool developed in python for Advanced mathematical operations. Requirements Python 3.5 or late
Python tools for penetration testing
pyTools_PT python tools for penetration testing Please don't use these tool for illegal purposes. These tools is meant for penetration testing for leg