diff options
| author | idle sign <idlesign@yandex.ru> | 2016-12-03 22:11:21 +0700 |
|---|---|---|
| committer | idle sign <idlesign@yandex.ru> | 2016-12-03 22:11:21 +0700 |
| commit | 06715b636916cd0a008a973d7a7cdcd16fc2feeb (patch) | |
| tree | 88beab9724593e082cae5b599558a5cf19823596 /setuptools/tests | |
| parent | ef583b282b179d46b9e9066e5714d1d37aeaff3b (diff) | |
| parent | aac9f9f31c0fdb97c52e343be6b8a641b2341232 (diff) | |
| download | python-setuptools-git-06715b636916cd0a008a973d7a7cdcd16fc2feeb.tar.gz | |
Merge branch 'remote_pypa_master' into feat/setupcfg_handling
Diffstat (limited to 'setuptools/tests')
| -rw-r--r-- | setuptools/tests/test_egg_info.py | 11 | ||||
| -rw-r--r-- | setuptools/tests/test_manifest.py | 12 | ||||
| -rw-r--r-- | setuptools/tests/test_namespaces.py | 2 | ||||
| -rw-r--r-- | setuptools/tests/test_sdist.py | 9 |
4 files changed, 30 insertions, 4 deletions
diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index 12c10497..dc41bc1f 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -4,7 +4,7 @@ import re import stat import sys -from setuptools.command.egg_info import egg_info +from setuptools.command.egg_info import egg_info, manifest_maker from setuptools.dist import Distribution from setuptools.extern.six.moves import map @@ -237,6 +237,15 @@ class TestEggInfo(object): pkginfo = os.path.join(egg_info_dir, 'PKG-INFO') assert 'Requires-Python: >=1.2.3' in open(pkginfo).read().split('\n') + def test_manifest_maker_warning_suppresion(self): + fixtures = [ + "standard file not found: should have one of foo.py, bar.py", + "standard file 'setup.py' not found" + ] + + for msg in fixtures: + assert manifest_maker._should_suppress_warning(msg) + def _run_install_command(self, tmpdir_cwd, env, cmd=None, output=None): environ = os.environ.copy().update( HOME=env.paths['home'], diff --git a/setuptools/tests/test_manifest.py b/setuptools/tests/test_manifest.py index 602c43a2..62b6d708 100644 --- a/setuptools/tests/test_manifest.py +++ b/setuptools/tests/test_manifest.py @@ -449,6 +449,11 @@ class TestFileListTest(TempDirTestCase): assert file_list.files == ['a.py', l('d/c.py')] self.assertWarnings() + file_list.process_template_line('global-include .txt') + file_list.sort() + assert file_list.files == ['a.py', 'b.txt', l('d/c.py')] + self.assertNoWarnings() + def test_global_exclude(self): l = make_local_path # global-exclude @@ -465,6 +470,13 @@ class TestFileListTest(TempDirTestCase): assert file_list.files == ['b.txt'] self.assertWarnings() + file_list = FileList() + file_list.files = ['a.py', 'b.txt', l('d/c.pyc'), 'e.pyo'] + file_list.process_template_line('global-exclude .py[co]') + file_list.sort() + assert file_list.files == ['a.py', 'b.txt'] + self.assertNoWarnings() + def test_recursive_include(self): l = make_local_path # recursive-include diff --git a/setuptools/tests/test_namespaces.py b/setuptools/tests/test_namespaces.py index 2d44ad86..28c5e9de 100644 --- a/setuptools/tests/test_namespaces.py +++ b/setuptools/tests/test_namespaces.py @@ -13,7 +13,7 @@ class TestNamespaces: @pytest.mark.xfail(sys.version_info < (3, 3), reason="Requires PEP 420") - @pytest.mark.skipif(os.environ.get("APPVEYOR"), + @pytest.mark.skipif(bool(os.environ.get("APPVEYOR")), reason="https://github.com/pypa/setuptools/issues/851") def test_mixed_site_and_non_site(self, tmpdir): """ diff --git a/setuptools/tests/test_sdist.py b/setuptools/tests/test_sdist.py index 609c7830..f34068dc 100644 --- a/setuptools/tests/test_sdist.py +++ b/setuptools/tests/test_sdist.py @@ -26,7 +26,8 @@ SETUP_ATTRS = { 'name': 'sdist_test', 'version': '0.0', 'packages': ['sdist_test'], - 'package_data': {'sdist_test': ['*.txt']} + 'package_data': {'sdist_test': ['*.txt']}, + 'data_files': [("data", [os.path.join("d", "e.dat")])], } SETUP_PY = """\ @@ -95,9 +96,12 @@ class TestSdistTest: # Set up the rest of the test package test_pkg = os.path.join(self.temp_dir, 'sdist_test') os.mkdir(test_pkg) + data_folder = os.path.join(self.temp_dir, "d") + os.mkdir(data_folder) # *.rst was not included in package_data, so c.rst should not be # automatically added to the manifest when not under version control - for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst']: + for fname in ['__init__.py', 'a.txt', 'b.txt', 'c.rst', + os.path.join(data_folder, "e.dat")]: # Just touch the files; their contents are irrelevant open(os.path.join(test_pkg, fname), 'w').close() @@ -126,6 +130,7 @@ class TestSdistTest: assert os.path.join('sdist_test', 'a.txt') in manifest assert os.path.join('sdist_test', 'b.txt') in manifest assert os.path.join('sdist_test', 'c.rst') not in manifest + assert os.path.join('d', 'e.dat') in manifest def test_defaults_case_sensitivity(self): """ |
