diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-03-10 13:26:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-10 11:26:05 -0600 |
commit | 986f37b017134ced5d9dd38b420350916297002b (patch) | |
tree | 59fe191bbc8641a14d60f37499412912ba824443 /tools/run-container | |
parent | 71af48df3514ca831c90b77dc71ba0a121dec401 (diff) | |
download | vyos-cloud-init-986f37b017134ced5d9dd38b420350916297002b.tar.gz vyos-cloud-init-986f37b017134ced5d9dd38b420350916297002b.zip |
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
Diffstat (limited to 'tools/run-container')
-rwxr-xr-x | tools/run-container | 12 |
1 files changed, 6 insertions, 6 deletions
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 |