Changeset 2625


Ignore:
Timestamp:
May 18, 2010 5:17:44 PM (11 years ago)
Author:
wehart
Message:

Misc updates.

Location:
coopr.testing/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • coopr.testing/trunk/coopr/testing/__init__.py

    r2621 r2625  
    99#  _________________________________________________________________________
    1010
     11import pyutilib.component.core
     12pyutilib.component.core.PluginGlobals.push_env('coopr.testing')
     13
    1114import plugins
    1215import yaml_plugin
    1316import driver
    1417
     18pyutilib.component.core.PluginGlobals.pop_env()
  • coopr.testing/trunk/coopr/testing/driver.py

    r2621 r2625  
    11
     2import os
     3import sys
    24import optparse
    35import plugins
     
    1618    options, args = parser.parse_args(sys.argv)
    1719
     20    if len(args) == 1:
     21        parser.print_help()
     22        return
     23
    1824    ep = ExtensionPoint(plugins.ITestDriver)
     25    print "HERE",len(ep)
    1926    for file in args:
    2027        ftype = os.path.splitext(file)[1]
    21         service = ep(ftype)
     28        print "HERE",ftype,ep(ftype)
     29        suite = ep(ftype).load_test_specification(file)
     30        suite = ep(ftype).load_test_specification(file)
     31        print suite
    2232       
     33       
  • coopr.testing/trunk/coopr/testing/plugins.py

    r2621 r2625  
     1
     2__all__ = ['ITestDriver']
    13
    24from pyutilib.component.core import *
     
    46class ITestDriver(Interface):
    57
    6     def load_test_specification(self, filename):
     8    def load_test_suites(self, filename):
    79        pass
    810
     11
  • coopr.testing/trunk/coopr/testing/yaml_plugin.py

    r2623 r2625  
    66    using_yaml=False
    77
    8 from plugins import ITestDriver
     8import plugins
    99from pyutilib.component.core import *
    1010
    1111
    12 class YamlTestDriver(SingletonPlugin):
     12class YamlTestDriver(Plugin):
    1313
    14     implements(ITestDriver)
     14    implements(plugins.ITestDriver)
     15
     16    def __init__(self, **kwds):
     17        Plugin.__init__(self, **kwds)
     18        self.name='yaml'
    1519
    1620    def load_test_specification(self, filename):
    17         pass
     21        INPUT = open(filename, 'r')
     22        repn = yaml.load(INPUT, yaml.SafeLoader)
     23        INPUT.close()
     24        return repn
    1825
  • coopr.testing/trunk/setup.py

    r2619 r2625  
    6767      keywords=['optimization'],
    6868      scripts=scripts,
    69       namespace_packages=['coopr']
     69      namespace_packages=['coopr'],
     70      entry_points="""
     71        [console_scripts]
     72        coopr_test_driver = coopr.testing.driver:main
     73      """
    7074      )
    7175
Note: See TracChangeset for help on using the changeset viewer.