-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix set separator without content in line
- Loading branch information
1 parent
c116724
commit b09b232
Showing
4 changed files
with
91 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import termspark.termspark | ||
|
||
|
||
class EmptyException(Exception): | ||
def __str__(self): | ||
message = termspark.TermSpark().print_left( | ||
"can't be empty! Set a line or fill content.", | ||
"red", | ||
) | ||
|
||
return str(message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from termspark.exceptions.emptyException import EmptyException | ||
from termspark.painter.constants.fore import Fore | ||
|
||
|
||
class TestEmptyException: | ||
def test_exception_message(self): | ||
exception = EmptyException() | ||
assert all( | ||
word in str(exception) | ||
for word in [ | ||
"can't be empty! Set a line or fill content.", | ||
str(Fore.RED), | ||
] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters