You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run the test I get the following errors (please implement a text copy command in unit testing pane):
not run t.test_add_seq
not run t.test_replace_seq
failure p.test_base64_img_collection_error
The failure is caused by a test in a complete other file: pocs/test_base64_img.py
The pocs directory is a directory in the current working directory. In the cwd the files music_utilities.py and test_music_utilities.py reside. It seems that spyder-unittest searches for all files in all directories from the cwd.
This is how pytest works by default. It looks in all subdirectories for tests. Normally all tests are run, but certain errors (e.g. syntax errors) cause pytest to give up before running the tests. Without more information, it is impossible to know specifically what is happening in this case.
I think what is needed here is an option to run tests only in a specific directory, just like #88 asks for running a specific test, so that's how I'll interpret this issue.
jitseniesen
changed the title
spyder-unittest does not run the tests
Add option to restrict to tests in specific directory
May 5, 2020
Description of your problem
When I run the test I get the following errors (please implement a text copy command in unit testing pane):
not run t.test_add_seq
not run t.test_replace_seq
failure p.test_base64_img_collection_error
The failure is caused by a test in a complete other file: pocs/test_base64_img.py
The pocs directory is a directory in the current working directory. In the cwd the files music_utilities.py and test_music_utilities.py reside. It seems that spyder-unittest searches for all files in all directories from the cwd.
What steps will reproduce the problem?
This is the file test_music_utilities.py
from music_utilities import MusicFiles
Test the musicfiles class
def test_add_seq():
assert MusicFiles.seq_name('d.csv', 2) == 'd_0002.csv'
def test_replace_seq():
MusicFiles.seq_name('d_3.csv', 2) == 'd_0002.csv'
It is aimed at testing the file music_utilities.py
What is the expected output? What do you see instead?
True
True
What I see instead is described in the problem description
Key versions and other information:
The text was updated successfully, but these errors were encountered: