@@ -238,40 +238,5 @@ def test_cuda_source_with_ninja(self):
238238 np .testing .assert_allclose (out .numpy (), pd_out .numpy (), atol = 1e-5 )
239239
240240
241- class TestNinjaBuildExtension (unittest .TestCase ):
242- def test_use_ninja_attribute_default (self ):
243- from paddle .utils .cpp_extension .cpp_extension import BuildExtension
244-
245- build_ext = BuildExtension ()
246- self .assertTrue (build_ext .use_ninja , "use_ninja should default to True" )
247-
248- def test_use_ninja_attribute_explicit_false (self ):
249- from paddle .utils .cpp_extension .cpp_extension import BuildExtension
250-
251- build_ext = BuildExtension (use_ninja = False )
252- self .assertFalse (build_ext .use_ninja )
253-
254- def test_use_ninja_attribute_explicit_true (self ):
255- from paddle .utils .cpp_extension .cpp_extension import BuildExtension
256-
257- build_ext = BuildExtension (use_ninja = True )
258- self .assertTrue (build_ext .use_ninja )
259-
260- def test_use_ninja_fallback_when_unavailable (self ):
261- from paddle .utils .cpp_extension .cpp_extension import BuildExtension
262-
263- # Create BuildExtension with use_ninja=True
264- # If ninja is unavailable, it should fallback to False
265- build_ext = BuildExtension (use_ninja = True )
266-
267- if not _is_ninja_available ():
268- self .assertFalse (
269- build_ext .use_ninja ,
270- "use_ninja should be False when ninja is unavailable" ,
271- )
272- else :
273- self .assertTrue (build_ext .use_ninja )
274-
275-
276241if __name__ == '__main__' :
277242 unittest .main ()
0 commit comments