class TestyDict: def setup_method(self, method): self.dict = YahooDict() def teardown_method(self, method): del self.dict def test__get_url(self): url = 'https://tw.dictionary.search.yahoo.com/search?p=test' assert url == self.dict._get_url('test')
class TestyDict: def setup_method(self, method): self.dict = YahooDict(get_args()) def teardown_method(self, method): del self.dict def test__get_url(self): url = 'https://tw.dictionary.search.yahoo.com/search?p=test' assert url == self.dict._get_url('test')
def setup_class(cls): cls.dict = YahooDict(get_args()) cls.words = ['style', 'metadata', 'apples', 'google', 'hold on'] cls.records = [cls.dict.query(word) for word in cls.words]
def setup_class(cls): cls.dict = YahooDict(get_args()) cls.word = 'style' cls.record = cls.dict.query(cls.word)
def setup_method(self, method): self.dict = YahooDict()
def setup_method(self, method): self.dict = YahooDict(get_args())