Skip to content

Commit 225a855

Browse files
[FIX] Possible fix for broken TestManifestInclusion suite (- WIP #131 -)
Changes in file Makefile: - target "test" now depends on MANIFEST.in - target "test-pytest" now depends on MANIFEST.in and test-reqs - target "test-tox" now depends on MANIFEST.in through build (no change was needed) Changes in file tests/test_manifest.py: - removed debugging from "test_sdist_includes_required_files"
1 parent 4fa474b commit 225a855

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ purge: clean uninstall
211211
$(QUIET)$(RMDIR) ./test-reports/ 2>$(ERROR_LOG_PATH) || :
212212
$(QUIET)$(ECHO) "$@: Done."
213213

214-
test: cleanup
214+
test: cleanup MANIFEST.in
215215
$(QUIET)$(COVERAGE) run -p --source=multicast -m unittest discover --verbose --buffer -s ./tests -t $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) || $(PYTHON) -m unittest discover --verbose --buffer -s ./tests -t ./ || DO_FAIL="exit 2" ;
216216
$(QUITE)$(WAIT) ;
217217
$(QUIET)$(DO_FAIL) ;
@@ -237,7 +237,7 @@ docs-reqs: ./docs/ ./docs/requirements.txt init
237237
$(QUIET)$(PYTHON) -m pip install $(PIP_COMMON_FLAGS) $(PIP_ENV_FLAGS) -r docs/requirements.txt 2>$(ERROR_LOG_PATH) || : ;
238238
$(QUIET)$(WAIT) ;
239239

240-
test-pytest: cleanup must_have_pytest test-reports
240+
test-pytest: cleanup MANIFEST.in must_have_pytest test-reports
241241
$(QUIET)$(PYTHON) -m pytest --cache-clear --doctest-glob=multicast/*.py,tests/*.py --doctest-modules --cov=. --cov-append --cov-report=xml --junitxml=test-reports/junit.xml -v --rootdir=. || DO_FAIL="exit 2" ;
242242
$(QUITE)$(WAIT) ;
243243
$(QUIET)$(DO_FAIL) ;

tests/test_manifest.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ class TestManifestInclusion(BasicUsageTestSuite):
4747
def setUp(self):
4848
super(TestManifestInclusion, self).setUp()
4949
# Arguments need to build
50-
build_arguments = [
50+
clean_arguments = [
5151
str("{} -m coverage run").format(_sys.executable),
5252
'setup.py', 'clean', '--all'
5353
]
5454
# Clean previous builds
55-
theBuildtxt = context.checkPythonCommand(build_arguments, stderr=subprocess.STDOUT)
56-
self.assertIn(str("running clean"), str(theBuildtxt))
55+
theCleantxt = context.checkPythonCommand(clean_arguments, stderr=subprocess.STDOUT)
56+
self.assertIn(str("running clean"), str(theCleantxt))
5757

5858
def test_sdist_includes_required_files(self):
5959
"""Test that the source distribution includes all required files."""
@@ -68,9 +68,6 @@ def test_sdist_includes_required_files(self):
6868
dist_dir = _os.path.join(_os.getcwd(), 'dist')
6969
dist_files = sorted(_os.listdir(dist_dir), reverse=True)
7070
self.assertTrue(len(dist_files) > 0, 'No files found in dist directory.')
71-
print("")
72-
print(str(dist_files))
73-
print("")
7471
sdist_path = _os.path.join(dist_dir, dist_files[0])
7572
# Open the tar.gz file and inspect contents
7673
with tarfile.open(sdist_path, 'r:gz') as tar:

0 commit comments

Comments
 (0)