forked from rabbagliettiandrea/python-ircd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
directory secondo http://jcalderone.livejournal.com/39794.html in questa maniera si evita ogni tipo di incoerenza o ambiguità. Aggiunto run_test.py per eseguire i test in maniera 'controllata'.
- Loading branch information
Showing
16 changed files
with
75 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.pyc |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
""" | ||
test | ||
Questo è il package contenente tutti i test | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
|
||
############################################# | ||
class Client(object): # classe mock che emula il comportamento/attributi della classe reale | ||
def __init__(self): | ||
self.password = None | ||
self.nick = None | ||
self.reply_output = None | ||
self.ID = 0 | ||
self.sock = None | ||
self.logged = False # Fin quando il client non invia la sequenza [pass->]nick->user | ||
self.user = None | ||
self.realName = None | ||
self.flags = set() # Flag attivi per quell'utente | ||
self.joinChannel_list = {} | ||
|
||
def reply(self, reply_msg): | ||
self.reply_output = reply_msg | ||
|
||
|
||
############################################# | ||
class Server(object): # classe mock che emula il comportamento/attributi della classe reale | ||
|
||
def __init__(self,): | ||
self.client_list = {} | ||
self.socket_list = [] | ||
self.channel_list = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
import platform | ||
import unittest | ||
|
||
from hwup_ircd.test import test_basic | ||
|
||
|
||
if __name__ == '__main__': | ||
installed_ver = [int(i) for i in platform.python_version_tuple()] # verifica che la ver di python sia 3>= x >2.7 | ||
if installed_ver[0] == 3 or (installed_ver[0] == 2 and installed_ver[1] >= 7): | ||
suite = unittest.TestLoader().loadTestsFromTestCase(test_basic.Test_IRC_command) | ||
unittest.TextTestRunner(verbosity=2).run(suite) | ||
else: | ||
print('Needed Python version >=2.7') |