Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

obs_decam - modernize Butler API use in testGetId #64

Merged
merged 1 commit into from
Jul 28, 2017

Commits on Jul 13, 2017

  1. modernize Butler API use in testGetId

    This test was failing because of a sequence of
    events:
    
    The test was passing into Butler init an
    instantiated mapper passed in but not comparing
    equal with the mapper loaded by the repository
    cfg.
    
    A repositoryCfg.yaml was being created by the old
    use of the Butler API (because the old API creates
    a read-write output repository), and it was not
    geting cleaned up by the test.
    
    When the test runs again on the same computer
    where the old repositoryCfg.yaml file exists, the
    mapper is reinstantiated as described by the
    repositoryCfg file.
    
    The passed-in instantiated mapper and the
    reinstantiated mapper do not compare equal,
    becuase they do not implement the __eq__ method
    and they are not the same instance.
    
    Butler interprets this as the mapper from the cfg
    and the passed-in mapper do not match, and it
    raises an exception.
    
    The better fix is to not pass an instantiated
    mapper to Butler init, instead pass the class
    object and let Butler init the mapper.
    n8pease committed Jul 13, 2017
    Configuration menu
    Copy the full SHA
    2685652 View commit details
    Browse the repository at this point in the history