コード例 #1
0
 def test_alloc(self, default, count, expected):
     with tempfile.NamedTemporaryFile() as f:
         f.write(default)
         f.flush()
         ret = hugepages._alloc(count, size=2048, path=f.name)
         f.seek(0)
         self.assertEqual(ret, expected)
コード例 #2
0
ファイル: hugepages_test.py プロジェクト: oVirt/vdsm
 def test_alloc(self, default, count, expected):
     with tempfile.NamedTemporaryFile() as f:
         f.write(default)
         f.flush()
         ret = hugepages._alloc(count, size=2048, path=f.name)
         f.seek(0)
         self.assertEqual(ret, expected)