cucu 1.3.13__py3-none-any.whl → 1.3.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cucu/cli/core.py CHANGED
@@ -524,6 +524,7 @@ def _generate_report(
524
524
  report_folder: Path,
525
525
  only_failures: False,
526
526
  junit_folder: Path | None = None,
527
+ combine: bool = False,
527
528
  ):
528
529
  if report_folder.exists():
529
530
  shutil.rmtree(report_folder)
@@ -531,7 +532,7 @@ def _generate_report(
531
532
  report_folder.mkdir(parents=True, exist_ok=True)
532
533
 
533
534
  if results_dir.exists():
534
- consolidate_database_files(results_dir)
535
+ consolidate_database_files(results_dir, combine)
535
536
 
536
537
  report_location = reporter.generate(
537
538
  results_dir, report_folder, only_failures=only_failures
@@ -590,6 +591,12 @@ def _generate_report(
590
591
  "the same location as --results",
591
592
  type=click.Path(path_type=Path),
592
593
  )
594
+ @click.option(
595
+ "--combine",
596
+ default=False,
597
+ is_flag=True,
598
+ help="combine multiple cucu_runs into a single report",
599
+ )
593
600
  def report(
594
601
  results_dir: Path,
595
602
  only_failures,
@@ -597,6 +604,7 @@ def report(
597
604
  show_skips,
598
605
  output: Path,
599
606
  junit: Path,
607
+ combine: bool,
600
608
  ):
601
609
  """
602
610
  generate a test report from a results directory
@@ -627,6 +635,7 @@ def report(
627
635
  report_folder=output,
628
636
  only_failures=only_failures,
629
637
  junit_folder=junit,
638
+ combine=combine,
630
639
  )
631
640
 
632
641
 
cucu/db.py CHANGED
@@ -411,16 +411,23 @@ def get_first_cucu_run_filepath():
411
411
  return run_record.filepath
412
412
 
413
413
 
414
- def consolidate_database_files(results_dir):
414
+ def consolidate_database_files(results_dir, combine=False):
415
415
  # This function would need a more advanced approach with peewee, so for now, keep using sqlite3 for consolidation
416
416
  results_path = Path(results_dir)
417
417
  target_db_path = results_path / "run.db"
418
418
  if not target_db_path.exists():
419
419
  create_database_file(target_db_path)
420
420
 
421
- db_files = [
422
- db for db in results_path.glob("**/run*.db") if db.name != "run.db"
423
- ]
421
+ if not combine:
422
+ db_files = [
423
+ db for db in results_path.glob("**/run*.db") if db.name != "run.db"
424
+ ]
425
+ else:
426
+ # include all run.db files in all subdirectories
427
+ db_files = [
428
+ db for db in results_path.rglob("run*.db") if db != Path("run.db")
429
+ ]
430
+
424
431
  tables_to_copy = ["cucu_run", "worker", "feature", "scenario", "step"]
425
432
  with sqlite3.connect(target_db_path) as target_conn:
426
433
  target_cursor = target_conn.cursor()
@@ -451,7 +458,7 @@ def consolidate_database_files(results_dir):
451
458
  )
452
459
  target_conn.commit()
453
460
 
454
- if db_file.name != "run.db":
461
+ if not combine and db_file.name != "run.db":
455
462
  # remove the worker db files
456
463
  db_file.unlink()
457
464
 
@@ -35,7 +35,7 @@ def run_webserver_for_scenario(ctx, directory, variable):
35
35
  CONFIG[variable] = str(port)
36
36
 
37
37
  with socket.create_connection(("localhost", port), timeout=5):
38
- logger.debug(f"Webserver is running at {port=}port")
38
+ logger.debug(f"Webserver is running at {port=}")
39
39
 
40
40
  def shutdown_webserver(_):
41
41
  httpd.shutdown()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cucu
3
- Version: 1.3.13
3
+ Version: 1.3.14
4
4
  Summary: Easy BDD web testing
5
5
  Keywords: cucumber,selenium,behave
6
6
  Author: Domino Data Lab, Rodney Gomes, Cedric Young, Xin Dong, Kavya Yakkati, Kevin Garton, Joy Liao
@@ -7,12 +7,12 @@ cucu/browser/frames.py,sha256=IW7kzRJn5PkbMaovIelAeCWO-T-2sOTwqaYBw-0-LKU,3545
7
7
  cucu/browser/selenium.py,sha256=eUC2DZkhUIZi70sVTaNE_0AhanGTceyx_pCLIT7PN6o,13299
8
8
  cucu/browser/selenium_tweaks.py,sha256=oUIhWVhBZbc9qsmQUJMpIr9uUWKxtgZBcnySWU6Yttk,879
9
9
  cucu/cli/__init__.py,sha256=uXX5yVG1konJ_INdlrcfMg-Tt_5_cSx29Ed8R8v908A,62
10
- cucu/cli/core.py,sha256=rdnMNvTletzjFeA1JFzc2wF_Hd_YI0KFMe1M0eAvA00,27298
10
+ cucu/cli/core.py,sha256=-3TWxedDNMR1Jg7qNF5GLdvgn7KgthMwQ0hfeyJi1eg,27509
11
11
  cucu/cli/run.py,sha256=6w7lkgf3iWsg9lqrmCJEWmOHGRXJFbVyZItVGGk_9gM,6105
12
12
  cucu/cli/steps.py,sha256=5-aOGf3fmcnge4pcFM__4shcA3PZwjKe6oZN6XKY1pM,4215
13
13
  cucu/cli/thread_dumper.py,sha256=Z3XnYSxidx6pqjlQ7zu-TKMIYZWk4z9c5YLdPkcemiU,1593
14
14
  cucu/config.py,sha256=Pi59JiRcCdzugDwraM4R1hXRkP52123z0hSP8X6lyzI,14970
15
- cucu/db.py,sha256=ofJZQjGw_dBp-WpgG-CjEXOzotagi1n_T_AGL2QRSVY,15082
15
+ cucu/db.py,sha256=ZadBBvwwzlHTi-MXMrHlSudpn61zxaTQsDMfCjSGnNk,15323
16
16
  cucu/edgedriver_autoinstaller/README.md,sha256=tDkAWIqgRdCjt-oX1nYqikIC_FfiOEM2-pc5S5VbRLo,84
17
17
  cucu/edgedriver_autoinstaller/__init__.py,sha256=fo6xJJPvcc5Xvni8epXfxDoPxJH5_b6Vk2jD9JTwfRs,969
18
18
  cucu/edgedriver_autoinstaller/utils.py,sha256=iRKTww77CGaTAntt_QDvxlKPxpMU4otx95OeD97khcM,6802
@@ -86,9 +86,9 @@ cucu/steps/table_steps.py,sha256=Xf_9sMZXJRaO64Sd12vCnBm9Olxq1qyyfHHpy_hveWI,137
86
86
  cucu/steps/tables.js,sha256=Os2a7Fo-cg03XVli7USvcnBVad4N7idXr-HBuzdLvVQ,945
87
87
  cucu/steps/text_steps.py,sha256=Jj_GHoHeemNwVdUOdqcehArNp7WM-WMjljA4w0pLXuw,2576
88
88
  cucu/steps/variable_steps.py,sha256=WSctH3_xcxjijGPYZlxp-foC_SIAAKtF__saNtgZJbk,2966
89
- cucu/steps/webserver_steps.py,sha256=wWkpSvcSMdiskPkh4cqlepWx1nkvEpTU2tRXQmPDbyo,1410
89
+ cucu/steps/webserver_steps.py,sha256=i11xOmSjhhrQ-2QrDfpjDhWroeJuuGKvbYEsHV1cioI,1406
90
90
  cucu/utils.py,sha256=LCcs8sMzvdvH05N8P5QYO4lO6j-_PQC530mEAD96go8,10957
91
- cucu-1.3.13.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
92
- cucu-1.3.13.dist-info/entry_points.txt,sha256=11WRIhQM7LuUnQg1lAoZQoNvvBvYNN1maDgQS4djwJo,40
93
- cucu-1.3.13.dist-info/METADATA,sha256=-BJsZqK7AOpXZK6eQ6Qlh5psQCo3CmtM3l3R_3zHYvU,16722
94
- cucu-1.3.13.dist-info/RECORD,,
91
+ cucu-1.3.14.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
92
+ cucu-1.3.14.dist-info/entry_points.txt,sha256=11WRIhQM7LuUnQg1lAoZQoNvvBvYNN1maDgQS4djwJo,40
93
+ cucu-1.3.14.dist-info/METADATA,sha256=O06K0LOySNXhSXlxm1DR8pXT9M5bgMTMEwKiGIa5Bj0,16722
94
+ cucu-1.3.14.dist-info/RECORD,,
File without changes