瀏覽代碼

Add test for WSL identification

Tim Byrne 5 年之前
父節點
當前提交
45f1d93193
共有 1 個文件被更改,包括 5 次插入3 次删除
  1. 5 3
      test/test_unit_set_os.py

+ 5 - 3
test/test_unit_set_os.py

@@ -6,12 +6,14 @@ import pytest
 @pytest.mark.parametrize(
 @pytest.mark.parametrize(
     'proc_value, expected_os', [
     'proc_value, expected_os', [
         ('missing', 'uname'),
         ('missing', 'uname'),
-        ('has MiCrOsOfT inside', 'WSL'),  # case insensitive
+        ('has microsoft inside', 'WSL'),  # case insensitive
+        ('has Microsoft inside', 'WSL'),  # case insensitive
         ('another value', 'uname'),
         ('another value', 'uname'),
     ], ids=[
     ], ids=[
         '/proc/version missing',
         '/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(
 def test_set_operating_system(
         runner, paths, tst_sys, proc_value, expected_os):
         runner, paths, tst_sys, proc_value, expected_os):