Skip to content

Commit 7ae610f

Browse files
author
Sergey Kosyrev
committed
Fixed tests and lack of total_seconds function
1 parent 4f32e83 commit 7ae610f

10 files changed

+27
-1501
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.pyc
22
.coverage
33
./tests/functional/2nd_feature_dir/step_definitions/__init__.py
4+
tests/functional/tmp/*
45
docs/_build/
56
docs/_build
67
lettuce.egg-info/

lettuce/plugins/bunch_output.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
except ImportError:
2424
import xml.etree.ElementTree as ET
2525

26+
def total_seconds(td):
27+
return (td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6) / 10**6
28+
2629
class PluginState(object):
2730
def __init__(self, **kw):
2831
self.set_atts = kw
@@ -195,7 +198,7 @@ def add_finished(element, dt):
195198

196199
def add_results(element, passed=None, delta=None):
197200
if delta is not None:
198-
ET.SubElement(element, 'time').text = "%f" % (delta.total_seconds())
201+
ET.SubElement(element, 'time').text = "%f" % (total_seconds(delta))
199202

200203
result = ET.SubElement(element, 'result')
201204
if passed is None:

tests/functional/bunch_test.yaml

-59
This file was deleted.

tests/functional/bunch_test_no_err.xml

-53
This file was deleted.

tests/functional/bunch_test_one_err.xml

-103
This file was deleted.

0 commit comments

Comments
 (0)