Skip to content

Commit d1bbe46

Browse files
committed
Removing commented code
1 parent 19b4fe3 commit d1bbe46

File tree

1 file changed

+0
-94
lines changed

1 file changed

+0
-94
lines changed

qiita_db/metadata_template/test/test_sample_template.py

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,100 +1800,6 @@ def test_extend_update(self):
18001800
for s_id in exp_sample_ids:
18011801
self.assertEqual(st[s_id]._to_dict(), exp_dict[s_id])
18021802

1803-
# def test_extend_and_update(self):
1804-
# st = qdb.metadata_template.sample_template.SampleTemplate.create(
1805-
# self.metadata, self.new_study)
1806-
# self.metadata_dict['Sample4'] = {
1807-
# 'physical_specimen_location': 'location1',
1808-
# 'physical_specimen_remaining': 'true',
1809-
# 'dna_extracted': 'true',
1810-
# 'sample_type': 'type1',
1811-
# 'collection_timestamp': '2014-05-29 12:24:15',
1812-
# 'host_subject_id': 'NotIdentified',
1813-
# 'Description': 'Test Sample 4',
1814-
# 'latitude': '42.42',
1815-
# 'longitude': '41.41',
1816-
# 'taxon_id': '9606',
1817-
# 'scientific_name': 'homo sapiens'}
1818-
#
1819-
# # Change a couple of values on the existent samples to test that
1820-
# # they actually change
1821-
# self.metadata_dict['Sample1']['Description'] = 'Changed'
1822-
# self.metadata_dict['Sample2']['dna_extracted'] = 'Changed dynamic'
1823-
#
1824-
# md_ext = pd.DataFrame.from_dict(self.metadata_dict, orient='index',
1825-
# dtpye=str)
1826-
# md_ext['TOT_NITRO'] = pd.Series(['val1', 'val2', 'val3', 'val4'],
1827-
# index=md_ext.index)
1828-
#
1829-
# npt.assert_warns(qdb.exceptions.QiitaDBWarning, st.extend, md_ext)
1830-
#
1831-
# exp_sample_ids = {"%s.Sample1" % st.id, "%s.Sample2" % st.id,
1832-
# "%s.Sample3" % st.id, "%s.Sample4" % st.id}
1833-
# self.assertEqual(st._get_sample_ids(), exp_sample_ids)
1834-
# self.assertEqual(len(st), 4)
1835-
# exp_categories = {'collection_timestamp', 'description',
1836-
# 'dna_extracted', 'host_subject_id', 'latitude',
1837-
# 'longitude', 'physical_specimen_location',
1838-
# 'physical_specimen_remaining', 'sample_type',
1839-
# 'scientific_name', 'taxon_id', 'tot_nitro'}
1840-
# self.assertItemsEqual(st.categories(), exp_categories)
1841-
# exp_dict = {
1842-
# "%s.Sample1" % st.id: {
1843-
# 'collection_timestamp': '2014-05-29 12:24:15',
1844-
# 'description': "Changed",
1845-
# 'dna_extracted': 'true',
1846-
# 'host_subject_id': "NotIdentified",
1847-
# 'latitude': '42.42',
1848-
# 'longitude': '41.41',
1849-
# 'physical_specimen_location': "location1",
1850-
# 'physical_specimen_remaining': 'true',
1851-
# 'sample_type': "type1",
1852-
# 'taxon_id': '9606',
1853-
# 'scientific_name': 'homo sapiens',
1854-
# 'tot_nitro': 'val1'},
1855-
# "%s.Sample2" % st.id: {
1856-
# 'collection_timestamp': '2014-05-29 12:24:15',
1857-
# 'description': "Test Sample 2",
1858-
# 'dna_extracted': 'Changed dynamic',
1859-
# 'host_subject_id': "NotIdentified",
1860-
# 'latitude': '4.2',
1861-
# 'longitude': '1.1',
1862-
# 'physical_specimen_location': "location1",
1863-
# 'physical_specimen_remaining': 'true',
1864-
# 'sample_type': "type1",
1865-
# 'taxon_id': '9606',
1866-
# 'scientific_name': 'homo sapiens',
1867-
# 'tot_nitro': 'val2'},
1868-
# "%s.Sample3" % st.id: {
1869-
# 'collection_timestamp': '2014-05-29 12:24:15',
1870-
# 'description': "Test Sample 3",
1871-
# 'dna_extracted': 'true',
1872-
# 'host_subject_id': "NotIdentified",
1873-
# 'latitude': '4.8',
1874-
# 'longitude': '4.41',
1875-
# 'physical_specimen_location': "location1",
1876-
# 'physical_specimen_remaining': 'true',
1877-
# 'sample_type': "type1",
1878-
# 'taxon_id': '9606',
1879-
# 'scientific_name': 'homo sapiens',
1880-
# 'tot_nitro': 'val3'},
1881-
# '%s.Sample4' % st.id: {
1882-
# 'physical_specimen_location': 'location1',
1883-
# 'physical_specimen_remaining': 'true',
1884-
# 'dna_extracted': 'true',
1885-
# 'sample_type': 'type1',
1886-
# 'collection_timestamp': '2014-05-29 12:24:15',
1887-
# 'host_subject_id': 'NotIdentified',
1888-
# 'description': 'Test Sample 4',
1889-
# 'latitude': '42.42',
1890-
# 'longitude': '41.41',
1891-
# 'taxon_id': '9606',
1892-
# 'scientific_name': 'homo sapiens',
1893-
# 'tot_nitro': 'val4'}}
1894-
# for s_id in exp_sample_ids:
1895-
# self.assertEqual(st[s_id]._to_dict(), exp_dict[s_id])
1896-
18971803
def test_to_dataframe(self):
18981804
st = qdb.metadata_template.sample_template.SampleTemplate.create(
18991805
self.metadata, self.new_study)

0 commit comments

Comments
 (0)