Exemple #1
0
 def test_complete_scopes(self):
     _global = GlobalOptionsRegistrar.get_scope_info()
     self.assertEquals(
         {_global, intermediate("foo"), intermediate("foo.bar"), task("foo.bar.baz")},
         Options.complete_scopes({task("foo.bar.baz")}),
     )
     self.assertEquals(
         {_global, intermediate("foo"), intermediate("foo.bar"), task("foo.bar.baz")},
         Options.complete_scopes({GlobalOptionsRegistrar.get_scope_info(), task("foo.bar.baz")}),
     )
     self.assertEquals(
         {_global, intermediate("foo"), intermediate("foo.bar"), task("foo.bar.baz")},
         Options.complete_scopes({intermediate("foo"), task("foo.bar.baz")}),
     )
     self.assertEquals(
         {
             _global,
             intermediate("foo"),
             intermediate("foo.bar"),
             task("foo.bar.baz"),
             intermediate("qux"),
             task("qux.quux"),
         },
         Options.complete_scopes({task("foo.bar.baz"), task("qux.quux")}),
     )
Exemple #2
0
 def test_complete_scopes(self):
   self.assertEquals({'', 'foo', 'foo.bar', 'foo.bar.baz'},
                     Options.complete_scopes({'foo.bar.baz'}))
   self.assertEquals({'', 'foo', 'foo.bar', 'foo.bar.baz'},
                     Options.complete_scopes({'', 'foo.bar.baz'}))
   self.assertEquals({'', 'foo', 'foo.bar', 'foo.bar.baz'},
                     Options.complete_scopes({'foo', 'foo.bar.baz'}))
   self.assertEquals({'', 'foo', 'foo.bar', 'foo.bar.baz', 'qux', 'qux.quux'},
                     Options.complete_scopes({'foo.bar.baz', 'qux.quux'}))
Exemple #3
0
 def test_complete_scopes(self):
   _global = ScopeInfo.for_global_scope()
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({task('foo.bar.baz')}))
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({ScopeInfo.for_global_scope(), task('foo.bar.baz')}))
   self.assertEquals({_global, goal('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({goal('foo'), task('foo.bar.baz')}))
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz'),
                      intermediate('qux'), task('qux.quux')},
                     Options.complete_scopes({task('foo.bar.baz'), task('qux.quux')}))
Exemple #4
0
 def test_complete_scopes(self):
   _global = GlobalOptionsRegistrar.get_scope_info()
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({task('foo.bar.baz')}))
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({GlobalOptionsRegistrar.get_scope_info(),
                                              task('foo.bar.baz')}))
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({intermediate('foo'), task('foo.bar.baz')}))
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz'),
                      intermediate('qux'), task('qux.quux')},
                     Options.complete_scopes({task('foo.bar.baz'), task('qux.quux')}))
Exemple #5
0
 def test_complete_scopes(self):
   _global = GlobalOptionsRegistrar.get_scope_info()
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({task('foo.bar.baz')}))
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({GlobalOptionsRegistrar.get_scope_info(),
                                              task('foo.bar.baz')}))
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz')},
                     Options.complete_scopes({intermediate('foo'), task('foo.bar.baz')}))
   self.assertEquals({_global, intermediate('foo'), intermediate('foo.bar'), task('foo.bar.baz'),
                      intermediate('qux'), task('qux.quux')},
                     Options.complete_scopes({task('foo.bar.baz'), task('qux.quux')}))
Exemple #6
0
 def test_complete_scopes(self):
     _global = ScopeInfo.for_global_scope()
     self.assertEquals(
         {
             _global,
             intermediate('foo'),
             intermediate('foo.bar'),
             task('foo.bar.baz')
         }, Options.complete_scopes({task('foo.bar.baz')}))
     self.assertEquals(
         {
             _global,
             intermediate('foo'),
             intermediate('foo.bar'),
             task('foo.bar.baz')
         },
         Options.complete_scopes(
             {ScopeInfo.for_global_scope(),
              task('foo.bar.baz')}))
     self.assertEquals(
         {
             _global,
             intermediate('foo'),
             intermediate('foo.bar'),
             task('foo.bar.baz')
         },
         Options.complete_scopes({intermediate('foo'),
                                  task('foo.bar.baz')}))
     self.assertEquals(
         {
             _global,
             intermediate('foo'),
             intermediate('foo.bar'),
             task('foo.bar.baz'),
             intermediate('qux'),
             task('qux.quux')
         }, Options.complete_scopes({task('foo.bar.baz'),
                                     task('qux.quux')}))