Skip to content

GitHub Actions: migrate from nosetests to unittest#603

Merged
thiell merged 1 commit intocea-hpc:masterfrom
thiell:b194_nose_to_unittest
Feb 25, 2026
Merged

GitHub Actions: migrate from nosetests to unittest#603
thiell merged 1 commit intocea-hpc:masterfrom
thiell:b194_nose_to_unittest

Conversation

@thiell
Copy link
Collaborator

@thiell thiell commented Feb 25, 2026

  • Replace abandoned nose-py3 with stdlib unittest
  • Update CI workflow to use 'coverage run -m unittest discover'
  • Convert all test imports to package-relative imports (from .TLib import *)
  • Add tests/init.py to make tests/ a proper Python package
  • Fix test_027_warn_shell_globbing_nodes to handle Python 3.12 deprecation warnings
  • Add 'set -euxo pipefail' to all workflow steps for better error handling
  • Improve remote Python path detection using site.getsitepackages()

- Replace abandoned nose-py3 with stdlib unittest
- Update CI workflow to use 'coverage run -m unittest discover'
- Convert all test imports to package-relative imports (from .TLib import *)
- Add tests/__init__.py to make tests/ a proper Python package
- Fix test_027_warn_shell_globbing_nodes to handle Python 3.12 deprecation warnings
- Add 'set -euxo pipefail' to all workflow steps for better error handling
- Improve remote Python path detection using site.getsitepackages()
Copy link
Collaborator

@martinetd martinetd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, tests pass and this looks good to me!

head -2 ~/.bashrc
sed -i "2iexport PYTHONPATH=\$PYTHONPATH:$PYTHON_SITE_PACKAGES" ~/.bashrc
head -3 ~/.bashrc
ssh 127.0.0.2 'python -c "import ClusterShell; print(ClusterShell.__file__)"'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this was for debugging, do we want to keep it? (ssh needs to work for tests anyway so I think it's fine to keep)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly! I forgot to remove it. It's for troubleshooting the "remote" availability of the ClusterShell modules. But it can't hurt, I will keep it for now then.

@thiell thiell self-assigned this Feb 25, 2026
@thiell thiell added the Tests label Feb 25, 2026
@thiell thiell added this to the 1.9.4 milestone Feb 25, 2026
@thiell thiell added this pull request to the merge queue Feb 25, 2026
Merged via the queue into cea-hpc:master with commit 759af61 Feb 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants