From 986f37b017134ced5d9dd38b420350916297002b Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Tue, 10 Mar 2020 13:26:05 -0400 Subject: cloudinit: move to pytest for running tests (#211) As the nose docs[0] themselves note, it has been in maintenance mode for the past several years. pytest is an actively developed, featureful and popular alternative that the nose docs themselves recommend. See [1] for more details about the thinking here. (This PR also removes stale tox definitions, instead of modifying them.) [0] https://nose.readthedocs.io/en/latest/ [1] https://lists.launchpad.net/cloud-init/msg00245.html --- tools/run-container | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tools/run-container') diff --git a/tools/run-container b/tools/run-container index 23243474..a7a552ec 100755 --- a/tools/run-container +++ b/tools/run-container @@ -287,8 +287,8 @@ prep() { install_packages "$@" } -nose() { - python3 -m nose "$@" +pytest() { + python3 -m pytest "$@" } is_done_cloudinit() { @@ -478,10 +478,10 @@ main() { if [ -n "$unittest" ]; then debug 1 "running unit tests." - run_self_inside_as_cd "$name" "$user" "$cdir" nose \ + run_self_inside_as_cd "$name" "$user" "$cdir" pytest \ tests/unittests cloudinit/ || { - errorrc "nosetests failed."; - errors[${#errors[@]}]="nosetests" + errorrc "pytest failed."; + errors[${#errors[@]}]="pytest" } fi @@ -557,7 +557,7 @@ main() { } case "${1:-}" in - prep|os_info|wait_inside|nose) _n=$1; shift; "$_n" "$@";; + prep|os_info|wait_inside|pytest) _n=$1; shift; "$_n" "$@";; *) main "$@";; esac -- cgit v1.2.3