summaryrefslogtreecommitdiff
path: root/python/subunit/tests
diff options
context:
space:
mode:
authorMatthew Treinish <mtreinish@kortar.org>2021-06-15 13:22:54 -0400
committerGitHub <noreply@github.com>2021-06-15 13:22:54 -0400
commit04cd3c5664e136d63835dfee5104e84fbd7511cc (patch)
tree8ab833f7601891214dae472734a871654d5d36ba /python/subunit/tests
parent0dd0bec5fa4b5a6ff32b76224cfe46e2e86ac482 (diff)
parent1c82fee86b1778335680416b9a0041a579d02714 (diff)
downloadsubunit-git-04cd3c5664e136d63835dfee5104e84fbd7511cc.tar.gz
Merge branch 'master' into fix-filter-entrypoints
Diffstat (limited to 'python/subunit/tests')
-rw-r--r--python/subunit/tests/test_output_filter.py63
1 files changed, 0 insertions, 63 deletions
diff --git a/python/subunit/tests/test_output_filter.py b/python/subunit/tests/test_output_filter.py
index 587fd06..0f61ac5 100644
--- a/python/subunit/tests/test_output_filter.py
+++ b/python/subunit/tests/test_output_filter.py
@@ -472,69 +472,6 @@ class StatusStreamResultTests(TestCase):
])
)
-class TimeStampTests(TestCase):
- scenarios = [
- (s, dict(status=s, option='--' + s)) for s in _FINAL_ACTIONS
- ]
-
- _dummy_timestamp = datetime.datetime(1914, 6, 28, 10, 45, 2, 0, UTC)
-
- def setUp(self):
- super(TimeStampTests, self).setUp()
- self.patch(_o, 'create_timestamp', lambda: self._dummy_timestamp)
- self.test_id = self.getUniqueString()
-
- def test_no_timestamps(self):
- result = get_result_for([self.option, self.test_id, f.name])
- self.assertThat(
- result._events,
- MatchesListwise([
- MatchesStatusCall(call='startTestRun'),
- MatchesStatusCall(test_id=self.test_id, timestamp=self._dummy_timestamp),
- MatchesStatusCall(test_id=self.test_id, timestamp=None),
- MatchesStatusCall(call='stopTestRun'),
- ]))
-
- def test_only_start_timestamp(self):
- timestamp = datetime.datetime.utcnow()
- result = get_result_for([self.option, self.test_id, f.name,
- '--start-time', timestamp.isoformat()])
- self.assertThat(
- result._events,
- MatchesListwise([
- MatchesStatusCall(call='startTestRun'),
- MatchesStatusCall(test_id=self.test_id, timestamp=timestamp),
- MatchesStatusCall(test_id=self.test_id, timestamp=None),
- MatchesStatusCall(call='stopTestRun'),
- ]))
-
- def test_only_stop_timestamp(self):
- timestamp = datetime.datetime.utcnow()
- result = get_result_for([self.option, self.test_id, f.name,
- '--stop-time', timestamp.isoformat()])
- self.assertThat(
- result._events,
- MatchesListwise([
- MatchesStatusCall(call='startTestRun'),
- MatchesStatusCall(test_id=self.test_id, timestamp=self._dummy_timestamp),
- MatchesStatusCall(test_id=self.test_id, timestamp=timestamp),
- MatchesStatusCall(call='stopTestRun'),
- ]))
-
- def test_start_and_stop_timestamp(self):
- timestamp_start = datetime.datetime.utcnow()
- timestamp_stop = timestamp_start + datetime.timedelta(minutes=5)
- result = get_result_for([self.option, self.test_id, f.name,
- '--start-time', timestamp_start.isoformat(),
- '--stop-time', timestamp_stop.isoformat()])
- self.assertThat(
- result._events,
- MatchesListwise([
- MatchesStatusCall(call='startTestRun'),
- MatchesStatusCall(test_id=self.test_id, timestamp=timestamp_start),
- MatchesStatusCall(test_id=self.test_id, timestamp=timestamp_stop),
- MatchesStatusCall(call='stopTestRun'),
- ]))
class FileDataTests(TestCase):