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

Many new unit tests for configuration settings file (pelicanconf.py) (#3357) #3368

Closed
wants to merge 1 commit into from

Conversation

egberts
Copy link
Contributor

@egberts egberts commented Jul 14, 2024

  • Now reports line number/offset of pelicanconf.py syntax errors
  • Better error messages with full absolute resolved filespec due to:
    • Read-only attribute accidentially used
    • Non-existant file report
  • Prevent clobbering of Python built-in system modules by user's custom filename
  • Breakout test_settings.py into smaller and manageable UT files
  • test_settings.py
  • test_settings_deprecated.py
  • test_settings_module.py
  • test_settings_path.py
  • Start using pytest (test_settings_path.py) instead of unittest
  • Set minimum Python to 3.8 (pytest 4.0)

Pull Request Checklist

Resolves: #3357

  • [XXX] Ensured tests pass and (if applicable) updated functional test output
  • [XXX] Conformed to code style guidelines by running appropriate linting tools
  • [XXX] Added tests for changed code
  • Updated documentation for changed code

No change in documentation.

- Now reports line number/offset of pelicanconf.py syntax errors
- Better error messages with full absolute resolved filespec due to:
  - Read-only attribute accidentially used
  - Non-existant file report
- Prevent clobbering of Python built-in system modules by user's
  custom filename
- Breakout test_settings.py into smaller and manageable UT files
-   test_settings.py
-   test_settings_deprecated.py
-   test_settings_module.py
-   test_settings_path.py
- Start using pytest (test_settings_path.py) instead of unittest
-
- Set minimum Python to 3.8 (pytest 4.0)
@egberts
Copy link
Contributor Author

egberts commented Jul 14, 2024

test_load_source_module_path_abs_syntax_error_fail() fails parallelization of pytest due to multiple concurrent accesses to the sys.modules[]. Needs a file lock to ensure serialization testing.

Withdrawing PR.

@egberts egberts closed this Jul 14, 2024
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

Successfully merging this pull request may close these issues.

End-user should enjoy reading error messages around the PATH (mis-)declaration.
1 participant