diff options
author | Conrad Hoffmann <1226676+bitfehler@users.noreply.github.com> | 2020-01-08 15:18:48 +0100 |
---|---|---|
committer | Daniel Watkins <oddbloke@ubuntu.com> | 2020-01-08 09:18:48 -0500 |
commit | c5a7d7979c036f6dc6823f429c6b6820f7f74241 (patch) | |
tree | 036e989adddfc3d4a730443b3e3648b13ad7d078 /tools/.lp-to-git-user | |
parent | 3b27d5319d219a7f90aa86725407931dc077dec2 (diff) | |
download | vyos-cloud-init-c5a7d7979c036f6dc6823f429c6b6820f7f74241.tar.gz vyos-cloud-init-c5a7d7979c036f6dc6823f429c6b6820f7f74241.zip |
Make tests work with Python 3.8 (#139)
* Make DistroChecker test work with Python 3.8
In Python 3.8, `platform.linux_distribution` has been removed. This was
anticipated, and the cloud-init code uses its own
`util.get_linux_distro` instead, which works fine w/o
`platform.linux_distribution`. However, these tests still try to mock
the platform function, which fails if it doesn't exist (Python 3.8).
Instead, mock the new function here, as this is a test for code that
depends on it rather than the function itself.
* Make GetLinuxDistro tests work with Python 3.8
In Python 3.8, `platform.dist` was removed, so allow mock to create the
function by setting `create=True`.
* Make linter happy in Python 3.8
Suppress E1101(no-member) as this function was removed.
Diffstat (limited to 'tools/.lp-to-git-user')
0 files changed, 0 insertions, 0 deletions