Esempio n. 1
0
 def test_source_model(self):
     tempdir = tempfile.mkdtemp()
     dest = os.path.join(tempdir, 'source_model.xml')
     shutil.copy(os.path.join(self.TESTDIR, 'source_model.xml'), tempdir)
     with Print.patch() as p:
         reduce(dest, 0.5)
     self.assertIn('Extracted 9 nodes out of 15', str(p))
     shutil.rmtree(tempdir)
Esempio n. 2
0
 def test_source_model(self):
     tempdir = tempfile.mkdtemp()
     dest = os.path.join(tempdir, 'source_model.xml')
     shutil.copy(os.path.join(self.TESTDIR, 'source_model.xml'), tempdir)
     with Print.patch() as p:
         reduce(dest, 0.5)
     self.assertIn('Extracted 9 nodes out of 15', str(p))
     shutil.rmtree(tempdir)
Esempio n. 3
0
 def test_sites_csv(self):
     testdir = os.path.dirname(case_5.__file__)
     tempdir = tempfile.mkdtemp()
     dest = os.path.join(tempdir, 'sites.csv')
     shutil.copy(os.path.join(testdir, 'sites.csv'), tempdir)
     with Print.patch() as p:
         reduce(dest, 0.5)
     self.assertIn('Extracted 50 lines out of 100', str(p))
     shutil.rmtree(tempdir)
Esempio n. 4
0
 def test_site_model(self):
     testdir = os.path.dirname(case_4.__file__)
     tempdir = tempfile.mkdtemp()
     dest = os.path.join(tempdir, 'site_model.xml')
     shutil.copy(os.path.join(testdir, 'site_model.xml'), tempdir)
     with Print.patch() as p:
         reduce(dest, 0.5)
     self.assertIn('Extracted 2 nodes out of 3', str(p))
     shutil.rmtree(tempdir)
Esempio n. 5
0
 def test_sites_csv(self):
     testdir = os.path.dirname(case_5.__file__)
     tempdir = tempfile.mkdtemp()
     dest = os.path.join(tempdir, 'sites.csv')
     shutil.copy(os.path.join(testdir, 'sites.csv'), tempdir)
     with Print.patch() as p:
         reduce(dest, 0.5)
     self.assertIn('Extracted 50 lines out of 100', str(p))
     shutil.rmtree(tempdir)
Esempio n. 6
0
 def test_site_model(self):
     testdir = os.path.dirname(case_4.__file__)
     tempdir = tempfile.mkdtemp()
     dest = os.path.join(tempdir, 'site_model.xml')
     shutil.copy(os.path.join(testdir, 'site_model.xml'), tempdir)
     with Print.patch() as p:
         reduce(dest, 0.5)
     self.assertIn('Extracted 2 nodes out of 3', str(p))
     shutil.rmtree(tempdir)