[Pymoul-svn] SF.net SVN: pymoul: [165] pymoul/trunk
Status: Alpha
Brought to you by:
tiran
|
From: <ti...@us...> - 2007-02-13 19:37:09
|
Revision: 165
http://pymoul.svn.sourceforge.net/pymoul/?rev=165&view=rev
Author: tiran
Date: 2007-02-13 11:37:02 -0800 (Tue, 13 Feb 2007)
Log Message:
-----------
Fixed broken unit tests
Modified Paths:
--------------
pymoul/trunk/Makefile.in
pymoul/trunk/src/moul/file/chatlog.py
pymoul/trunk/src/moul/file/plasmalog.py
pymoul/trunk/src/moul/file/tests/test_wdysini.py
Modified: pymoul/trunk/Makefile.in
===================================================================
--- pymoul/trunk/Makefile.in 2007-02-13 15:32:47 UTC (rev 164)
+++ pymoul/trunk/Makefile.in 2007-02-13 19:37:02 UTC (rev 165)
@@ -38,10 +38,10 @@
ui:
$(PYTHON) utilities/compileui.py ./src/moul/
-test_build: build ui
+test_build: build
PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
-test_inplace: ui
+test_inplace:
PYTHONPATH="src" $(PYTHON) test.py $(TESTFLAGS) $(TESTOPTS)
doc_html:
Modified: pymoul/trunk/src/moul/file/chatlog.py
===================================================================
--- pymoul/trunk/src/moul/file/chatlog.py 2007-02-13 15:32:47 UTC (rev 164)
+++ pymoul/trunk/src/moul/file/chatlog.py 2007-02-13 19:37:02 UTC (rev 165)
@@ -101,7 +101,7 @@
return False
if not os.path.isdir(self._destdir):
LOG.info("Creating chatlog directory %s" % self._destdir)
- os.mkdir(destdir)
+ os.mkdir(self._destdir)
return False
return True
@@ -232,6 +232,12 @@
self._chatlogs.append(chatlog)
self._chatlogs.sort(key=lambda element:element.name)
+ @property
+ def names(self):
+ """list of names
+ """
+ return [clv.name for clv in self._chatlogs]
+
def __len__(self):
"""len() support
"""
@@ -239,10 +245,10 @@
def __iter__(self):
return iter(self._chatlogs)
-
+
def __contains__(self, other):
return other in self._chatlogs
-
+
def __getitem__(self, idx):
return self._chatlogs[idx]
Modified: pymoul/trunk/src/moul/file/plasmalog.py
===================================================================
--- pymoul/trunk/src/moul/file/plasmalog.py 2007-02-13 15:32:47 UTC (rev 164)
+++ pymoul/trunk/src/moul/file/plasmalog.py 2007-02-13 19:37:02 UTC (rev 165)
@@ -48,6 +48,7 @@
self._doremove = True
self._dozip = True
LOG.debug("PlasmalogZipper: %s -> %s" % (srcdir, destdir))
+ self.clear()
def clear(self):
"""Clear state
@@ -56,15 +57,15 @@
self._not_removed = [] # files with full path
if not os.path.isdir(self._srcdir):
- LOG.warning("%s is not a directory" % srcdir)
+ LOG.warning("%s is not a directory" % self._srcdir)
if not self.isPlasmaLogDir():
self._ispldir = False
- LOG.warning("%s is not a plasma log directory" % srcdir)
+ LOG.warning("%s is not a plasma log directory" % self._srcdir)
else:
self._ispldir = True
if not os.path.isdir(self._destdir):
- LOG.info("Creating chatlog directory %s" % destdir)
- os.mkdir(destdir)
+ LOG.info("Creating chatlog directory %s" % self._destdir)
+ os.mkdir(self._destdir)
def setZip(self, boolean):
"""Set ZIP flag
Modified: pymoul/trunk/src/moul/file/tests/test_wdysini.py
===================================================================
--- pymoul/trunk/src/moul/file/tests/test_wdysini.py 2007-02-13 15:32:47 UTC (rev 164)
+++ pymoul/trunk/src/moul/file/tests/test_wdysini.py 2007-02-13 19:37:02 UTC (rev 165)
@@ -111,8 +111,6 @@
self.failIf(p.exists())
p.create()
self.failUnless(p.exists())
- p.write()
- self.failUnless(p.exists())
# TODO: more
class AudioIniTest(GenericIniTest):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|