Skip to content

Commit

Permalink
Testing: Run a percentage of IPython console tests on slow slots for …
Browse files Browse the repository at this point in the history
…Windows
  • Loading branch information
ccordoba12 committed Feb 2, 2023
1 parent 9475673 commit 137eb14
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def pytest_collection_modifyitems(config, items):

# Break test suite in CIs according to the following criteria:
# * Mark all main window tests, and a percentage of the IPython console
# ones on Linux and Mac, as slow.
# ones, as slow.
# * All other tests will be considered as fast.
# This provides a more balanced partitioning of our test suite (in terms of
# necessary time to run it) between the slow and fast slots we have on CIs.
Expand All @@ -79,19 +79,20 @@ def pytest_collection_modifyitems(config, items):
item for item in items if 'test_mainwindow' in item.nodeid
]

if not os.name == 'nt':
ipyconsole_items = [
item for item in items if 'test_ipythonconsole' in item.nodeid
]
ipyconsole_items = [
item for item in items if 'test_ipythonconsole' in item.nodeid
]

if sys.platform == 'darwin':
percentage = 0.6
else:
percentage = 0.5
if os.name == 'nt':
percentage = 0.6
elif sys.platform == 'darwin':
percentage = 0.6
else:
percentage = 0.5

for i, item in enumerate(ipyconsole_items):
if i < len(ipyconsole_items) * percentage:
slow_items.append(item)
for i, item in enumerate(ipyconsole_items):
if i < len(ipyconsole_items) * percentage:
slow_items.append(item)

for item in items:
if slow_option:
Expand Down

0 comments on commit 137eb14

Please sign in to comment.