mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-02-25 18:55:27 -06:00
tests: Drop os.system calls
Use python native code instead. This seems to avoid an occasional crash or abort of some sort with latest libosinfo
This commit is contained in:
parent
ef46af706a
commit
2897951ce1
@ -1420,8 +1420,8 @@ def cleanup():
|
|||||||
Cleanup temporary files used for testing
|
Cleanup temporary files used for testing
|
||||||
"""
|
"""
|
||||||
for i in clean_files:
|
for i in clean_files:
|
||||||
os.system("chmod 777 %s > /dev/null 2>&1" % i)
|
if os.path.exists(i):
|
||||||
os.system("rm -rf %s > /dev/null 2>&1" % i)
|
os.unlink(i)
|
||||||
|
|
||||||
|
|
||||||
class CLITests(unittest.TestCase):
|
class CLITests(unittest.TestCase):
|
||||||
|
@ -35,7 +35,7 @@ class TestClone(unittest.TestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
for f in local_files:
|
for f in local_files:
|
||||||
os.system("touch %s" % f)
|
open(f, "w").write("")
|
||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
for f in local_files:
|
for f in local_files:
|
||||||
|
Loading…
Reference in New Issue
Block a user