Ejemplo n.º 1
0
    def test_get_result_path(self):
        """Tests scfg result path"""

        s = scfg(InputHandler='_input_as_lines')
        res = s(self.input)
        self.assertEqualItems(res.keys(),['StdOut','StdErr','ExitStatus'])
        self.assertEqual(res['ExitStatus'],0)

        res.cleanUp()
Ejemplo n.º 2
0
    def test_input_as_lines(self):
        """Test scfg input as lines"""

        s = scfg(InputHandler='_input_as_lines')
        res = s(self.input)

        self.assertEqual(res['ExitStatus'],0)
        assert res['StdOut'] is not None
        res.cleanUp()
Ejemplo n.º 3
0
    def test_get_result_path(self):
        """Tests scfg result path"""

        s = scfg(InputHandler='_input_as_lines')
        res = s(self.input)
        self.assertEqualItems(res.keys(),['StdOut','StdErr','ExitStatus'])
        self.assertEqual(res['ExitStatus'],0)

        res.cleanUp()
Ejemplo n.º 4
0
    def test_input_as_lines(self):
        """Test scfg input as lines"""

        s = scfg(InputHandler='_input_as_lines')
        res = s(self.input)

        self.assertEqual(res['ExitStatus'],0)
        assert res['StdOut'] is not None
        res.cleanUp()
Ejemplo n.º 5
0
    def test_input_as_string(self):
        """Test scfg input as string"""

        s = scfg()
        f = open('/tmp/single.col','w')
        txt = '\n'.join([str(i).strip('\n') for i in self.input])
        f.write(txt)
        f.close()
        res = s('/tmp/single.col')

        self.assertEqual(res['ExitStatus'],0)
        assert res['StdOut'] is not None
        res.cleanUp()
        remove('/tmp/single.col')
Ejemplo n.º 6
0
    def test_input_as_string(self):
        """Test scfg input as string"""

        s = scfg()
        f = open('/tmp/single.col','w')
        txt = '\n'.join([str(i).strip('\n') for i in self.input])
        f.write(txt)
        f.close()
        res = s('/tmp/single.col')

        self.assertEqual(res['ExitStatus'],0)
        assert res['StdOut'] is not None
        res.cleanUp()
        remove('/tmp/single.col')