-
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.
- Loading branch information
Showing
4 changed files
with
87 additions
and
85 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
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 |
---|---|---|
@@ -1,66 +1,66 @@ | ||
""" | ||
The Observer class for the xms.core library. | ||
""" | ||
from .._xmscore.misc import Observer as Obs | ||
|
||
|
||
class Observer(Obs): | ||
""" | ||
Mock Observer class for testing. | ||
""" | ||
def __init__(self): | ||
""" | ||
The __init__ function for the Observer class. | ||
""" | ||
super(Observer, self).__init__() | ||
|
||
def on_progress_status(self, percent_complete): | ||
""" | ||
Captures the progress of an operation. | ||
Args: | ||
percent_complete (float): The percent complete | ||
""" | ||
self.on_progress_status(percent_complete) | ||
|
||
def on_begin_operation_string(self, operation): | ||
""" | ||
The operation string. | ||
Args: | ||
operation: Name of the operation being monitored. | ||
""" | ||
self.on_begin_operation_string(operation) | ||
|
||
def on_end_operation(self): | ||
""" | ||
The end operation event. | ||
""" | ||
self.on_end_operation() | ||
|
||
def on_update_message(self, message): | ||
""" | ||
When update message has been sent. | ||
Args: | ||
message: The new message | ||
""" | ||
self.on_update_message(message) | ||
|
||
def time_remaining_in_seconds(self, remaining_seconds): | ||
""" | ||
Sets the time remaining in seconds. | ||
Args: | ||
remaining_seconds (Float): The time remaining for the current operation that the class is observing. | ||
""" | ||
self.time_remaining_in_seconds(remaining_seconds) | ||
|
||
def time_elapsed_in_seconds(self, elapsed_seconds): | ||
""" | ||
Sets the time elapsed since the operation began. | ||
Args: | ||
elapsed_seconds (Float): The elapsed time since the operation began. | ||
""" | ||
self.time_elapsed_in_seconds(elapsed_seconds) | ||
""" | ||
The Observer class for the xms.core library. | ||
""" | ||
from .._xmscore.misc import Observer as Obs | ||
|
||
|
||
class Observer(Obs): | ||
""" | ||
Mock Observer class for testing. | ||
""" | ||
def __init__(self): | ||
""" | ||
The constructor. | ||
""" | ||
super(Observer, self).__init__() | ||
|
||
def on_progress_status(self, percent_complete: float): | ||
""" | ||
Captures the progress of an operation. | ||
Args: | ||
percent_complete: The percentage complete. | ||
""" | ||
super(Observer, self).on_progress_status(percent_complete) | ||
|
||
def on_begin_operation_string(self, operation: str): | ||
""" | ||
Called when an operation begins. | ||
Args: | ||
operation: Name of the operation being monitored. | ||
""" | ||
super(Observer, self).on_begin_operation_string(operation) | ||
|
||
def on_end_operation(self): | ||
""" | ||
Called when an operation ends. | ||
""" | ||
super(Observer, self).on_end_operation() | ||
|
||
def on_update_message(self, message): | ||
""" | ||
When update message has been sent. | ||
Args: | ||
message: The new message | ||
""" | ||
super(Observer, self).on_update_message(message) | ||
|
||
def time_remaining_in_seconds(self, remaining_seconds): | ||
""" | ||
Sets the time remaining in seconds. | ||
Args: | ||
remaining_seconds (Float): The time remaining for the current operation that the class is observing. | ||
""" | ||
super(Observer, self).time_remaining_in_seconds(remaining_seconds) | ||
|
||
def time_elapsed_in_seconds(self, elapsed_seconds): | ||
""" | ||
Sets the time elapsed since the operation began. | ||
Args: | ||
elapsed_seconds (Float): The elapsed time since the operation began. | ||
""" | ||
super(Observer, self).time_elapsed_in_seconds(elapsed_seconds) |
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