def setUpClass(cls):
        super(TestYahooOptions, cls).setUpClass()
        _skip_if_no_lxml()

        # aapl has monthlies
        cls.aapl = web.Options('aapl', 'yahoo')
        today = datetime.today()
        cls.year = today.year
        cls.month = today.month + 1
        if cls.month > 12:  # pragma: no cover
            cls.month = 1
            cls.year = cls.year + 1
        cls.expiry = datetime(cls.year, cls.month, 1)
        cls.dirpath = tm.get_data_path()
        cls.html1 = 'file://' + os.path.join(cls.dirpath, 'yahoo_options1.html')
        cls.html2 = 'file://' + os.path.join(cls.dirpath, 'yahoo_options2.html')
        cls.html3 = 'file://' + os.path.join(cls.dirpath, 'yahoo_options3.html')  # Empty table GH#22
        cls.data1 = cls.aapl._option_frames_from_url(cls.html1)['puts']
    def setUpClass(cls):
        super(TestYahooOptions, cls).setUpClass()
        _skip_if_no_lxml()

        # aapl has monthlies
        cls.aapl = web.Options('aapl', 'yahoo')
        today = datetime.today()
        cls.year = today.year
        cls.month = today.month + 1
        if cls.month > 12:  # pragma: no cover
            cls.month = 1
            cls.year = cls.year + 1
        cls.expiry = datetime(cls.year, cls.month, 1)
        cls.dirpath = tm.get_data_path()
        cls.html1 = 'file://' + os.path.join(cls.dirpath,
                                             'yahoo_options1.html')
        cls.html2 = 'file://' + os.path.join(cls.dirpath,
                                             'yahoo_options2.html')
        cls.html3 = 'file://' + os.path.join(
            cls.dirpath, 'yahoo_options3.html')  # Empty table GH#22
        cls.data1 = cls.aapl._option_frames_from_url(cls.html1)['puts']
Ejemplo n.º 3
0
 def setUpClass(cls):
     super(TestEnigma, cls).setUpClass()
     _skip_if_no_lxml()
Ejemplo n.º 4
0
 def test_get_available_datasets(self):
     _skip_if_no_lxml()
     l = get_available_datasets()
     assert len(l) > 100
Ejemplo n.º 5
0
 def setUpClass(cls):
     super(TestYahoo, cls).setUpClass()
     _skip_if_no_lxml()
 def test_get_available_datasets(self):
     _skip_if_no_lxml()
     l = get_available_datasets()
     assert len(l) > 100
Ejemplo n.º 7
0
 def setUpClass(cls):
     super(TestYahoo, cls).setUpClass()
     _skip_if_no_lxml()