Gbp-Pq: Name up_moto_optional
import os
-import moto
+try:
+ import moto
+except ImportError:
+ from unittest import SkipTest
+ moto = None
import pytest
from pandas.io.parsers import read_table
is yielded by the fixture.
"""
pytest.importorskip('s3fs')
+ if not moto:
+ raise SkipTest("requires moto")
moto.mock_s3().start()
test_s3_files = [
import pytest
-import moto
+try:
+ import moto
+except ImportError:
+ moto = None
import pandas as pd
from pandas import compat
assert_frame_equal(uncompressed_df, compressed_df)
+@pytest.mark.skipif(not moto, reason="requires moto")
@pytest.mark.parametrize('compression', COMPRESSION_TYPES)
def test_with_s3_url(compression):
boto3 = pytest.importorskip('boto3')
import numpy as np
import pytest
from numpy import nan
-import moto
+try:
+ import moto
+except ImportError:
+ moto = None
import pandas as pd
import pandas.util.testing as tm
local_table = self.get_exceldf('test1')
tm.assert_frame_equal(url_table, local_table)
+ @pytest.mark.skipif(not moto, reason="requires moto")
def test_read_from_s3_url(self):
boto3 = pytest.importorskip('boto3')
pytest.importorskip('s3fs')