def test_compatibility_flip_ctrlpts2d_file3(bspline_surface): fname_in = FILE_NAME + "_in.txt" fname_out = "" bspline_surface.sample_size = SAMPLE_SIZE exchange.export_txt(bspline_surface, fname_in, two_dimensional=True) with pytest.raises(IOError): compatibility.flip_ctrlpts2d_file(fname_in, fname_out) # Clean up temporary file if exists if os.path.isfile(fname_in): os.remove(fname_in)
def test_compatibility_flip_ctrlpts2d_file1(bspline_surface): fname_in = FILE_NAME + "_in.txt" fname_out = FILE_NAME + "_out.txt" bspline_surface.sample_size = SAMPLE_SIZE exchange.export_txt(bspline_surface, fname_in, two_dimensional=True) compatibility.flip_ctrlpts2d_file(fname_in, fname_out) assert os.path.isfile(fname_out) assert os.path.getsize(fname_out) > 0 # Clean up temporary file if exists if os.path.isfile(fname_in): os.remove(fname_in) os.remove(fname_out)
def test_compatibility_flip_ctrlpts2d_file2(bspline_surface): fname_in = FILE_NAME + "_in.txt" fname_out = FILE_NAME + "_out.txt" with pytest.raises(IOError): compatibility.flip_ctrlpts2d_file(fname_in, fname_out)