r258 - in branches/rewrite: src tests/Backends tests/Dir
Otavio Salvador
partial-mirror-devel@lists.alioth.debian.org
Mon, 27 Sep 2004 13:30:01 -0600
Author: otavio
Date: Mon Sep 27 13:29:44 2004
New Revision: 258
Modified:
branches/rewrite/src/Backend.py
branches/rewrite/src/debpartial-mirror.in
branches/rewrite/tests/Backends/test.py
branches/rewrite/tests/Dir/test.py
Log:
Fix to allow testing with our current framework. Need some work to look like the others.
Modified: branches/rewrite/src/Backend.py
==============================================================================
--- branches/rewrite/src/Backend.py (original)
+++ branches/rewrite/src/Backend.py Mon Sep 27 13:29:44 2004
@@ -20,7 +20,7 @@
import os
from Dir import *
-class MirrorBackend:
+class Backend:
"""
This class provides methods to create backendss dirs into the
partial-mirror
@@ -52,8 +52,3 @@
rmDirs.reverse()
for d in rmDirs:
d.remove()
-
-
-
-
-
Modified: branches/rewrite/src/debpartial-mirror.in
==============================================================================
--- branches/rewrite/src/debpartial-mirror.in (original)
+++ branches/rewrite/src/debpartial-mirror.in Mon Sep 27 13:29:44 2004
@@ -32,7 +32,7 @@
print "-c<file> --configfile=<file>\tSelect a config file"
print "-v --version\t\t\tShow the version"
print
- sys.exit(2)
+ exit(2)
version()
try:
Modified: branches/rewrite/tests/Backends/test.py
==============================================================================
--- branches/rewrite/tests/Backends/test.py (original)
+++ branches/rewrite/tests/Backends/test.py Mon Sep 27 13:29:44 2004
@@ -3,11 +3,10 @@
from sys import path, stdout
path.append("../../src/")
-from MirrorBackend import *
+from Backend import *
mirror = "sarge"
-d = MirrorBackend(mirror, "../debpartial-mirror")
+d = Backend(mirror, "../debpartial-mirror")
d.check()
-
d.remove()
Modified: branches/rewrite/tests/Dir/test.py
==============================================================================
--- branches/rewrite/tests/Dir/test.py (original)
+++ branches/rewrite/tests/Dir/test.py Mon Sep 27 13:29:44 2004
@@ -5,12 +5,11 @@
from Dir import *
-
def test(directory, parent):
d = Dir(directory, parent)
- if not d.status():
+ if not d.check():
print "Dir not created"
- if d.check():
+ else:
print "Dir %s created " % d.path()
d.remove()