summaryrefslogtreecommitdiff
path: root/pbr/tests
diff options
context:
space:
mode:
authorRobert Collins <rbtcollins@hp.com>2014-09-24 10:36:06 +1200
committerRobert Collins <rbtcollins@hp.com>2015-04-15 19:06:06 +1200
commitda0f226cc461bb6555f459e3fd7b4af51ca7a63a (patch)
tree6cf96e278f75e06902e623b81a4311689a1c7cc5 /pbr/tests
parent2465a4cac7570cbf8e61456faaf44ce67a8bbc0b (diff)
downloadpbr-da0f226cc461bb6555f459e3fd7b4af51ca7a63a.tar.gz
Test that MANIFEST.in excludes work
We were not testing that MANIFEST.in excludes work. Change-Id: Id6e1d1651a930379b18e4d9efe2e3a8baa03dc12 Closes-Bug: #1373152
Diffstat (limited to 'pbr/tests')
-rw-r--r--pbr/tests/test_packaging.py9
-rw-r--r--pbr/tests/testpackage/MANIFEST.in1
-rw-r--r--pbr/tests/testpackage/pbr_testpackage/extra.py0
3 files changed, 10 insertions, 0 deletions
diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py
index 5615d28..eac76b2 100644
--- a/pbr/tests/test_packaging.py
+++ b/pbr/tests/test_packaging.py
@@ -167,6 +167,15 @@ class TestPackagingInGitRepoWithCommit(base.BaseTestCase):
# One commit, something should be in the ChangeLog list
self.assertNotEqual(body, '')
+ def test_manifest_exclude_honoured(self):
+ with open(os.path.join(
+ self.package_dir,
+ 'pbr_testpackage.egg-info/SOURCES.txt'), 'r') as f:
+ body = f.read()
+ self.assertThat(
+ body, matchers.Not(matchers.Contains('pbr_testpackage/extra.py')))
+ self.assertThat(body, matchers.Contains('pbr_testpackage/__init__.py'))
+
class TestPackagingInGitRepoWithoutCommit(base.BaseTestCase):
diff --git a/pbr/tests/testpackage/MANIFEST.in b/pbr/tests/testpackage/MANIFEST.in
index cdc95ea..2e35f3e 100644
--- a/pbr/tests/testpackage/MANIFEST.in
+++ b/pbr/tests/testpackage/MANIFEST.in
@@ -1 +1,2 @@
include data_files/*
+exclude pbr_testpackage/extra.py
diff --git a/pbr/tests/testpackage/pbr_testpackage/extra.py b/pbr/tests/testpackage/pbr_testpackage/extra.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pbr/tests/testpackage/pbr_testpackage/extra.py