All Questions
1,428 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
45
views
python 2 libraries got installed instead of python3
I'm trying to build a python project with custom make file. This project has requirements.txt file which has many dependencies. All other dependencies except nose are installing properly (Python 3 ...
4
votes
3
answers
3k
views
Nosetests is not running for some reason
I'm going through the course of IBM for DevOps and Software Engineering and in one of the labs, I'm supposed to run some tests with the nosetests tool. This lab was designed to be done in a virtual ...
0
votes
0
answers
76
views
Error while writing unit tests for nested function in python
I have a function which reads data from db, modifies it and writes it back to another db. I am trying to write unit tests for this
import file1
import file2
def update_func(query):
max_date = ...
1
vote
1
answer
869
views
Nose and nose2 alternatives
I have been working my way through Learn Python 3 The Hard way by Zed Shaw and I have recently encountered a huge issue. So the book itself is outdated and examples included in the book make use of ...
0
votes
1
answer
52
views
How to use Nose tests to test an individual method on a Mac?
I'm using Nose tests to test a particular function. After entering the correct file directory, I run the following command in the Mac terminal: nosetests test_hardening.py: ...
2
votes
1
answer
396
views
Detect missing unittests
I am refactoring a legacy Python project, which did not have any unittests.
Assuming a directory structure like this:
C:.
├───scripts
│ schema.sql
├───src
│ │ .coverage
│ │ bar.py
│ │ ...
0
votes
0
answers
350
views
Do we need to clean up nosetest .coverage files?
It seems to me that we need to clean up the .coverage hidden files created by nosetest or else nosetest would be confused when I try to run it a second time. It may return cached results in the ....
1
vote
0
answers
226
views
Getting 0% coverage in Sonarqube , Using nosetests for generating coverage.xml
I'm working on a project where code coverage needs to display in Sonarqube.
We are framing dockerfile.test where at ENTRYPOINT nosetests is provided. setup.cfg file is created putting all required ...
0
votes
0
answers
135
views
Running nosetests from a shell script fails - 'No such file ...'
I can run the following in my project root in the terminal just fine ...
$ nosetests tests/autogen/output/ifort/9-1_linux_intel
However placing the same in runtests.sh and running using sh runtests.sh ...
5
votes
1
answer
1k
views
How can I import a testclass properly to inherit from, without it being run as a test
Context
I have a test class where all my tests inherit from. It cant run by itself as it really doesnt contain any setup info
I wanted to add a test which is executed by ALL tests (adding it to the ...
0
votes
1
answer
191
views
How do I get error messages from nosetests
The nosetest command is failing with no messages. If I cd to my home directory I get the message I would expect:
(base) raysalemi@RayProMac ~ % nosetests
---------------------------------------------...
0
votes
0
answers
293
views
Function uses no argument error while collecting the test
I have a problem with my pytest. Every time I run the test I get the following message:
In test_signup_customer_homepage: function uses no argument 'browser_name'
Here is my test file:
from nose.tools ...
0
votes
1
answer
495
views
Response generated while mocking is not correct in python tests
I am trying to unit test some of my functions using mocks in python. Few of them seems to be working as expected but I am trouble with the response of one the test case. Which it not returning the ...
3
votes
1
answer
4k
views
Which of the following decorator is used to assign user defined setup and tear down functions to a test function, while using nose?
I am not able to choose the right answer for this please help
@use
@with_setup
@use_setup
@setup
Any help is highly appreciated ! !
Plss help
1
vote
1
answer
737
views
Module * has no attribute * using nosetests
I do the task from "Python Learn Hard Way" book. It is about using tests with nose.
I have the function scan_net in lexicon.py file:
def scan_net(sentence):
direction = ['north', 'south',...