Skip to content

Commit

Permalink
Remove the build folder for unit test to ensure correctness
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanTingHsieh committed Jan 15, 2025
1 parent 08a446e commit ec2281d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import shutil
import sys
import unittest

Expand All @@ -26,6 +28,11 @@ def setUp(self) -> None:
file_dir = os.path.dirname(os.path.realpath(__file__))
splits = file_dir.split(os.sep)
self.nvflare_root = os.sep.join(splits[0:-4])
# sometimes a build dir is generated, we need to remove
# to ensure test correctness
build_dir = os.path.join(self.nvflare_root, "build")
if os.path.exists(build_dir):
shutil.rmtree(build_dir)

def test_app_scripts_and_args(self):
script_path = "nvflare/cli.py"
Expand Down

0 comments on commit ec2281d

Please sign in to comment.