浏览代码

skip cpu_percent test for Linux

Signed-off-by: Alexey Rokhin <[email protected]>
Alexey Rokhin 8 年之前
父节点
当前提交
61ed6ca8a4
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      tests/integration/service_test.py

+ 2 - 0
tests/integration/service_test.py

@@ -25,6 +25,7 @@ from compose.const import LABEL_ONE_OFF
 from compose.const import LABEL_PROJECT
 from compose.const import LABEL_SERVICE
 from compose.const import LABEL_VERSION
+from compose.const import IS_WINDOWS_PLATFORM
 from compose.container import Container
 from compose.errors import OperationFailedError
 from compose.project import OneOffFilter
@@ -120,6 +121,7 @@ class ServiceTest(DockerClientTestCase):
         self.assertEqual(container.get('HostConfig.CpuCount'), 2)
 
     @v2_2_only()
+    @pytest.mark.skipif(not IS_WINDOWS_PLATFORM, reason='cpu_percent is not supported for Linux')
     def test_create_container_with_cpu_percent(self):
         self.require_api_version('1.25')
         service = self.create_service('db', cpu_percent=12)