run tests on commit

This commit is contained in:
ed 2021-06-01 05:49:41 +02:00
parent d6f516b34f
commit 273ca0c8da
5 changed files with 54 additions and 19 deletions

View file

@ -8,6 +8,7 @@ import time
import shutil
import pprint
import tarfile
import tempfile
import unittest
from argparse import Namespace
@ -42,13 +43,15 @@ class Cfg(Namespace):
class TestHttpCli(unittest.TestCase):
def test(self):
td = os.path.join(tu.get_ramdisk(), "vfs")
try:
shutil.rmtree(td)
except OSError:
pass
def setUp(self):
self.td = tu.get_ramdisk()
def tearDown(self):
os.chdir(tempfile.gettempdir())
shutil.rmtree(self.td)
def test(self):
td = os.path.join(self.td, "vfs")
os.mkdir(td)
os.chdir(td)