我正在使用 Django 测试运行程序来运行我的单元测试。其中一些测试使用工厂在我的本地系统上创建大量文件。它们都有一个可检测的名称,并且可以相当容易地删除。
我试图避免
我编写了一个小型管理命令,用于删除符合预期约定的文件。有没有办法让测试运行程序call_command在完成整个测试套件后运行(而不仅仅是在特定测试的tearDown或方法中)?tearDownClass
call_command
tearDown
tearDownClass
python django unit-testing factory-boy python-unittest
django ×1
factory-boy ×1
python ×1
python-unittest ×1
unit-testing ×1