@@ -287,9 +287,13 @@ def compile_sketches(self, sketches, iframe=False, logfile=None):
287
287
format string, which will be formatted appropriately.
288
288
`iframe` specifies whether the urls pointed to by `selector` are contained
289
289
within an iframe.
290
+ If the `--full` argument is provided (and hence
291
+ `self.run_full_compile_tests` is `True`, we do not log, and limit the
292
+ number of sketches compiled to 1.
290
293
"""
291
- if logfile is None :
292
- for sketch in sketches :
294
+ sketch_limit = None if self .run_full_compile_tests else 1
295
+ if logfile is None or not self .run_full_compile_tests :
296
+ for sketch in sketches [:sketch_limit ]:
293
297
self .compile_sketch (sketch , iframe = iframe )
294
298
else :
295
299
log_entry = {'url' : self .site_url , 'succeeded' : [], 'failed' : []}
@@ -322,14 +326,15 @@ class SeleniumTestCase(CodebenderSeleniumBot):
322
326
323
327
@classmethod
324
328
@pytest .fixture (scope = "class" , autouse = True )
325
- def _testcase_attrs (cls , webdriver , testing_url ):
329
+ def _testcase_attrs (cls , webdriver , testing_url , testing_full ):
326
330
"""Sets up any class attributes to be used by any SeleniumTestCase.
327
331
Here, we just store fixtures as class attributes. This allows us to avoid
328
332
the pytest boilerplate of getting a fixture value, and instead just
329
333
refer to the fixture as `self.<fixture>`.
330
334
"""
331
335
cls .driver = webdriver
332
336
cls .site_url = testing_url
337
+ cls .run_full_compile_tests = testing_full
333
338
334
339
@pytest .fixture (scope = "class" )
335
340
def tester_login (self ):
0 commit comments