All Questions
3,541
questions
0
votes
0
answers
18
views
Test Cases are getting passed but not able to get logs file in logs folder
I have created a customLogger.py file to capture logs and entered location.
then i ran test_login.py file of test cases where i used logs method.
Is there any problem with the log location that i ...
0
votes
1
answer
83
views
Sphinx still generating documentation for test folders despite exclusion in conf.py
I'm using Sphinx to generate documentation for my Python project, and I want to exclude test folders from being included in the generated documentation. I've added "**/tests/*" to the ...
1
vote
0
answers
55
views
Python unittest/pytest tests priority
i have many unittests in my project each independent from another, however i would like to run the tests in parallel on several cores and in order to get the most out of it, it's necessary that the ...
-1
votes
1
answer
77
views
How can I test what my `__main__` file does?
I'm using pytest. NB W10.
I will be running my app by going > python src/core. "core" is my central module, with a __main__.py file.
For that reason I'm putting my "tests" ...
0
votes
1
answer
112
views
Running tkinter Tests on a Device without a Display
I have some Python code that I created some tkinter GUI's for. I wrote some basic tests for some of the custom frames that make up these GUI's using the pytest framework and they work locally. However,...
0
votes
1
answer
42
views
How to test a view in Django
I am learning basics of Django following official tutorial and adding some new features to my application. So I added a view that can nullify all votes of particular question
def nullask(request, ...
1
vote
1
answer
203
views
Test if plotly plot is empty
I want to build a generalisable function, to test if a plotly plot is empty or not.
Context: I recieve the plot data from some API. I want to test if it is empty or not. I have no access to the input ...
2
votes
3
answers
251
views
Randomly run "a few" tests with pytest
I am working on a numeric calculation application and have two sets of "unit" tests. "Fast" tests which run in < 10ms per tests and "long" tests which take several ...
0
votes
1
answer
41
views
Unable to get a handle on the auto-suggestion dropdown in an angular based website using python selenium
I am trying to automate work-flow using python-selenium in a website made using angular. However, I am not able to automate auto-suggestion dropdown.
When i input the suggestion key using send-keys ...
0
votes
1
answer
28
views
Python: Simple graph representation. Test fails
I have a problem with my graph representation with dictionary. Here is my code:
from typing import List
class GraphAdjacencyDictionary:
def __init__(self, number_of_vertices: int):
self....
6
votes
2
answers
92
views
How can I run code for Python testcase in VS Code?
When I ran this code in VS Code, it gives msg that "no testcase ran in 0.2s". So, How can I ran testcases in VS Code.
import pytest
from selenium import webdriver
from time import sleep
from ...
0
votes
0
answers
50
views
Google Foobar : Doomsday Fuel Not passing hidden test cases
I have a google foobar question that involves absorbing markov chains and I've come up with code that I made using a theoretical answer I found on github and it seems to work pretty well but it doesnt ...
0
votes
0
answers
129
views
Exclude directories from flake8 tests when it's run through colcon?
Question
I tried to build a simple ROS2 package using colcon, but I struggle to exclude directories from the flake8 tests launched with colcon test-result (namely the install and build directories), ...
0
votes
1
answer
81
views
How do specify a only finite number of Hypothesis examples
I am using Hypothesis to unit test my package. There are some functions in my package that I only want to run a few examples over for testing. I do not want Hypothesis to generate examples for me.
If ...
0
votes
2
answers
247
views
How to send empty arguments in a parametrized pytest test?
I am using Pytest. I have a function with several arguments and I am using a parametrized test to check different combinations of those arguments. But I would like to be able to not have all arguments ...