[Bio] / CatalogServices / testCatalogServices.py Repository:
ViewVC logotype

View of /CatalogServices/testCatalogServices.py

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.1 - (download) (as text) (annotate)
Fri Sep 10 13:27:10 2004 UTC (15 years, 8 months ago) by efrank
Branch: MAIN
CVS Tags: post-st-migration2, sc04-finalDay, post-st-migration, before-dynamics-persistence, sc2004-1, sc2004-3, lwc, sc2004-4, treatman-lastDay-0, sc2004-2, preTreatmanDyn, sc2004-0, HEAD
migrate to new standard.mk makefile.
rename a file

#!/usr/bin/env python

from CatalogServices.Catalog import Catalog
from CatalogServices.CatalogEntry import CatalogEntry
from FaST.BssFactory import  BssFactory
from FaST.SeedDataFactory import SeedDataFactory

# Test base class, CatalogEntry

ce0 = CatalogEntry( "/", "ce0", isTerminal=0)
ce1 = CatalogEntry( "/", "ce1", isTerminal=1)

if (ce0.name() != "ce0"):
    print "FAIL: CatalogEntry.name()"

if (ce0.isTerminal()):
    print "FAIL: CatalogEntry.isTerminal()"

if (not ce1.isTerminal()):
    print "FAIL: CatalogEntry.isTerminal()"

# addDataFactory

catalog = Catalog.instance()

catalog.addDataFactory( b)
print "added a BssFactory"

catalog.addDataFactory( s)
print "added a SeedFactory"

# Test Catalog

print "Registered factories:"
df      = catalog.getFactories()
print df, "add printout of factoryId/name"

print "cattop name", catTop.name()
print catTop.entries()

def f(x): print x.path()
catalog.apply( f )

# Test open()

fik1 = catalog.open("/Bss/KEGG Buchnera")
print fik1

fik2 = catalog.open("http://theSeed.uchicago.edu/FIG/Organisms/Synechocystis sp. PCC 6803 [1148.1]")
print fik2

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3