Questions tagged [nosetests]

nosetests is the the script name for running Python [nose] testing, a package for automated unit tests based on simple asserts and running all test*() functions in test*.py.

nosetests is the main script for running tests with automatic discover.

See documentation.

390 questions
0
votes
1 answer

nosetests resuls xml ends up in wrong directory

I'm running python unit tests using nosetests, and generating an xml report for use by something (Jenkins in this case). Nosetests didn't appear to be publishing XML results, but after some investigating I realized it was just putting the file in…
Felix
  • 2,064
  • 3
  • 21
  • 31
0
votes
1 answer

Get testing script filename and class name with nosetest

I ran the osetests --rednose --nocapture test_report.py I got type for print(cls.__class__.__name__), but I expected TestReport and /usr/local/bin/nosetests for os.path.splitext(sys.modules['__main__'].__file__)[0], but I expected test_report How…
newBike
  • 14,385
  • 29
  • 109
  • 192
0
votes
0 answers

nosetests opens a dialogue box when run after installing nose

I'm on exercise 46 of Learn Python the Hard Way, and I'm meant to install nose and run nosetests. I've installed nose already using pip, but when I run nosetests in the directory above the 'tests' folder, I get a small pop out dialog box asking me…
babyswizz
  • 55
  • 5
0
votes
1 answer

How to print the skipped test in the final result

Im using nosetests framework for writing test cases. I'm using @attr to pick right test cases my test.py is something like this... class Test_module1_tcs: @classmethod def setup_class(cls): ... def setup(self): ... …
chk
  • 308
  • 2
  • 10
0
votes
1 answer

nose using the same Python instance?

How can I force nosetests to run each unit test in a new Python instance? I'm having a weird situation here, I have a simple plugin system based on enumerating __subclasses__() of a Plugin base class out of which plugins are derived. My problem…
Unknown
  • 5,722
  • 5
  • 43
  • 64
0
votes
1 answer

ExceptionWrapper error freshen

I am getting this vague error using Freshen C:\Front_End>nosetests --with-f reshen -v features\ Addition: Add two numbers ... ok Addition: Add two numbers ... ok Addition: Add two numbers ... ok Division: Regular numbers ...…
TomSelleck
  • 6,706
  • 22
  • 82
  • 151
0
votes
1 answer

ValueError using nosetest subprocess

I would like to have the same output that I got when I executed os.system: os.system('nosetests TestStateMachine.py:FluidityTest.test_it_has_an_initial_state -v') test_it_has_an_initial_state (TestStateMachine.FluidityTest) ...…
hudsonsferreira
  • 207
  • 2
  • 13
0
votes
1 answer

nose python27 and sklearn

I've installed python27 using MacPorts and have added the /opt/local/bin path to the PATH variable. When I execute which python I get the one installed at /opt/local/bin which is fine. However , I installed nose using easy_install and nosetests now…
bytebiscuit
  • 3,446
  • 10
  • 33
  • 53
0
votes
0 answers

python nosetests will check these packages the project import?

in my python project , all my test cases not import some package the main program imported,but when i run nosetests in the project dir,if my environment has not install some package the main program has imported ,it will occur failed about "No…
0
votes
1 answer

How to configure Jenkins to run Nosetests as build action in Windows

I have installed Python 3.3 on Windows. When i run nosetests from the command prompt giving the absolute path to the python test scripts folder, it runs. However, when i configure build shell in Jenkins as 'nosetests path/to/tests --with-xunit', the…
Chakra
  • 2,525
  • 8
  • 43
  • 82
0
votes
1 answer

Object scope in TestCase class when using nose and python

I'm using nose. My current code is: class A(): def __init__(): pass def do_somthing(self): do_it class Test(unittest.TestCase): def setUp(self): self.a = A() def testSomthing: raise…
DoronS
  • 347
  • 1
  • 6
  • 12
0
votes
2 answers

Nose Test Error

I am using the command nosetests -v --with-coverage --cover-package=task --cover-erase --cover-html-dir=cover --cover-html --with-xunit task to run the test cases but in the end after running all the testcases I get the nosetests.xml blank and the…
Nishant Kashyap
  • 819
  • 2
  • 15
  • 25
0
votes
1 answer

Nosetest overwrites xml output

I am having problems with nosestests writing to the unittext xml file twice. I have this python script import unittest class aa(unittest.TestCase): def test_aa(self): self.assertTrue(True) testlist = [] suite =…
P4ul
  • 770
  • 5
  • 15
0
votes
1 answer

Coverage report of nosetests in case of child process

I am using nosetests for unit testing of some python script. The script in question creates a child process. I am executing the script using the command : nosetests -s -v 'python script.py' --with-coverage I have installed nose-cov. Its version is…
0
votes
2 answers

python nosetest config file parse error

my config file looks like this # function class,dir, file match this regular expression are considered tests [NOSE_TESTMATCH] #by default this is- (?:^|[\b_\./-])[Tt]est # The file names after this block are ignored while…
1 2 3
25
26