add travis support

This commit is contained in:
speyrefitte
2014-11-04 09:58:56 +01:00
parent cebac5b939
commit 74b0c362c4
8 changed files with 167 additions and 33 deletions

14
.travis.yml Normal file
View File

@@ -0,0 +1,14 @@
language: python
python:
- 2.7
before_install:
- sudo apt-get install python2.7 python-twisted python-openssl python-qt4 python-qt4reactor python-sip-dev scons
install:
- scons -C rdpy/core install
script:
- python -m unittest discover -s test

View File

@@ -1,6 +1,30 @@
'''
@author: sylvain
'''
#
# Copyright (c) 2014 Sylvain Peyrefitte
#
# This file is part of rdpy.
#
# rdpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
unit test for rdpy.base.const module
"""
import os, sys
# Change path so we find rdpy
sys.path.insert(1, os.path.join(sys.path[0], '..'))
import unittest
import rdpy.base.const
import rdpy.network.type

View File

@@ -1,6 +1,30 @@
'''
@author: sylvain
'''
#
# Copyright (c) 2014 Sylvain Peyrefitte
#
# This file is part of rdpy.
#
# rdpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
unit test for rdpy.network.layer module
"""
import os, sys
# Change path so we find rdpy
sys.path.insert(1, os.path.join(sys.path[0], '..'))
import unittest
import rdpy.network.layer

View File

@@ -1,6 +1,30 @@
'''
@author: sylvain
'''
#
# Copyright (c) 2014 Sylvain Peyrefitte
#
# This file is part of rdpy.
#
# rdpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
unit test for rdpy.network.type module
"""
import os, sys
# Change path so we find rdpy
sys.path.insert(1, os.path.join(sys.path[0], '..'))
import unittest
import rdpy.network.type
from rdpy.base.error import InvalidSize
@@ -18,9 +42,9 @@ class TypeCase(unittest.TestCase):
self.assertEqual(c.value, 5, "invalid callable const")
def test_callable_value_lambda(self):
'''
"""
@summary: test if callable value with lambda ctor return dynamic value
'''
"""
c = rdpy.network.type.CallableValue(lambda:5)
self.assertEqual(c.value, 5, "invalid callable lambda")

View File

@@ -0,0 +1,35 @@
#
# Copyright (c) 2014 Sylvain Peyrefitte
#
# This file is part of rdpy.
#
# rdpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
unit test for rdpy.protocol.rdp.x224 module
"""
import os, sys
# Change path so we find rdpy
sys.path.insert(1, os.path.join(sys.path[0], '..'))
import unittest
class X224Case(unittest.TestCase):
'''
test case for x224 layer (RDP)
'''
def test_x224_client(self):
pass

View File

@@ -0,0 +1,35 @@
#
# Copyright (c) 2014 Sylvain Peyrefitte
#
# This file is part of rdpy.
#
# rdpy is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
"""
unit test for rdpy.protocol.rfb.rfb module
"""
import os, sys
# Change path so we find rdpy
sys.path.insert(1, os.path.join(sys.path[0], '..'))
import unittest
class RfbCase(unittest.TestCase):
'''
test casefor rfb layer (vnc)
'''
def testName(self):
pass

View File

@@ -1,11 +0,0 @@
'''
@author: sylvain
'''
import unittest
class RfbCase(unittest.TestCase):
'''
test casefor rfb layer (vnc)
'''
def testName(self):
pass

View File

@@ -1,11 +0,0 @@
'''
@author: sylvain
'''
import unittest
class X224Case(unittest.TestCase):
'''
test case for x224 layer (RDP)
'''
def test_x224_client(self):
pass