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
… Shouldn't the diary be environment dependable? I mean, if I'm developing a new feature and I want to test it, it adds notes to my 'personal use' yoda outside the virtualenv. And then when I want to use the diary to keep track of my tasks, there is a lot of garbage from the testing.
... Also, it seems that installing yoda again does not clean the diary notes.
Enhancement idea:
... I don't know where the diary is being stored, but is there a way to store in a place that is not the same for all virtualenvs?
The text was updated successfully, but these errors were encountered:
@vccolombo yes you're right.
I didn't think of that while writing the tests. This also applies while running some other tests, like the ones for flashcards, define etc.
We need to create dummy data for tests so that the original config is not disturbed.
Regarding your Enhancement idea, yes, It's possible to implement that too, but it's not there yet.
I think all you need to do is to run tests within a test directory and delete the directory afterwards. Since all the data are currently stored in files and there is no option to delete them, running the tests automatically adds garbage data to the local instance.
So before starting the tests, we should create a test subdirectory and change these values accordingly:
YODA_CONFIG_FILE_PATH = os.path.join(os.path.expanduser('~'), '.yodaconfig')
DEFAULT_CONFIG_PATH = os.path.join(os.path.expanduser('~'), '.yoda')
After running the tests, the directories would be simply deleted.
Tests updated so that they are running with a temporary folder as a config folder which is deleted after the tests are executed (either successfully or not). The test data are not mixed with user data of a developer.
Refers to the following issue:
yoda-pa#116
Changes
- a function is executed prior to each test which creates a temporary folder and changes the yoda config path to this folder
- a function is executed after each test which deletes the folder and restores the original yoda config path
- therefore, all constants refering to file paths (in all modules) have been changed to functions, so that they are able to react to config path changes (otherwise it could result in a weird behaviour)
(changing file path constants to dynamically resolved functions also helps in cases where two instances of yoda are run simultaneously and one of them changes the config path)
What are the steps to reproduce this issue?
What happens?
… The tests add test notes into the diary
What were you expecting to happen?
… Shouldn't the diary be environment dependable? I mean, if I'm developing a new feature and I want to test it, it adds notes to my 'personal use' yoda outside the virtualenv. And then when I want to use the diary to keep track of my tasks, there is a lot of garbage from the testing.
... Also, it seems that installing yoda again does not clean the diary notes.
Enhancement idea:
... I don't know where the diary is being stored, but is there a way to store in a place that is not the same for all virtualenvs?
The text was updated successfully, but these errors were encountered: