Пример #1
0
 def test_main__with_use_existing_clusters(self):
     results = main(
         inbox_dir=self.inbox_dir,
         output_dir=self.output_dir,
         watch_dir_list=["zdjecia", "clusters"],
         development_mode=self.development_mode,
         drop_duplicates=False,
         use_existing_clusters=True,
         force_deep_scan=self.force_deep_scan,
     )
Пример #2
0
    def test_main__with_skip_duplicates_and_use_existing_clusters(self):
        results = main(
            inbox_dir=self.inbox_dir,
            output_dir=self.output_dir,
            watch_dir_list=["zdjecia", "clusters"],
            development_mode=self.development_mode,
            drop_duplicates=True,
            use_existing_clusters=True,
            force_deep_scan=self.force_deep_scan,
        )
        n_new_folder_res = len(results["new_folder_names"])
        n_new_folder_exp = 15
        assert n_new_folder_res == n_new_folder_exp

        n_new_cluster_res = len(results["new_cluster_df"])
        n_new_cluster_exp = 15
        assert n_new_cluster_res == n_new_cluster_exp
Пример #3
0
    def test_main__minimal(self):
        results = main(
            inbox_dir=self.inbox_dir,
            output_dir=self.output_dir,
            watch_dir_list=[],
            development_mode=self.development_mode,
            drop_duplicates=False,
            use_existing_clusters=False,
            force_deep_scan=self.force_deep_scan,
        )
        n_new_folder_res = len(results["new_folder_names"])
        n_new_folder_exp = 17
        assert n_new_folder_res == n_new_folder_exp

        n_new_cluster_res = len(results["new_cluster_df"])
        n_new_cluster_exp = 17
        assert n_new_cluster_res == n_new_cluster_exp
Пример #4
0
    title="Media cluster by event.",
    layout=layout,
    default_element_size=(40, 1),
    grab_anywhere=False,
)

event, values = window.read()

window.close()

# parse values and event
sg.popup(
    "Title",
    "The results of the window.",
    f'The button clicked was "{event}"',
    "The values are",
    values,
)

main(
    inbox_dir=values["inbox"],
    output_dir=values["output"],
    watch_dir_list=[values["lib_1"]],
    development_mode=False,
    no_operation=values["dry_run"],
    copy_mode=values["copy"],
    force_deep_scan=values["force_deep_scan"],
    drop_duplicates=values["drop_duplicates"],
    use_existing_clusters=values["use_existing"],
)