summaryrefslogtreecommitdiff
path: root/setuptools/tests/test_register.py
blob: ed85e9bbd3d82e55871f77565bd1700d152c030e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from setuptools.command.register import register
from setuptools.dist import Distribution
from setuptools.errors import RemovedCommandError

from unittest import mock

import pytest


class TestRegister:
    def test_register_exception(self):
        """Ensure that the register command has been properly removed."""
        dist = Distribution()
        dist.dist_files = [(mock.Mock(), mock.Mock(), mock.Mock())]

        cmd = register(dist)

        with pytest.raises(RemovedCommandError):
            cmd.run()