File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
implicit_namespace_packages Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 1-
21import unittest
32
3+
44class NamespacePackagesTest (unittest .TestCase ):
55
66 def test_both_importable (self ):
77 import nspkg
88 import nspkg .subpkg1
99 import nspkg .subpkg1 .subpkgmod
10-
11- import nspkg .subpkg1
1210 import nspkg .subpkg2 .subpkgmod
1311
1412 self .assertEqual ("nspkg.subpkg1" , nspkg .subpkg1 .expected_name )
15- self .assertEqual ("nspkg.subpkg1.subpkgmod" , nspkg .subpkg1 .subpkgmod .expected_name )
13+ self .assertEqual (
14+ "nspkg.subpkg1.subpkgmod" , nspkg .subpkg1 .subpkgmod .expected_name
15+ )
1616
1717 self .assertEqual ("nspkg.subpkg2" , nspkg .subpkg2 .expected_name )
18- self .assertEqual ("nspkg.subpkg2.subpkgmod" , nspkg .subpkg2 .subpkgmod .expected_name )
18+ self .assertEqual (
19+ "nspkg.subpkg2.subpkgmod" , nspkg .subpkg2 .subpkgmod .expected_name
20+ )
21+
1922
2023if __name__ == "__main__" :
2124 unittest .main ()
Original file line number Diff line number Diff line change @@ -461,16 +461,14 @@ def _test_group(env):
461461
462462_tests .append (_test_group )
463463
464- def _glob (* args , ** kwargs ):
465- return [_glob_call (* args , ** kwargs )]
466-
467464def _glob_call (* args , ** kwargs ):
468465 return struct (
469466 glob = args ,
470467 kwargs = kwargs ,
471468 )
472469
473470def _mock_glob ():
471+ # buildifier: disable=uninitialized
474472 def glob (* args , ** kwargs ):
475473 mock .calls .append (_glob_call (* args , ** kwargs ))
476474 if not mock .results :
You can’t perform that action at this time.
0 commit comments