Add test for WSL identification

This commit is contained in:
Tim Byrne 2020-02-03 08:30:34 -06:00
parent 062181be4a
commit 45f1d93193
No known key found for this signature in database
GPG Key ID: 14DB4FC2465A4B12
1 changed files with 5 additions and 3 deletions

View File

@ -6,12 +6,14 @@ import pytest
'proc_value, expected_os', [
('missing', 'uname'),
('has MiCrOsOfT inside', 'WSL'), # case insensitive
('has microsoft inside', 'WSL'), # case insensitive
('has Microsoft inside', 'WSL'), # case insensitive
('another value', 'uname'),
], ids=[
'/proc/version missing',
'/proc/version includes MS',
'/proc/version excludes MS',
'/proc/version includes ms',
'/proc/version excludes Ms',
'another value',
def test_set_operating_system(
runner, paths, tst_sys, proc_value, expected_os):