1
- import platform
1
+ import distro
2
2
import pytest
3
3
4
4
from distutils .version import StrictVersion
@@ -158,7 +158,7 @@ def test_VlanIncrementalConfig(self, dvs):
158
158
self .dvs_vlan .remove_vlan (vlan )
159
159
self .dvs_vlan .get_and_verify_vlan_ids (0 )
160
160
161
- @pytest .mark .skipif (StrictVersion (platform .linux_distribution ()[1 ]) <= StrictVersion ('8.9' ),
161
+ @pytest .mark .skipif (StrictVersion (distro .linux_distribution ()[1 ]) <= StrictVersion ('8.9' ),
162
162
reason = "Debian 8.9 or before has no support" )
163
163
@pytest .mark .parametrize ("test_input, expected" , [
164
164
(["Vla" , "2" ], 0 ),
@@ -185,7 +185,7 @@ def test_AddVlanWithIncorrectKeyPrefix(self, dvs, test_input, expected):
185
185
self .dvs_vlan .remove_vlan (vlan_id )
186
186
self .dvs_vlan .get_and_verify_vlan_ids (0 )
187
187
188
- @pytest .mark .skipif (StrictVersion (platform .linux_distribution ()[1 ]) <= StrictVersion ('8.9' ),
188
+ @pytest .mark .skipif (StrictVersion (distro .linux_distribution ()[1 ]) <= StrictVersion ('8.9' ),
189
189
reason = "Debian 8.9 or before has no support" )
190
190
@pytest .mark .parametrize ("test_input, expected" , [
191
191
(["Vlan" , "abc" ], 0 ),
@@ -277,7 +277,7 @@ def test_RemoveNonexistentVlan(self, dvs):
277
277
self .dvs_vlan .remove_vlan (vlan )
278
278
self .dvs_vlan .get_and_verify_vlan_ids (0 )
279
279
280
- @pytest .mark .skipif (StrictVersion (platform .linux_distribution ()[1 ]) <= StrictVersion ('8.9' ),
280
+ @pytest .mark .skipif (StrictVersion (distro .linux_distribution ()[1 ]) <= StrictVersion ('8.9' ),
281
281
reason = "Debian 8.9 or before has no support" )
282
282
@pytest .mark .parametrize ("test_input, expected" , [
283
283
(["tagging_mode" , "untagged" ], [1 , "SAI_VLAN_TAGGING_MODE_UNTAGGED" ]),
@@ -385,7 +385,7 @@ def test_VlanDbData(self, dvs):
385
385
386
386
self .dvs_vlan .remove_vlan (vlan )
387
387
388
- @pytest .mark .skipif (StrictVersion (platform .linux_distribution ()[1 ]) <= StrictVersion ('8.9' ),
388
+ @pytest .mark .skipif (StrictVersion (distro .linux_distribution ()[1 ]) <= StrictVersion ('8.9' ),
389
389
reason = "Debian 8.9 or before has no support" )
390
390
@pytest .mark .parametrize ("test_input, expected" , [
391
391
(["untagged" ], ["SAI_VLAN_TAGGING_MODE_UNTAGGED" ]),
0 commit comments