From 903c0d6a3bda96a0b193cc6efd2f8e868d4d82e2 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jan 2015 17:35:05 -0500 Subject: Use namespacing for easier reading --- setuptools/tests/test_build_ext.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'setuptools/tests/test_build_ext.py') diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index a92e53ae..32e4ad40 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -1,7 +1,8 @@ """build_ext tests """ import unittest -from distutils.command.build_ext import build_ext as distutils_build_ext +import distutils.command.build_ext as orig + from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution @@ -15,5 +16,5 @@ class TestBuildExtTest(unittest.TestCase): cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' res = cmd.get_ext_filename('foo') - wanted = distutils_build_ext.get_ext_filename(cmd, 'foo') + wanted = orig.build_ext.get_ext_filename(cmd, 'foo') assert res == wanted -- cgit v1.2.1 From 615fc93eba554dba65b3545ead2405014e2a4af8 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jan 2015 17:35:37 -0500 Subject: Remodel comment as docstring. --- setuptools/tests/test_build_ext.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'setuptools/tests/test_build_ext.py') diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 32e4ad40..cc8a35e5 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -9,9 +9,11 @@ from setuptools.dist import Distribution class TestBuildExtTest(unittest.TestCase): def test_get_ext_filename(self): - # setuptools needs to give back the same - # result than distutils, even if the fullname - # is not in ext_map + """ + Setuptools needs to give back the same + result as distutils, even if the fullname + is not in ext_map. + """ dist = Distribution() cmd = build_ext(dist) cmd.ext_map['foo/bar'] = '' -- cgit v1.2.1 From 359a80897decd64a0d997005dc7cb731fc294133 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jan 2015 17:36:29 -0500 Subject: Use pytest for test discovery in build_ext --- setuptools/tests/test_build_ext.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'setuptools/tests/test_build_ext.py') diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index cc8a35e5..3f356aca 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -1,12 +1,11 @@ """build_ext tests """ -import unittest import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution -class TestBuildExtTest(unittest.TestCase): +class TestBuildExt: def test_get_ext_filename(self): """ -- cgit v1.2.1 From 64a3d8b243a2c41dc43b29567652518f1b08992d Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Thu, 1 Jan 2015 17:36:49 -0500 Subject: Remove superfluous comment --- setuptools/tests/test_build_ext.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'setuptools/tests/test_build_ext.py') diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py index 3f356aca..0719ba44 100644 --- a/setuptools/tests/test_build_ext.py +++ b/setuptools/tests/test_build_ext.py @@ -1,12 +1,9 @@ -"""build_ext tests -""" import distutils.command.build_ext as orig from setuptools.command.build_ext import build_ext from setuptools.dist import Distribution class TestBuildExt: - def test_get_ext_filename(self): """ Setuptools needs to give back the same -- cgit v1.2.1