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

How to run a single nose test case using Eclipse PyDev?

I have created a simple test containing two test cases: # test.py def test_will_pass(): pass def test_will_fail(): assert False In the command-line I can use nosetests test.py:test_will_fail to just run the second test case. The problem…
Björn Pollex
  • 75,346
  • 28
  • 201
  • 283
0
votes
1 answer

Unit testing Cherrypy HTTPRedirect.

I’m writing a cherrypy application that needs to redirect to a particular page and I use HTTPRedirect(‘mynewurl’, status=303) to achieve this. This works inasmuch as the browser (Safari) redirects to ‘mynewurl’ without asking the user. However,…
KevinHW
  • 53
  • 7
0
votes
1 answer

nosetests - output of `all_config_files` and `user_config_files`

I have the following directory structure: main/ |setup.cfg |foo.cfg |tests/ |setup.cfg |foo.cfg |test_simple.py And test test_simple.py: from nose.tools import * from nose.config import all_config_files,…
Jakub M.
  • 32,471
  • 48
  • 110
  • 179
0
votes
2 answers

How to tell when nosetest is running programmatically

nosetest is the default test framework in Turbogeras 2.0. The application has a websetup.py module that initialise the database. I use mysql for my development and production environment and websetup works fine, but nosetest uses sqlite on memory…
Juparave
  • 706
  • 5
  • 11
0
votes
1 answer

how to set attribute to a python file?

I know how to set attribute for a class, but can't find how to set for a file.. flow = ['1','4','5','2'] def test_generator(test): def test_parser(self): print test return test_parser class API_tests(unittest.TestCase): …
eligro
  • 785
  • 3
  • 13
  • 23
0
votes
3 answers

Print the test type in Python Nose

I am using Python Nose and would like to print the type of the test ran, like whether it is a Doctest or unittest or so? How can this be done? Thanks.
vinay polisetti
  • 374
  • 1
  • 3
  • 15
0
votes
2 answers

How to use SQLite :memory: database in webpy for unittesting

I want to use a SQLite in memory (":memory:") DB for the tests in my webapp. I'm using nosetests for the tests, and webpy as framework. I want to populate the DB in the setup() function, and then run all my tests. My problem is that webpy closes all…
Joaquin Cuenca Abela
  • 2,535
  • 22
  • 21
0
votes
2 answers

App Engine Unit Testing with nosetests gae issue

I've been unit testing my application using nosetests with the with-gae plugin. However, I've wrapped many of my get/post handlers with decorators that check certain items in the datastore and put them in os.environ for use in the handlers. So I…
Richard Bender
  • 1,124
  • 1
  • 10
  • 22
0
votes
2 answers

'nosetests' was unable to collect test files from directory

I am having a hierarchy of directories and inside every directory there is one 'test/' directory which has all the test files. nosetests is not able to collect these test files somehow. I have followed naming convention used for filenames and class…
Aashish P
  • 1,894
  • 5
  • 22
  • 36
0
votes
1 answer

Can't run individual nosetests from a PyQt GUI I've made - ValueError: No such test

I've created a GUI for running nosetests in PyQt. GUI code: http://pastebin.com/uVhkdDZc My code: http://pastebin.com/3MG8PJn0 My interface reads the files in a folder of unittests and then populates a combobox with those tests and in turn, another…
markwalker_
  • 12,078
  • 7
  • 62
  • 99
0
votes
2 answers

Nosetests TypeError and Attribute Error in Python (LPTHW, exercise 48)

I am working on Learn Python the Hard Way, Exercise 48, using nosetests to test tuples. The nosetest I have set up is as follows: def test_directions(): assert_equal(lexicon.scan("north"), [('direction', 'north')]) However, I get the following…
0
votes
1 answer

django_nose unit tests fail (no such option)

I have a new project and can't get django_nose set up correctly. I have never had this problem before. So, makes me think that it's a configuration issue. But, I can't spot it. I'm using virtualenv and have both nose and django-nose installed. …
David S
  • 12,967
  • 12
  • 55
  • 93
0
votes
3 answers

How to test and log multiple times -nosetest unittest - python

Here is a mini version of problem a = [[1,2,3][0,0,0]] b = [[1,0,1][0,0,0]] c = [[0,0,0][1,0,1]] so if level 1 is [] and level 2 is [[]], then what i'm trying to do is test ever list to see if there level 2's match (regardless of order) so in this…
Drew Verlee
  • 1,880
  • 5
  • 21
  • 30
0
votes
1 answer

python tests using nosgae running very slow since 1.6.3

As asked in this google group post: https://groups.google.com/forum/?fromgroups&hl=en#!topic/google-appengine-python/fQUnsnt-wJ4 I'm not sure whether yaml parsing is the root cause, but I am sure my test suite now takes several times longer to run.…
Karl Rosaen
  • 4,508
  • 2
  • 27
  • 30
-1
votes
1 answer

something errors were thrown out when I was testing the scikit-learn with nosetests

I cannot find how to solve the problem like below. The mac is OS 10.10.3 and python is 2.7.6(the original one in mac). All the way to get the scikit-learn is so smooth except testing. I cannot understand the error at all... failure is listed…
zjuzqj
  • 1
1 2 3
25
26