split out path adjustments into __init__

master
mutantmonkey 2012-06-01 00:13:57 -07:00
parent 34f3f8a9c4
commit f820c6dcb3
12 changed files with 14 additions and 42 deletions

View File

@ -0,0 +1,3 @@
# add current working directory to path
import sys
sys.path.append('.')

View File

@ -3,14 +3,11 @@ test_fcc.py - tests for the fcc callsign lookup module
author: mutantmonkey <mutantmonkey@mutantmonkey.in> author: mutantmonkey <mutantmonkey@mutantmonkey.in>
""" """
# add current working directory to path
import sys
sys.path.append('.')
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules.fcc import fcc from modules.fcc import fcc
class TestFcc(unittest.TestCase): class TestFcc(unittest.TestCase):
def setUp(self): def setUp(self):
self.phenny = MagicMock() self.phenny = MagicMock()

View File

@ -3,15 +3,12 @@ test_hs.py - tests for the hokie stalker module
author: mutantmonkey <mutantmonkey@mutantmonkey.in> author: mutantmonkey <mutantmonkey@mutantmonkey.in>
""" """
# add current working directory to path
import sys
sys.path.append('.')
import re import re
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules.hs import search, hs from modules.hs import search, hs
class TestHs(unittest.TestCase): class TestHs(unittest.TestCase):
def setUp(self): def setUp(self):
self.phenny = MagicMock() self.phenny = MagicMock()

View File

@ -3,15 +3,12 @@ test_imdb.py - tests for the imdb module
author: mutantmonkey <mutantmonkey@mutantmonkey.in> author: mutantmonkey <mutantmonkey@mutantmonkey.in>
""" """
# add current working directory to path
import sys
sys.path.append('.')
import re import re
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules.imdb import imdb_search, imdb from modules.imdb import imdb_search, imdb
class TestImdb(unittest.TestCase): class TestImdb(unittest.TestCase):
def setUp(self): def setUp(self):
self.phenny = MagicMock() self.phenny = MagicMock()

View File

@ -3,14 +3,11 @@ test_mylife.py - tests for the mylife module
author: mutantmonkey <mutantmonkey@mutantmonkey.in> author: mutantmonkey <mutantmonkey@mutantmonkey.in>
""" """
# add current working directory to path
import sys
sys.path.append('.')
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules import mylife from modules import mylife
class TestMylife(unittest.TestCase): class TestMylife(unittest.TestCase):
def setUp(self): def setUp(self):
self.phenny = MagicMock() self.phenny = MagicMock()

View File

@ -3,14 +3,11 @@ test_short.py - tests for the vtluug url shortener module
author: mutantmonkey <mutantmonkey@mutantmonkey.in> author: mutantmonkey <mutantmonkey@mutantmonkey.in>
""" """
# add current working directory to path
import sys
sys.path.append('.')
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules.short import short from modules.short import short
class TestShort(unittest.TestCase): class TestShort(unittest.TestCase):
def setUp(self): def setUp(self):
self.phenny = MagicMock() self.phenny = MagicMock()

View File

@ -3,14 +3,11 @@ test_slogan.py - tests for the slogan module
author: mutantmonkey <mutantmonkey@mutantmonkey.in> author: mutantmonkey <mutantmonkey@mutantmonkey.in>
""" """
# add current working directory to path
import sys
sys.path.append('.')
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules.slogan import sloganize, slogan from modules.slogan import sloganize, slogan
class TestSlogan(unittest.TestCase): class TestSlogan(unittest.TestCase):
def setUp(self): def setUp(self):
self.phenny = MagicMock() self.phenny = MagicMock()

View File

@ -3,15 +3,12 @@ test_tfw.py - tests for the fucking weather module
author: mutantmonkey <mutantmonkey@mutantmonkey.in> author: mutantmonkey <mutantmonkey@mutantmonkey.in>
""" """
# add current working directory to path
import sys
sys.path.append('.')
import re import re
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules.tfw import tfw from modules.tfw import tfw
class TestTfw(unittest.TestCase): class TestTfw(unittest.TestCase):
def setUp(self): def setUp(self):
self.phenny = MagicMock() self.phenny = MagicMock()

View File

@ -3,15 +3,12 @@ test_urbandict.py - tests for the urban dictionary module
author: mutantmonkey <mutantmonkey@mutantmonkey.in> author: mutantmonkey <mutantmonkey@mutantmonkey.in>
""" """
# add current working directory to path
import sys
sys.path.append('.')
import re import re
import unittest import unittest
from mock import MagicMock, Mock from mock import MagicMock, Mock
from modules.urbandict import urbandict from modules.urbandict import urbandict
class TestUrbandict(unittest.TestCase): class TestUrbandict(unittest.TestCase):
def setUp(self): def setUp(self):
self.phenny = MagicMock() self.phenny = MagicMock()

3
test/__init__.py Normal file
View File

@ -0,0 +1,3 @@
# add current working directory to path
import sys
sys.path.append('.')

View File

@ -2,13 +2,8 @@
Tests for phenny's bot.py Tests for phenny's bot.py
""" """
# add current working directory to path
import sys
sys.path.append('.')
import unittest import unittest
from mock import call, patch, Mock from mock import call, patch, Mock
import bot import bot

View File

@ -2,13 +2,8 @@
Tests for phenny's irc.py Tests for phenny's irc.py
""" """
# add current working directory to path
import sys
sys.path.append('.')
import unittest import unittest
from mock import call, patch, Mock from mock import call, patch, Mock
import irc import irc