예제 #1
0
    def test_path(self):
        self._run_cheesecake('--path %s' % NOSE_PATH)

        self._assert_success()

        # Make sure that appropriate indices have been counted.
        stdout = read_file_contents(self.stdout_name)
        assert pad_msg('unpack', IndexUnpack.max_value) in stdout
        assert pad_msg('unpack_dir', IndexUnpackDir.max_value) in stdout
        assert pad_msg('install', IndexInstall.max_value) in stdout
예제 #2
0
    def test_name(self):
        self._run_cheesecake('--name nose')

        self._assert_success()

        # Make sure that appropriate indices have been counted.
        stdout = read_file_contents(self.stdout_name)
        assert pad_msg('unpack', IndexUnpack.max_value) in stdout
        assert pad_msg('install', IndexInstall.max_value) in stdout
        # PyPI score can be lowered by penalties, so we don't include score check here.
        assert 'py_pi_download' in stdout
예제 #3
0
    def test_url(self):
        self._run_cheesecake('--url http://www.agilistas.org/cheesecake/nose-0.8.3.tar.gz')

        self._assert_success()

        # Make sure that appropriate indices have been counted.
        stdout = read_file_contents(self.stdout_name)
        assert pad_msg('unpack', IndexUnpack.max_value) in stdout
        assert pad_msg('unpack_dir', IndexUnpackDir.max_value) in stdout
        assert pad_msg('install', IndexInstall.max_value) in stdout
        assert pad_msg('url_download', IndexUrlDownload.max_value) in stdout
예제 #4
0
    def test_required_files(self):
        self._run_cheesecake('-p %s' % os.path.join(DATA_PATH, 'required.tar.gz'))

        self._assert_success()

        stdout = read_file_contents(self.stdout_name)
        # Files in package: INSTALL, Install.html, README and TODO.
        assert '(2 files and 0 required directories found)' in stdout
        # One not documented module with a single function with a docstring.
        assert '(found 1/2=50.00% objects with docstrings)' in stdout
        assert pad_msg('docstrings', 50) in stdout
        assert '(found 0/2=0.00% objects with formatted docstrings)' in stdout