[python-pdal] 07/09: Add patch to skip tests for missing test data.

Bas Couwenberg sebastic at debian.org
Thu Dec 15 21:35:31 UTC 2016


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to branch master
in repository python-pdal.

commit b3ca05db3a6d284dbe4637886b485ac62dbf21ae
Author: Bas Couwenberg <sebastic at xs4all.nl>
Date:   Thu Dec 15 22:25:47 2016 +0100

    Add patch to skip tests for missing test data.
---
 debian/changelog                                 |  1 +
 debian/patches/series                            |  1 +
 debian/patches/skip-tests-for-missing-data.patch | 67 ++++++++++++++++++++++++
 3 files changed, 69 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b45ace9..8253bb4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,7 @@ python-pdal (1.4.0+ds-1) UNRELEASED; urgency=medium
   * Require at least PDAL 1.4.0.
   * Refresh patches.
   * Update copyright years in copyright file.
+  * Add patch to skip tests for missing test data.
 
  -- Bas Couwenberg <sebastic at debian.org>  Thu, 15 Dec 2016 20:41:03 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
index 66989c0..9545438 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 pdal-python-version.patch
+skip-tests-for-missing-data.patch
diff --git a/debian/patches/skip-tests-for-missing-data.patch b/debian/patches/skip-tests-for-missing-data.patch
new file mode 100644
index 0000000..4f37620
--- /dev/null
+++ b/debian/patches/skip-tests-for-missing-data.patch
@@ -0,0 +1,67 @@
+Description: Skip tests for missing test data.
+Author: Bas Couwenberg <sebastic at debian.org>
+
+--- a/test/test_pipeline.py
++++ b/test/test_pipeline.py
+@@ -32,14 +32,14 @@ class TestPipeline(unittest.TestCase):
+         return output
+ 
+     @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/sort.json')),
+-                         os.path.join(DATADIRECTORY, 'data/pipeline/sort.json'))
++                         "missing test data")
+     def test_construction(self):
+         """Can we construct a PDAL pipeline"""
+         json = self.fetch_json('/data/pipeline/sort.json')
+         r = pdal.Pipeline(json)
+ 
+     @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/sort.json')),
+-                           "missing test data")
++                         "missing test data")
+     def test_execution(self):
+         """Can we execute a PDAL pipeline"""
+         x = self.fetch_json('/data/pipeline/sort.json')
+@@ -67,6 +67,8 @@ class TestPipeline(unittest.TestCase):
+         self.assertAlmostEqual(a[0][0], 635619.85, 7)
+         self.assertAlmostEqual(a[1064][2], 456.92, 7)
+ 
++    @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/sort.json')),
++                         "missing test data")
+     def test_metadata(self):
+         """Can we fetch PDAL metadata"""
+         json = self.fetch_json('/data/pipeline/sort.json')
+@@ -78,6 +80,8 @@ class TestPipeline(unittest.TestCase):
+         self.assertEqual(j["metadata"]["readers.las"]["count"], 1065)
+ 
+ 
++    @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/sort.json')),
++                         "missing test data")
+     def test_no_execute(self):
+         """Does fetching arrays without executing throw an exception"""
+         json = self.fetch_json('/data/pipeline/sort.json')
+@@ -85,6 +89,8 @@ class TestPipeline(unittest.TestCase):
+         with self.assertRaises(RuntimeError):
+             r.arrays
+ 
++    @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/reproject.json')),
++                         "missing test data")
+     def test_logging(self):
+         """Can we fetch log output"""
+         json = self.fetch_json('/data/pipeline/reproject.json')
+@@ -94,6 +100,8 @@ class TestPipeline(unittest.TestCase):
+         self.assertEqual(count, 789)
+         self.assertEqual(r.log.split()[0], '(pypipeline')
+ 
++    @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/pipeline/sort.json')),
++                         "missing test data")
+     def test_schema(self):
+         """Fetching a schema works"""
+         json = self.fetch_json('/data/pipeline/sort.json')
+@@ -102,7 +110,7 @@ class TestPipeline(unittest.TestCase):
+         self.assertEqual(r.schema['schema']['dimensions'][0]['name'], 'X')
+ 
+     @unittest.skipUnless(os.path.exists(os.path.join(DATADIRECTORY, 'data/filters/chip.json')),
+-                           "missing test data")
++                         "missing test data")
+     def test_merged_arrays(self):
+         """Can we fetch multiple point views from merged PDAL data """
+         json = self.fetch_json('/data/filters/chip.json')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/python-pdal.git



More information about the Pkg-grass-devel mailing list