Exemplo n.º 1
0
    def test_receive_wrong_cmake_path(self):
        """Wrong CMake Path Write in Current Directory"""

        under_test = VSContext()
        under_test.init(self.vs_project, '/wrong/path/to/cmake')

        # CMakeLists.txt is created in the current directory
        self.assertEqual('CMakeLists.txt', under_test.cmake)
Exemplo n.º 2
0
    def test_context_init(self):
        """Data Converter Init Files"""

        under_test = VSContext()

        self.assertEqual(under_test.cmake, '')
        self.assertEqual(under_test.xml_data, {})

        under_test.init(self.vs_project, self.cur_dir)

        self.assertNotEqual(under_test.cmake, '')
Exemplo n.º 3
0
    def test_create_data(self):
        """Data Converter Create Data"""

        # FIXME: No such file or directory: 'CMakeLists.txt'
        return

        under_test = DataConverter()

        context = VSContext()
        context.init(self.vs_project, self.cur_dir)

        old_cmake = open('CMakeLists.txt', 'r')

        under_test.convert(context)

        new_cmake = open('CMakeLists.txt', 'r')

        # Assert content is not the same after
        self.assertEqual(old_cmake.read(), new_cmake.read())

        old_cmake.close()
        new_cmake.close()