Пример #1
0
def run_throttled_server(port: int = 8000, threshold: int = 10**6) -> None:
    _ = get_dataset("smallfile")
    _ = get_dataset("bigfile")
    _ = get_dataset_bz2("smallfile")
    _ = get_dataset_bz2("bigfile")
    os.chdir(DATA_DIR)
    ThrottledReqHandler.threshold = threshold
    http_srv.test(HandlerClass=ThrottledReqHandler, port=port)  # type: ignore
Пример #2
0
def run_simple_server() -> None:
    _ = get_dataset("smallfile")
    _ = get_dataset("bigfile")
    _ = get_dataset_bz2("smallfile")
    _ = get_dataset_bz2("bigfile")
    os.chdir(DATA_DIR)
    import RangeHTTPServer.__main__  # type: ignore

    RangeHTTPServer.__main__
def run_throttled_server(port=8000, threshold=10**6):
    _ = get_dataset('smallfile')
    _ = get_dataset('bigfile')
    _ = get_dataset_bz2('smallfile')
    _ = get_dataset_bz2('bigfile')
    os.chdir(DATA_DIR)
    ThrottledReqHandler.threshold = threshold
    if six.PY2:
        import sys
        sys.argv[1] = 8000
        http_srv.test(HandlerClass=ThrottledReqHandler)
    else:
        http_srv.test(HandlerClass=ThrottledReqHandler, port=port)
Пример #4
0
def run_simple_server() -> None:
    _ = get_dataset("smallfile")
    _ = get_dataset("bigfile")
    _ = get_dataset_bz2("smallfile")
    _ = get_dataset_bz2("bigfile")
    _ = get_dataset_gz("smallfile")
    _ = get_dataset_gz("bigfile")
    # if six.PY3:
    #    _ = get_dataset_lzma('smallfile')
    #    _ = get_dataset_lzma('bigfile')
    os.chdir(DATA_DIR)
    import RangeHTTPServer.__main__  # type: ignore

    assert RangeHTTPServer.__main__
def run_simple_server():
    _ = get_dataset('smallfile')
    _ = get_dataset('bigfile')
    _ = get_dataset_bz2('smallfile')
    _ = get_dataset_bz2('bigfile')
    os.chdir(DATA_DIR)
    if six.PY2:
        import SimpleHTTPServer
        import RangeHTTPServer
        from RangeHTTPServer import RangeRequestHandler
        import sys
        sys.argv[1] = 8000
        SimpleHTTPServer.test(HandlerClass=RangeRequestHandler)
    else:
        import RangeHTTPServer.__main__
 def test_load_bigfile_bz2(self):
     _ = get_dataset_bz2('bigfile')
 def test_load_smallfile_bz2(self):
     _ = get_dataset_bz2('smallfile')
Пример #8
0
 def test_10_read_multi_csv_file_bz2_with_crash(self) -> None:
     file_list = [get_dataset_bz2("bigfile")] * 2
     self._tst_10_read_multi_csv_file_compress_with_crash(
         file_list, "t10_1")
Пример #9
0
 def test_08_read_multi_csv_file_bz2_no_crash(self) -> None:
     files = [get_dataset_bz2("smallfile")] * 2
     return self._tst_08_read_multi_csv_file_compress_no_crash(files)
Пример #10
0
 def test_10_read_multi_csv_file_bz2_with_crash(self):
     file_list = [get_dataset_bz2('bigfile')] * 2
     self._tst_10_read_multi_csv_file_compress_with_crash(file_list)