test_table.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. """
  2. test table case
  3. """
  4. import os
  5. import shutil
  6. import json
  7. from lib import calculate_score
  8. import pytest
  9. from conf import conf
  10. code_path = os.environ.get('GITHUB_WORKSPACE')
  11. pdf_dev_path = conf.conf["pdf_dev_path"]
  12. pdf_res_path = conf.conf["pdf_res_path"]
  13. class TestTable():
  14. """
  15. test table
  16. """
  17. def test_paddle_table_master_cuda(self):
  18. """
  19. select table: paddle table master,mode is cuda
  20. """
  21. def test_paddle_table_master_cpu(self):
  22. """
  23. select table: paddle table master, mode is cpu
  24. """
  25. def test_st_table_cuda(self):
  26. """
  27. select table: ST, mode is cuda
  28. """
  29. def test_st_table_cpu(self):
  30. """
  31. select table: ST, mode is cpu
  32. """
  33. def test_close_table_cuda(self):
  34. """
  35. close table, mode is cuda
  36. """
  37. def get_score():
  38. """
  39. get score
  40. """
  41. score = calculate_score.Scoring(os.path.join(pdf_dev_path, "result.json"))
  42. score.calculate_similarity_total("mineru", pdf_dev_path)
  43. res = score.summary_scores()
  44. return res