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
|
||||
"""
|
||||
for i in clean_files:
|
||||
os.system("chmod 777 %s > /dev/null 2>&1" % i)
|
||||
os.system("rm -rf %s > /dev/null 2>&1" % i)
|
||||
if os.path.exists(i):
|
||||
os.unlink(i)
|
||||
|
||||
|
||||
class CLITests(unittest.TestCase):
|
||||
|
|
|
@ -35,7 +35,7 @@ class TestClone(unittest.TestCase):
|
|||
|
||||
def setUp(self):
|
||||
for f in local_files:
|
||||
os.system("touch %s" % f)
|
||||
open(f, "w").write("")
|
||||
|
||||
def tearDown(self):
|
||||
for f in local_files:
|
||||
|
|
Loading…
Reference in New Issue