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 196 nodes out of 398', str(p))
     shutil.rmtree(tempdir)
Exemple #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)
 def test_exposure(self):
     tempdir = tempfile.mkdtemp()
     dest = os.path.join(tempdir, 'exposure_model.xml')
     shutil.copy(os.path.join(self.TESTDIR, 'exposure_model.xml'), dest)
     with Print.patch() as p:
         reduce(dest, 0.5)
     self.assertIn('Extracted 182 nodes out of 375', str(p))
     shutil.rmtree(tempdir)
Exemple #4
0
 def test_exposure(self):
     tempdir = tempfile.mkdtemp()
     dest = os.path.join(tempdir, 'exposure_model.xml')
     shutil.copy(os.path.join(self.TESTDIR, 'exposure_model.xml'), dest)
     with Print.patch() as p:
         reduce(dest, 0.5)
     self.assertIn('Extracted 182 nodes out of 375', str(p))
     shutil.rmtree(tempdir)
 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)
 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)
Exemple #7
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)
Exemple #8
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)