Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/z/i/ZimArchivist-HEAD/ZimArchivist/tests/test_archive.py   ZimArchivist(Download)
import os.path
 
from archive import get_archive_list
class TestGetArchiveList(unittest.TestCase):
 
    def test_one_file(self):
        path = tempfile.TemporaryDirectory()
        tmpfile = tempfile.NamedTemporaryFile(dir=path.name, delete=False)
        result = get_archive_list(path.name)
        tmpfile = tempfile.NamedTemporaryFile(dir=path.name, delete=False)
        tmpdir = tempfile.TemporaryDirectory(dir=path.name)
        result = get_archive_list(path.name)
        valid = [os.path.basename(tmpfile.name)]
        self.assertEqual(result, valid)