Skip to content

Commit cefc944

Browse files
committed
Fix issue with the deletion of the input source.
This patch fix #97. This was caused by the behavior of the system against the shadow file. Contributors: * @spirillen
1 parent 002b2f2 commit cefc944

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

PyFunceble/abstracts/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Package:
6565
:type: str
6666
"""
6767

68-
VERSION = "3.2.1.dev (Teal Blauwbok: Moth)"
68+
VERSION = "3.2.2.dev (Teal Blauwbok: Moth)"
6969
"""
7070
Sets the package version.
7171

PyFunceble/core/file.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,8 @@ def run_test(self):
631631

632632
shadow_file_name = shadow_file.name
633633

634-
PyFunceble.helpers.File(shadow_file_name).delete()
634+
if PyFunceble.CONFIGURATION.shadow_file:
635+
PyFunceble.helpers.File(shadow_file_name).delete()
635636

636637
if self.autocontinue.is_empty():
637638
with open(self.file, "r", encoding="utf-8") as file_stream, open(
@@ -646,7 +647,8 @@ def run_test(self):
646647

647648
shadow_file_name = shadow_file.name
648649

649-
PyFunceble.helpers.File(shadow_file_name).delete()
650+
if PyFunceble.CONFIGURATION.shadow_file:
651+
PyFunceble.helpers.File(shadow_file_name).delete()
650652

651653
for subject in self.inactive_db.get_to_retest():
652654
self.__test_line(subject)

PyFunceble/core/multiprocess.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,11 @@ def run_test(self):
514514
with Manager() as manager:
515515
self.__run_multiprocess_test(shadow_file, manager)
516516

517+
shadow_file_name = shadow_file.name
518+
519+
if PyFunceble.CONFIGURATION.shadow_file:
520+
PyFunceble.helpers.File(shadow_file_name).delete()
521+
517522
if self.autocontinue.is_empty():
518523
with open(self.file, "r", encoding="utf-8") as file_stream, open(
519524
self.construct_and_get_shadow_file(
@@ -527,6 +532,11 @@ def run_test(self):
527532
file_stream, manager, ignore_inactive_db_check=True
528533
)
529534

535+
shadow_file_name = shadow_file.name
536+
537+
if PyFunceble.CONFIGURATION.shadow_file:
538+
PyFunceble.helpers.File(shadow_file_name).delete()
539+
530540
with Manager() as manager:
531541
self.__run_multiprocess_test(
532542
chain(self.inactive_db.get_to_retest()), manager

version.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
current_version: '3.2.1.dev (Teal Blauwbok: Moth)'
1+
current_version: '3.2.2.dev (Teal Blauwbok: Moth)'
22
deprecated:
33
- 1.0.0
44
- 1.2.1

0 commit comments

Comments
 (0)