Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_nicks.csv and nicks.csv is overwritten during test execution #57

Open
zxiiro opened this issue Apr 13, 2015 · 0 comments
Open

test_nicks.csv and nicks.csv is overwritten during test execution #57

zxiiro opened this issue Apr 13, 2015 · 0 comments

Comments

@zxiiro
Copy link

zxiiro commented Apr 13, 2015

The files test_nicks.csv and nicks.csv are overwritten during test execution. Proper unittests should not modify the user's environment. Would recommend using something like tempfile [1] to create temporary files for testing.

Steps to reproduce:

  1. touch nicks.csv
  2. modify test_nicks.csv
  3. python -m unittest test_bot
  4. test_nicks.csv and nicks.csv is overwritten with test data

[1] https://docs.python.org/2/library/tempfile.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant