def test_groups(): """Test NgdConfig.groups getters/setters.""" config = NgdConfig() assert config.groups == SUPPORTED_TAXONOMIC_GROUPS config.groups = ['bacteria', 'fungi'] assert config.groups == ['bacteria', 'fungi'] config.groups = "all" assert config.groups == SUPPORTED_TAXONOMIC_GROUPS with pytest.raises(ValueError): config.groups = "garbage" # No metagenomes in refseq with pytest.raises(ValueError): config.section = "refseq" config.groups = "metagenomes" # genbank has metagenomes config.section = "genbank" config.groups = "metagenomes"
def test_section(): """Test NgdConfig.section getters/setters.""" config = NgdConfig() with pytest.raises(ValueError): config.section = 'garbage'