summaryrefslogtreecommitdiff
path: root/unittests
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2016-10-14 16:40:07 -0700
committerDylan Baker <dylan@pnwbakers.com>2016-11-10 10:51:02 -0800
commit0cd6901655a1491d82c6bec216dce7ccdf4f4e29 (patch)
tree47050955e002b887e118266b88219fcd3a749302 /unittests
parentd3cf9064e44af40a306244669b45070f98808a2a (diff)
framework/profile: Don't alter the TestProfile before running
This patch changes the way that the tests from TestProfile are processed. Rather than having a process_test_list method that modifies TestProfile.test_list, a new itertests() method creates an iterator that yields tests that are not excluded by filters. This saves a bit of code, increases the memory usage, and reduces surprise. It would be nice if there wasn't a need to create a concrete test list, but there wouldn't be any way to get the number of tests otherwise. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'unittests')
-rw-r--r--unittests/framework/test_profile.py6
1 files changed, 0 insertions, 6 deletions
diff --git a/unittests/framework/test_profile.py b/unittests/framework/test_profile.py
index ea4ee7063..9ac0d2176 100644
--- a/unittests/framework/test_profile.py
+++ b/unittests/framework/test_profile.py
@@ -211,12 +211,6 @@ class TestTestProfile(object):
assert fixture.test_list == new.test_list
assert fixture.test_list is not new.test_list
- def test_prepare_test_list(self, fixture):
- """The prepare_test_list method doesn't affect both."""
- new = fixture.copy()
- new.prepare_test_list()
- assert new.test_list != fixture.test_list
-
class TestTestDict(object):
"""Tests for the TestDict object."""