Exemplo n.º 1
0
	def test_ticker_yougov(self):
		"""
		Get the current stock price of YouGov.

		YOU.L at 10:37am (ET): 39.40 (0.4%)
		"""
		res = commands.ticker("you.l")
		print(res)
		assert re.match(self.ticker_pattern('YOU.L'), res), res
Exemplo n.º 2
0
	def test_ticker_nasdaq(self):
		"""
		Get the current stock price of the NASDAQ.

		^IXIC at 10:37am (ET): 3403.247 (0.0%)
		"""
		res = commands.ticker("^ixic")
		print(res)
		assert re.match(self.ticker_pattern('^IXIC'), res), res
Exemplo n.º 3
0
	def test_ticker_nasdaq(self):
		"""
		Get the current stock price of the NASDAQ.

		^IXIC at 10:37am (ET): 3403.247 (0.0%)
		"""
		res = commands.ticker("^ixic")
		print(res)
		assert re.match(self.ticker_pattern('^IXIC'), res), res
Exemplo n.º 4
0
	def test_ticker_goog(self):
		"""
		Get the current stock price of Google.

		GOOG at 4:00pm (ET): 484.81 (+1.5%)
		"""
		res = commands.ticker("goog")
		print(res)
		assert re.match(self.ticker_pattern('GOOG'), res), res
Exemplo n.º 5
0
	def test_ticker_yougov(self):
		"""
		Get the current stock price of YouGov.

		YOU.L at 10:37am (ET): 39.40 (0.4%)
		"""
		res = commands.ticker("you.l")
		print(res)
		assert re.match(self.ticker_pattern('YOU.L'), res), res
Exemplo n.º 6
0
	def test_ticker_goog(self):
		"""
		Get the current stock price of Google.

		GOOG at 4:00pm (ET): 484.81 (+1.5%)
		"""
		res = commands.ticker("goog")
		print(res)
		assert re.match(self.ticker_pattern('GOOG'), res), res
Exemplo n.º 7
0
	def test_ticker_nasdaq(self):
		"""
		Get the current stock price of the NASDAQ.

		^IXIC at 10:37am (ET): 2490.40 (0.4%)
		"""
		res = commands.ticker(c, e, "#test", "testrunner", "^ixic")
		print(res)
		assert re.match(r"^\^IXIC at \d{1,2}:\d{2}(?:am|pm) \([A-z]{1,3}\): "
			r"\d{4,5}.\d{2} \(\-?\d{1,3}.\d%\)$", res), res
Exemplo n.º 8
0
	def test_ticker_yougov(self):
		"""
		Get the current stock price of YouGov.

		YOU.L at 10:37am (ET): 39.40 (0.4%)
		"""
		res = commands.ticker(c, e, "#test", "testrunner", "you.l")
		print(res)
		assert re.match(r"^YOU.L at \d{1,2}:\d{2}(?:am|pm) \([A-z]{1,3}\): "
			r"\d{1,4}.\d{2,4} \(\-?\d{1,3}.\d%\)$", res), res
Exemplo n.º 9
0
	def test_ticker_goog(self):
		"""
		Get the current stock price of Google.

		GOOG at 4:00pm (ET): 484.81 (1.5%)
		"""
		res = commands.ticker(c, e, "#test", "testrunner", "goog")
		print(res)
		assert re.match(r"^GOOG at \d{1,2}:\d{2}(?:am|pm) \([A-z]{1,3}\): "
			r"\d{2,4}.\d{1,4} \(\-?\d{1,3}.\d%\)$", res), res