def test_finds_config(runner: CliRunner, mocker, tmpdir):
    (tmpdir / 'myconf.toml').write_binary(b'\n[tool.slotscheck]\nrequire-superclass = false\n')
    mocker.patch('slotscheck.config.find_config_file', return_value=Path((tmpdir / 'myconf.toml')))
    result = runner.invoke(cli, ['-m', 'module_not_ok'])
    assert (result.exit_code == 1)
    assert (result.output == "ERROR: 'module_not_ok.foo:U.Ua' defines overlapping slots.\nERROR: 'module_not_ok.foo:U.Ub' defines overlapping slots.\nERROR: 'module_not_ok.foo:W' defines overlapping slots.\nERROR: 'module_not_ok.foo:Z' has duplicate slots.\nERROR: 'module_not_ok.foo:Za' defines overlapping slots.\nOh no, found some problems!\nScanned 4 module(s), 28 class(es).\n")
def test_finds_config(runner: CliRunner, mocker, tmpdir):
    (tmpdir / 'myconf.toml').write_binary(b'\n[tool.slotscheck]\nrequire-superclass = false\n')
    mocker.patch('slotscheck.config.find_config_file', return_value=Path((tmpdir / 'myconf.toml')))
    result = runner.invoke(cli, ['-m', 'module_not_ok'])
    assert (result.exit_code == 1)
    assert (result.output == "ERROR: 'module_not_ok.foo:U.Ua' defines overlapping slots.\nERROR: 'module_not_ok.foo:U.Ub' defines overlapping slots.\nERROR: 'module_not_ok.foo:W' defines overlapping slots.\nERROR: 'module_not_ok.foo:Z' has duplicate slots.\nERROR: 'module_not_ok.foo:Za' defines overlapping slots.\nOh no, found some problems!\nScanned 4 module(s), 28 class(es).\n")