( self )
| 795 | self.assertEqual( set( m2.paths() ), set( initialPaths ) ) |
| 796 | |
| 797 | def testCopyAndPrunePath( self ) : |
| 798 | |
| 799 | initialPaths = [ |
| 800 | "/a/b/c/d/e", |
| 801 | "/a/b", |
| 802 | "/e/f", |
| 803 | "/e/f/g", |
| 804 | "/g" |
| 805 | ] |
| 806 | |
| 807 | pathsToPrune = [ |
| 808 | "/a/b", |
| 809 | "/e/f/g", |
| 810 | "/g", |
| 811 | ] |
| 812 | |
| 813 | expectedPaths = [ |
| 814 | "/e/f", |
| 815 | ] |
| 816 | |
| 817 | m1 = IECore.PathMatcher( initialPaths ) |
| 818 | m2 = IECore.PathMatcher( m1 ) |
| 819 | |
| 820 | self.assertEqual( set( m1.paths() ), set( initialPaths ) ) |
| 821 | self.assertEqual( set( m2.paths() ), set( initialPaths ) ) |
| 822 | |
| 823 | for path in pathsToPrune : |
| 824 | m1.prune( path ) |
| 825 | |
| 826 | self.assertEqual( set( m1.paths() ), set( expectedPaths ) ) |
| 827 | self.assertEqual( set( m2.paths() ), set( initialPaths ) ) |
| 828 | |
| 829 | def testFind( self ) : |
| 830 |
nothing calls this directly
no test coverage detected