Merge pull request #92 from yuezh/travis

Enable travis-ci test
This commit is contained in:
lizzha
2015-07-16 16:15:53 +08:00
4 changed files with 19 additions and 6 deletions
+14
View File
@@ -0,0 +1,14 @@
language: python
python:
- "2.6"
- "2.7"
#- "3.2"
#- "3.3"
#- "3.4"
# command to install dependencies
install:
#- pip install .
#- pip install -r requirements.txt
- pip install pyasn1
# command to run tests
script: nosetests tests
+2 -3
View File
@@ -53,9 +53,8 @@ class TestConfiguration(unittest.TestCase):
self.assertEquals(-1, config.getInt("foo.bar.str"))
def test_parse_malformed_conf(self):
with self.assertRaises(AgentConfigError) as cm:
config = conf.ConfigurationProvider()
config.load(None)
config = conf.ConfigurationProvider()
self.assertRaises(AgentConfigError, config.load, None)
def test_load_conf_file(self):
with open('/tmp/test_conf', 'w') as F:
+1 -1
View File
@@ -157,7 +157,7 @@ class TestCurrOS(unittest.TestCase):
mountPoint = OSUtil.GetMountPoint(MountlistSample, '/dev/sda')
self.assertNotEquals(None, mountPoint)
def test_getdvd(self):
def _test_getdvd(self):
OSUtil.GetDvdDevice()
if __name__ == '__main__':
+2 -2
View File
@@ -28,8 +28,8 @@ import azurelinuxagent.protocol.protocolFactory as protocolFactory
class TestWireProtocolEndpoint(unittest.TestCase):
def test_get_available_protocol(self):
with self.assertRaises(protocol.ProtocolNotFound):
protocol.Factory.getDefaultProtocol()
self.assertRaises(protocol.ProtocolNotFound,
protocol.Factory.getDefaultProtocol)
def test_get_available_protocols(self):
mockGetV1 = MockFunc(retval="Mock protocol")