diff --git a/.gitignore b/.gitignore index 4e12f7e..c9fbc04 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ build/ # Python / virtual environments venv +venv3 # Robot Framework / test output results/ diff --git a/src/DateTimeTZ/DateTimeTZ.py b/src/DateTimeTZ/DateTimeTZ.py index 25d4c7d..a29e75c 100644 --- a/src/DateTimeTZ/DateTimeTZ.py +++ b/src/DateTimeTZ/DateTimeTZ.py @@ -11,7 +11,6 @@ class DateTimeTZ: - """ Robot Framework [https://github.com/testautomation/DateTimeTZ|DateTimeTZ] library provides functionality for manipulating date and time in different locales and time zones.\n DateTime library is based on [http://babel.pocoo.org|Babel] and [http://labix.org/python-dateutil|python-dateutil]. @@ -26,7 +25,7 @@ def wait(self, seconds): | *Keyword* | *Argument* | | Wait | 5 | """ - print "Suspend test execution on " + str(seconds) + " seconds." + print("Suspend test execution on " + str(seconds) + " seconds.") time.sleep(int(seconds)) def get_unix_time(self): @@ -88,7 +87,7 @@ def get_timestamp(self, locale="en", time_format="dd-LL-y H:mm:ss.A", *args, **d INFO : ${timestamp_with_delta} = Янв. 2014 17:54\n INFO : ${delta_and_cpecific_part} = Янв. 2012 17:54 """ - delta = dict((key, int(value)) for (key, value) in delta.items()) + delta = dict((key, int(value)) for (key, value) in list(delta.items())) timestamp = datetime.today() + relativedelta(**delta) return format_datetime(timestamp, time_format, locale=locale) @@ -102,7 +101,7 @@ def get_utc_timestamp(self, locale="en", time_format="dd-LL-y H:mm:ss.A", *args, *Example result:*\n INFO : ${utc_timestamp} = 13 Март 2014 11:32:58 """ - delta = dict((key, int(value)) for (key, value) in delta.items()) + delta = dict((key, int(value)) for (key, value) in list(delta.items())) timestamp = datetime.utcnow() + relativedelta(**delta) return format_datetime(timestamp, time_format, locale=locale) diff --git a/src/DateTimeTZ/__init__.py b/src/DateTimeTZ/__init__.py index ecc389a..5168764 100644 --- a/src/DateTimeTZ/__init__.py +++ b/src/DateTimeTZ/__init__.py @@ -2,5 +2,5 @@ # Copyright (c) 2014 Roman Merkushin / rmerkushin@ya.ru # Update 2019 by Tset Noitamotua -from DateTimeTZ import DateTimeTZ +from .DateTimeTZ import DateTimeTZ from .version import __version__ diff --git a/src/DateTimeTZ/version.py b/src/DateTimeTZ/version.py index 663074c..c57709d 100644 --- a/src/DateTimeTZ/version.py +++ b/src/DateTimeTZ/version.py @@ -14,4 +14,4 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = '1.0.1' +__version__ = '1.0.2'