def test_channel_matching(self): # TODO: I don't know if this invariance for multi-channels should actually hold true # it might have to for backward compatibility # but more ideally, the first would be true, and the second would be false # (or maybe it's the other way around) assert ChannelMatch("https://repo.continuum.io/pkgs/free").match('defaults') is True assert ChannelMatch("defaults").match("https://repo.continuum.io/pkgs/free") is True assert ChannelMatch("https://conda.anaconda.org/conda-forge").match('conda-forge') is True assert ChannelMatch("conda-forge").match("https://conda.anaconda.org/conda-forge") is True assert ChannelMatch("https://repo.continuum.io/pkgs/free").match('conda-forge') is False
def test_channel_matching(self): assert ChannelMatch('pkgs/free').match('defaults') is False assert ChannelMatch('defaults').match('pkgs/free') is True assert ChannelMatch("https://repo.anaconda.com/pkgs/free").match('defaults') is False assert ChannelMatch("defaults").match("https://repo.anaconda.com/pkgs/free") is True assert ChannelMatch("https://conda.anaconda.org/conda-forge").match('conda-forge') is True assert ChannelMatch("conda-forge").match("https://conda.anaconda.org/conda-forge") is True assert ChannelMatch("https://repo.anaconda.com/pkgs/free").match('conda-forge') is False assert str(MatchSpec("pkgs/free::*")) == "pkgs/free::*" assert str(MatchSpec("defaults::*")) == "defaults::*"
def test_channel_matching(self): with env_unmodified(conda_tests_ctxt_mgmt_def_pol): assert ChannelMatch('pkgs/main').match('defaults') is False assert ChannelMatch('defaults').match('pkgs/main') is True assert ChannelMatch("https://repo.anaconda.com/pkgs/main").match('defaults') is False assert ChannelMatch("defaults").match("https://repo.anaconda.com/pkgs/main") is True assert ChannelMatch("https://conda.anaconda.org/conda-forge").match('conda-forge') is True assert ChannelMatch("conda-forge").match("https://conda.anaconda.org/conda-forge") is True assert ChannelMatch("https://repo.anaconda.com/pkgs/main").match('conda-forge') is False assert str(MatchSpec("pkgs/main::*")) == "pkgs/main::*" assert str(MatchSpec("defaults::*")) == "defaults::*"