mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-23 07:01:39 +00:00
Mass Rename: AddDirectory() --> add_directory()
--HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%4014
This commit is contained in:
@@ -104,7 +104,7 @@ class DupeGuru(RegistrableApplication):
|
||||
# func(j)
|
||||
raise NotImplementedError()
|
||||
|
||||
def AddDirectory(self, d):
|
||||
def add_directory(self, d):
|
||||
try:
|
||||
self.directories.add_path(Path(d))
|
||||
return 0
|
||||
|
||||
@@ -206,17 +206,17 @@ class TCDupeGuru(TestCase):
|
||||
|
||||
def test_addDirectory_simple(self):
|
||||
app = self.app
|
||||
self.assertEqual(0,app.AddDirectory(self.datadirpath()))
|
||||
self.assertEqual(0,app.add_directory(self.datadirpath()))
|
||||
self.assertEqual(1,len(app.directories))
|
||||
|
||||
def test_addDirectory_already_there(self):
|
||||
app = self.app
|
||||
self.assertEqual(0,app.AddDirectory(self.datadirpath()))
|
||||
self.assertEqual(1,app.AddDirectory(self.datadirpath()))
|
||||
self.assertEqual(0,app.add_directory(self.datadirpath()))
|
||||
self.assertEqual(1,app.add_directory(self.datadirpath()))
|
||||
|
||||
def test_addDirectory_does_not_exist(self):
|
||||
app = self.app
|
||||
self.assertEqual(2,app.AddDirectory('/does_not_exist'))
|
||||
self.assertEqual(2,app.add_directory('/does_not_exist'))
|
||||
|
||||
def test_ignore(self):
|
||||
app = self.app
|
||||
|
||||
@@ -186,8 +186,8 @@ class DupeGuruPE(app_cocoa.DupeGuru):
|
||||
if result is not None:
|
||||
return result
|
||||
|
||||
def AddDirectory(self, d):
|
||||
result = app_cocoa.DupeGuru.AddDirectory(self, d)
|
||||
def add_directory(self, d):
|
||||
result = app_cocoa.DupeGuru.add_directory(self, d)
|
||||
if (result == 0) and (d == 'iPhoto Library'):
|
||||
[iphotolib] = [dir for dir in self.directories if dir.path == d]
|
||||
iphotolib.update()
|
||||
|
||||
Reference in New Issue
Block a user