fix(tests): set lower for case sensitive system #805
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When running tests for c4 the setUp() initialize a name variable that is used as name parameter for Diagram() class.
The name variable generated have upper case. ex: "diagram-e1Ad2eF"
In Diagram class when name parameter is provided it's used to generate a file in lower case.
filename = "_".join(self.name.split()).lower()
So when the tearDown is called and ask to remove the file using self.name with upper case, the file are not found so not removed.
os.remove(self.name + ".png")
It may work in windows as windows is case insensitive but not for linux.