witty-crayon-22786
04/20/2016, 9:45 PMbillowy-beach-68498
04/20/2016, 9:45 PMbillowy-beach-68498
04/20/2016, 9:46 PMenough-analyst-54434
04/20/2016, 9:47 PMwitty-crayon-22786
04/20/2016, 9:48 PMmammoth-pharmacist-54215
04/20/2016, 9:52 PMbillowy-beach-68498
04/20/2016, 9:53 PMwitty-crayon-22786
04/20/2016, 9:54 PMbillowy-beach-68498
04/20/2016, 9:55 PMfull-kilobyte-93429
04/20/2016, 9:55 PMDerivedClass
in your example but if BaseClass
extends further from other class,will need to do the samewitty-crayon-22786
04/20/2016, 9:55 PMsuper
to be executed, so that's not true.witty-crayon-22786
04/20/2016, 9:56 PMlimited-country-20626
04/20/2016, 9:59 PMmammoth-pharmacist-54215
04/20/2016, 10:03 PMmammoth-pharmacist-54215
04/20/2016, 10:03 PMwitty-crayon-22786
04/20/2016, 10:05 PMdef my_method(self):
super(MyClass, self).my_method()
pass
witty-crayon-22786
04/20/2016, 10:05 PMbillowy-beach-68498
04/20/2016, 10:06 PMclass ProjectTreeTestBase(AbstractClass):
@abstractmethod
def mk_project_tree(self, build_root, ignore_patterns=[]):
"""Construct a ProjectTree for the given build_root path."""
pass
def make_base_dir(self):
"""
:API: public
"""
return tempfile.mkdtemp()
def fullpath(self, path):
"""
:API: public
"""
return os.path.join(self.root_dir, path)
def makedirs(self, path):
"""
:API: public
"""
safe_mkdir(self.fullpath(path))
def touch(self, path):
"""
:API: public
"""
touch(self.fullpath(path))
def rmdirs(self, path):
"""
:API: public
"""
shutil.rmtree(path)
class PantsIgnoreTestBase(ProjectTreeTestBase):
def setUp(self):
"""
:API: public
"""
self.base_dir = self.make_base_dir()
self.root_dir = os.path.join(self.base_dir, 'root')
# make 'root/'
self.makedirs('')
# make 'root/...'
self.touch('apple')
self.touch('orange')
self.touch('banana')
# make 'root/fruit/'
self.makedirs('fruit')
# make 'root/fruit/...'
self.touch('fruit/apple')
self.touch('fruit/orange')
self.touch('fruit/banana')
# make 'root/fruit/fruit/'
self.makedirs('fruit/fruit')
# make 'root/fruit/fruit/...'
self.touch('fruit/fruit/apple')
self.touch('fruit/fruit/orange')
self.touch('fruit/fruit/banana')
self.makedirs('grocery')
self.touch('grocery/fruit')
self.cwd = os.getcwd()
os.chdir(self.root_dir)
def tearDown(self):
"""
:API: public
"""
os.chdir(self.cwd)
self.rmdirs(self.base_dir)
def test_ignore_pattern_blank_line(self):
self._project_tree = self.mk_project_tree(self.root_dir, [""])
files_list = []
for root, dirs, files in self._project_tree.walk(''):
for file in files:
files_list.append(os.path.join(root, file))
……..
class FileSystemPantsIgnoreTest(unittest.TestCase, PantsIgnoreTestBase):
def mk_project_tree(self, build_root, ignore_patterns=[]):
return FileSystemProjectTree(build_root, ignore_patterns)
full-kilobyte-93429
04/20/2016, 10:07 PMrough-minister-58256
04/20/2016, 10:07 PMbillowy-beach-68498
04/20/2016, 10:07 PMfull-kilobyte-93429
04/20/2016, 10:08 PMmultiprocess
engine test, upgrading to a newer version worked, will send a rbbillowy-beach-68498
04/20/2016, 10:08 PMbillowy-beach-68498
04/20/2016, 10:09 PMrough-minister-58256
04/20/2016, 10:09 PMtest_*
methods defined on FilesystemPantsIgnoreTest
rough-minister-58256
04/20/2016, 10:09 PMwitty-crayon-22786
04/20/2016, 10:10 PMenough-analyst-54434
04/20/2016, 10:10 PMsetUp
method in not-a-UnitTestenough-analyst-54434
04/20/2016, 10:10 PMrough-minister-58256
04/20/2016, 10:10 PMPantsIgnoreTestBase
subclass unittest.TestCase
)