test/mavendepstest.py
def testDepsResolveScopeConflict (self):
    """ Test that we can get dependencies without exclusions
    """
    depsA = MavenDeps('A:A:jar:1:compile')
    depsB = MavenDep ('B:B:jar:1:compile')
    depsC = MavenDep ('C:C:jar:1:compile')
    depsCT = MavenDep ('C:C:jar:1:test')
    depsD = MavenDep ('D:D:jar:1:compile')

    # A->B->C:compile
    # |     |
    # |     +->D:compile
    # |
    # +->C:test
    depsC.add (depsD)
    depsB.add (depsC)
    depsA.add (depsB)
    depsA.add (depsCT)

    self.assertEquals (
      depsA.getFlattenCoordFullIds(),
      ['B:B:jar:1:compile', 'C:C:jar:1:compile', 'D:D:jar:1:compile', 'C:C:jar:1:test']
    )

    # C:test should be the only one removed since A->B->C->D
    depsA.resolve(scope = 'compile')

    self.assertEquals (
      depsA.getFlattenCoordFullIds(),
      ['B:B:jar:1:compile', 'C:C:jar:1:compile', 'D:D:jar:1:compile']
    )
    return
 Test that we can get dependencies without exclusions
    
Test that we can get dependencies without exclusions
Test that we can get dependencies without exclusions
def testDepsResolveScopeConflict (self):
    depsA = MavenDeps('A:A:jar:1:compile')
    depsB = MavenDep ('B:B:jar:1:compile')
    depsC = MavenDep ('C:C:jar:1:compile')
    depsCT = MavenDep ('C:C:jar:1:test')
    depsD = MavenDep ('D:D:jar:1:compile')
    depsC.add (depsD)
    depsB.add (depsC)
    depsA.add (depsB)
    depsA.add (depsCT)
    self.assertEquals (
      depsA.getFlattenCoordFullIds(),
      ['B:B:jar:1:compile', 'C:C:jar:1:compile', 'D:D:jar:1:compile', 'C:C:jar:1:test']
    )
    depsA.resolve(scope = 'compile')
    self.assertEquals (
      depsA.getFlattenCoordFullIds(),
      ['B:B:jar:1:compile', 'C:C:jar:1:compile', 'D:D:jar:1:compile']
    )
    return
def testDepsResolveScopeConflict ( self ) : depsA = MavenDeps ( 'A:A:jar:1:compile' ) depsB = MavenDep ( 'B:B:jar:1:compile' ) depsC = MavenDep ( 'C:C:jar:1:compile' ) depsCT = MavenDep ( 'C:C:jar:1:test' ) depsD = MavenDep ( 'D:D:jar:1:compile' ) depsC . add ( depsD ) depsB . add ( depsC ) depsA . add ( depsB ) depsA . add ( depsCT ) self . assertEquals ( depsA . getFlattenCoordFullIds ( ) , [ 'B:B:jar:1:compile' , 'C:C:jar:1:compile' , 'D:D:jar:1:compile' , 'C:C:jar:1:test' ] ) depsA . resolve ( scope = 'compile' ) self . assertEquals ( depsA . getFlattenCoordFullIds ( ) , [ 'B:B:jar:1:compile' , 'C:C:jar:1:compile' , 'D:D:jar:1:compile' ] ) return
Test that we can get dependencies without exclusions
Test that we can get dependencies without exclusions
""" Test that we can get dependencies without exclusions
    """ # A->B->C:compile # |     | # |     +->D:compile # | # +->C:test # C:test should be the only one removed since A->B->C->D
self