properly skip vtwiki tests and, enable calc tests (2^64) was disabled

master
Paul Walko 2017-02-11 19:04:47 +00:00
parent 58d41a0acd
commit b2add77d08
2 changed files with 31 additions and 31 deletions

View File

@ -25,12 +25,12 @@ class TestCalc(unittest.TestCase):
self.phenny.say.assert_called_once_with('2') self.phenny.say.assert_called_once_with('2')
@unittest.skip('Not supported with DuckDuckGo') # @unittest.skip('Not supported with DuckDuckGo')
def test_c_scientific(self): def test_c_scientific(self):
input = Mock(group=lambda x: '2^64') input = Mock(group=lambda x: '2^64')
c(self.phenny, input) c(self.phenny, input)
self.phenny.say.assert_called_once_with('1.84467441 * 10^(19)') self.phenny.say.assert_called_once_with('1.84467440737096 * 10^19')
def test_c_none(self): def test_c_none(self):
input = Mock(group=lambda x: 'aif') input = Mock(group=lambda x: 'aif')

View File

@ -8,32 +8,32 @@ import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules import vtluugwiki from modules import vtluugwiki
# Disabling tests until wiki is up @unittest.skip('Skipping until wiki is back up')
#class TestVtluugwiki(unittest.TestCase): class TestVtluugwiki(unittest.TestCase):
# def setUp(self): def setUp(self):
# self.phenny = MagicMock() self.phenny = MagicMock()
#
# def test_vtluug(self): def test_vtluug(self):
# input = Mock(groups=lambda: ['', "VT-Wireless"]) input = Mock(groups=lambda: ['', "VT-Wireless"])
# vtluugwiki.vtluug(self.phenny, input) vtluugwiki.vtluug(self.phenny, input)
#
# out = self.phenny.say.call_args[0][0] out = self.phenny.say.call_args[0][0]
# m = re.match('^.* - https:\/\/vtluug\.org\/wiki\/VT-Wireless$', m = re.match('^.* - https:\/\/vtluug\.org\/wiki\/VT-Wireless$',
# out, flags=re.UNICODE) out, flags=re.UNICODE)
# self.assertTrue(m) self.assertTrue(m)
#
# def test_vtluug_invalid(self): def test_vtluug_invalid(self):
# term = "EAP-TLS#netcfg" term = "EAP-TLS#netcfg"
# input = Mock(groups=lambda: ['', term]) input = Mock(groups=lambda: ['', term])
# vtluugwiki.vtluug(self.phenny, input) vtluugwiki.vtluug(self.phenny, input)
#
# self.phenny.say.assert_called_once_with( "Can't find anything in "\ self.phenny.say.assert_called_once_with( "Can't find anything in "\
# "the VTLUUG Wiki for \"{0}\".".format(term)) "the VTLUUG Wiki for \"{0}\".".format(term))
#
# def test_vtluug_none(self): def test_vtluug_none(self):
# term = "Ajgoajh" term = "Ajgoajh"
# input = Mock(groups=lambda: ['', term]) input = Mock(groups=lambda: ['', term])
# vtluugwiki.vtluug(self.phenny, input) vtluugwiki.vtluug(self.phenny, input)
#
# self.phenny.say.assert_called_once_with( "Can't find anything in "\ self.phenny.say.assert_called_once_with( "Can't find anything in "\
# "the VTLUUG Wiki for \"{0}\".".format(term)) "the VTLUUG Wiki for \"{0}\".".format(term))