Spaces:
Running
Running
import unittest | |
import sys | |
sys.path.append('../') | |
from utils import * | |
import os | |
import shutil | |
class Utils(unittest.TestCase): | |
def test_download_pdf(self): | |
pdf_info = [('Serverless Applications Why When and How ', 'http://arxiv.org/pdf/2009.08173v2', ['Simon Eismann', 'Joel Scheuner', 'Erwin van Eyk', 'Maximilian Schwinger', 'Johannes Grohmann', 'Cristina L. Abad', 'Alexandru Iosup'], ['cs.SE', 'cs.DC', 'D.2.11; D.2.0; D.2.1'], 'docs', 'Simon Eismann, Joel Scheuner, Erwin van Eyk, Maximilian Schwinger, Johannes Grohmann, Cristina L. Abad, Alexandru Iosup, Serverless Applications Why When and How . arXiv [cs.SE] (2020), (available at http://arxiv.org/pdf/2009.08173v2).')] | |
download_pdf(pdf_info) | |
dowloaded_dir = 'docs/Serverless Applications Why When and How .pdf' | |
assert os.path.exists(dowloaded_dir) == True | |
shutil.rmtree(f'docs/') | |
if __name__ == '__main__': | |
unittest.main() |