Questions tagged [nose]

Nose is an alternate Python unittest discovery and running process. It is intended to mimic the behavior of py.test as much as is reasonably possible.

Nose is an alternate unittest discovery and running process. It is intended to mimic the behavior of py.test as much as is reasonably possible.

Resources

1036 questions
-1
votes
1 answer

While writing an automation script in python, page is taking too much time to load, and the elements cannot be found. How to fix this?

@with_setup(setup_module,teardown_module) def test_checklist(): uname = Util.findElement("username") if uname.is_displayed(): uname.send_keys("crussell") pwd = Util.findElement("password") if pwd.is_displayed(): …
-1
votes
1 answer

Selenium swtiching from nose to pytest

I'm thinking about switching from our current testing framework nose w/ nose-testconfig to py.test. Any suggestion how to overwrite the following code specifically setup/teardown below using pytest fixtures class BaseTestCase(unittest.TestCase,…
testing_kate
  • 187
  • 2
  • 13
-1
votes
1 answer

Nose required 2 arguments

I've create nose test: import nose from nose.tools import istest, nottest nose.run() path1 = "/some/my/path1/" path2 = "/some/my/path2/" @istest def compare_dir(path1, path2): my_bool = mytest, bool yield my_test, my_bool sub_path1 =…
nick_gabpe
  • 5,113
  • 5
  • 29
  • 38
-1
votes
1 answer

Run nosetest with selenium grid

I'm currently trying to run python UI automations using selenium grid and nosetest. I finished setting up the hub and two nodes. I tried to run the tests by the command below: nosetests-2.7 --tests=ui_tests/sample_tests.py --tc-file=conf/config.ini…
JACK ZHANG
  • 600
  • 1
  • 7
  • 16
-1
votes
1 answer

How is nosetest's LazySuite supposed to be used?

According to nosetest's API documentation, there is a LazySuite() class which is class nose.suite.LazySuite(tests=()) A suite that may use a generator as its list of tests However, I could not find any example how this test generator is supposed to…
Dirk
  • 9,381
  • 17
  • 70
  • 98
-1
votes
1 answer

command to generate html report using nosetests over jenkins

nosetests --processes=2 --process-timeout=1800 -v --nocapture -a=attr --attr=api src/tests/externalapi/test_accounts_api.py --with-html doesn't work console says: nosetests: error: no such option: --with-html Build step 'Execute shell' marked build…
-1
votes
1 answer

how to run selective modules from a directory using nosetests?

I have multiple modules in same directory and i'm running the below nosetests command: nosetests --processes=2 --process-timeout=1500 -v --nocapture -a=attr --attr=api --exclude-dir-file=src/tests/externalapi/test_p0_security_tests.py…
-1
votes
2 answers

Error gotten in integising strings in .split() list

Im starting to learn python can someone pls tell me how to OK this nosetest: from nose.tools import * from lexicon.lexicon import lexicon def test_directions(): assert_equal(lexicon.scan("north"), [('direction', 'north')]) …
Bolaji
  • 556
  • 1
  • 6
  • 11
-1
votes
1 answer

Suspicious gaps in Nose coverage

I'm using Nose with Django (and django-nose), and I get a very odd coverage report: $ python3 manage.py test lists nosetests lists --with-coverage --cover-package=lists,superlists --verbosity=1 Creating test database for alias…
Nick T
  • 25,754
  • 12
  • 83
  • 121
-1
votes
1 answer

Run unittests with multiple random values

Having variable like list1=[1,2,3,4,5] and another list2=[2,3,4,5,6] I want to make assertions about each item in first list like class MyTest(unittest.TestCase): for num in list1: self.assertIn(num, list2) And I need unique name for…
Munky munk
  • 41
  • 4
-1
votes
1 answer

Running the python scripts as both standlone scripts and also as nosetests

I have python scripts which are run with a config file on CLI. All the contents of the test script are inside class "ABC". In the init of class ABC, I pass config file which gets used in the script. So when I run my python script standalone I would…
user2921139
  • 1,669
  • 4
  • 17
  • 25
-1
votes
1 answer

Error when using 'yield' with assert_in in nose

I'm using nose and I'm having troubles when using assert_in with yield. Here's the code that causes the problem: for row in rows: yield assert_in, existing_name, row[self.search_field] The error: Failure: ValueError (no such test method in…
Maroun
  • 94,125
  • 30
  • 188
  • 241
-1
votes
1 answer

group nose result by module

By I get all of my test cases under one test suite nosetests. Is it possible to configure nose to create testsuite for each module it loads tests from. For example if I have a system like: packageA moduleA testA testB …
Suryavanshi
  • 595
  • 1
  • 7
  • 24
-2
votes
1 answer

Nose Python testing

can anybody help me please, what means (Pdb) up, (Pdb)list. In textbook Python Testing nobody solves this unfortunately. Thank You very much... (Pdb) up (Pdb) up` (Pdb) list def test_add_method_returns_correct_result(self): print print …
-2
votes
1 answer

python cover: strange function coverage

Green color: code line is reachable. Red color: code line is not reachable. How could it be that lines 72, 74, 76 are reachable?
Vitalii Ponomar
  • 10,686
  • 20
  • 60
  • 88
1 2 3
69
70