Ejemplo n.º 1
0
    def runTest(self):
        assert copy_file(self._get_source_file_name(),
                         self._get_target_file_name())
        fd = open(self._get_target_file_name())
        contents = fd.read()
        fd.close()
        assert contents == 'test'

        assert not copy_file(self._get_source_file_name(),
                             self._get_target_file_name())
Ejemplo n.º 2
0
    def runTest(self):
        assert copy_file(
                   self._get_source_file_name(),
                   self._get_target_file_name()
               )
        fd = open(self._get_target_file_name())
        contents = fd.read()
        fd.close()
        assert contents == 'test'

        assert not copy_file(
                       self._get_source_file_name(),
                       self._get_target_file_name()
                   )
Ejemplo n.º 3
0
            write_file(file_path, locals()[file_ext], force=options.force)

            if ypy_dir_path is not None:
                ypy_file_path = \
                    path_join(
                        ypy_dir_path,
                        'share',
                        'yield',
                        'dist',
                        #path_sep.join(project_name.split('.')),
                        path_split(file_path)[1]
                    )

                if exists(ypy_file_path):
                    copy_file(file_path, ypy_file_path)

    if ypy_dir_path is not None:
        copy_file(
            path_join(YIELD_INCLUDE_DIR_PATH, 'ygi.h'),
            path_join(
                ypy_dir_path,
                'share',
                'yield',
                'dist',
                'ygi.h'
            )
        )

if options.format_src:
    source_paths = {