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

Permission issues may cause some tests to fail #189

Closed
tpitkanen opened this issue Sep 7, 2021 · 1 comment
Closed

Permission issues may cause some tests to fail #189

tpitkanen opened this issue Sep 7, 2021 · 1 comment
Assignees
Labels
invalid This doesn't seem right

Comments

@tpitkanen
Copy link
Member

At least the following tests may fail if the directory/file returned by tempfile aren't fully accessible by the current user:

  • unit.test_general_functions.TestCoinc.test_coinc_returns_expected_output_if_parameters_are_ok
  • unit.test_general_functions.TestCoinc.test_output_is_written_to_file_if_output_file_is_given
  • unit.test_get_espe.TestGetEspeRun.test_get_espe_run_returns_expected_spectrum
  • unit.test_get_espe.TestGetEspeRun.test_get_espe_writes_results_to_given_spectrum_file

Reported on revision 8707dc7, Python 3.6.8 on Windows. The revision also features a failing test that was fixed in 50f9dc4.

(Issue originally reported in private correspondence with @jkpnen and @aleekaup2)

@tpitkanen tpitkanen added the invalid This doesn't seem right label Sep 7, 2021
@tpitkanen tpitkanen self-assigned this Sep 7, 2021
@tpitkanen
Copy link
Member Author

tpitkanen commented Sep 7, 2021

The issue occured on a JYU-supplied Windows laptop. It is caused by (too) strict permissions to the %temp% directory.

The listed tests save input and output files for C programs in %temp%. The files are normally saved in a request's directory which means normal Potku usage is unaffected.

I could not reproduce the issue on my personal Windows devices or on JYU's macOS laptop.

As this is a development environment issue and not a Potku issue, it doesn't necessarily require changes to the tests/code. However, it is a good idea to note it in the documentation to prevent confusion among future developers.

tpitkanen added a commit that referenced this issue Sep 7, 2021
- add tests using temporary files (#189)
- add timing-based tests
- specify Python version more accurately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant