def test_resample_100(nex2): nexus_obj = shufflenexus(nex2, 100) assert len(nexus_obj.characters) == 100 assert sorted(nexus_obj.taxa) == \ ['George', 'John', 'Paul', 'Ringo']
def test_output(nex2): nexus_obj = shufflenexus(nex2) assert isinstance(nexus_obj, NexusWriter)
def test_exception_resample_negativeinteger(nex2): with pytest.raises(ValueError): shufflenexus(nex2, -1)
def test_exception_resample_badinteger(nex2): with pytest.raises(ValueError): shufflenexus(nex2, 0)
def test_resample_100(self): nexus_obj = shufflenexus(self.nexus_obj, 100) assert len(nexus_obj.characters) == 100 assert sorted(nexus_obj.taxa) == \ ['George', 'John', 'Paul', 'Ringo']
def test_resample_1(self): nexus_obj = shufflenexus(self.nexus_obj, 1) assert len(nexus_obj.characters) == 1 assert sorted(nexus_obj.taxa) == \ ['George', 'John', 'Paul', 'Ringo']
def test_output(self): nexus_obj = shufflenexus(self.nexus_obj) assert isinstance(nexus_obj, NexusWriter)