Moved the .pro and fp-cache to the context clean_up

This commit is contained in:
Salvador E. Tropea 2020-05-20 10:52:42 -03:00
parent 367647724a
commit d8e45554f4
4 changed files with 8 additions and 7 deletions

View File

@ -134,4 +134,3 @@ def test_3Rs_position_inches_csv():
expect_position(ctx, pos_top, ['R1'], ['R2', 'R3'], inches=True, csv=True)
expect_position(ctx, pos_bot, ['R2'], ['R1', 'R3'], inches=True, csv=True)
ctx.clean_up()

View File

@ -27,8 +27,4 @@ def test_print_sch():
ctx.run()
# Check all outputs are there
ctx.expect_out_file(os.path.join(PDF_DIR, PDF_FILE))
# We don't have a project, and we don't want one
os.remove(os.path.join(ctx.get_board_dir(), prj+'.pro'))
# We don't have a footprint cache, and we don't want one
os.remove(os.path.join(ctx.get_board_dir(), 'fp-info-cache'))
ctx.clean_up()

View File

@ -27,6 +27,4 @@ def test_print_sch():
ctx.run()
# Check all outputs are there
ctx.expect_out_file(PDF_FILE)
# We don't have a project, and we don't want one
os.remove(os.path.join(ctx.get_board_dir(), prj+'.pro'))
ctx.clean_up()

View File

@ -75,6 +75,14 @@ class TestContext(object):
if self._del_dir_after:
logging.debug('Removing dir')
shutil.rmtree(self.output_dir)
# We don't have a project, and we don't want one
pro = os.path.join(self.get_board_dir(), self.board_name+'.pro')
if os.path.isfile(pro):
os.remove(pro)
# We don't have a footprint cache, and we don't want one
fp_cache = os.path.join(self.get_board_dir(), 'fp-info-cache')
if os.path.isfile(fp_cache):
os.remove(fp_cache)
def get_out_path(self, filename):
return os.path.join(self.output_dir, filename)