serge icon indicating copy to clipboard operation
serge copied to clipboard

Translation services tests

Open dragosv opened this issue 5 years ago • 2 comments

Allows testing for pootle and any other future supported translation services. Using similar declarative approach like the engine tests. Also increases real code coverage.

dragosv avatar Nov 16 '18 15:11 dragosv

Codecov Report

Merging #93 into master will increase coverage by 0.35%. The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #93      +/-   ##
==========================================
+ Coverage   51.62%   51.97%   +0.35%     
==========================================
  Files          90       90              
  Lines        6848     6848              
  Branches     1719     1719              
==========================================
+ Hits         3535     3559      +24     
+ Misses       2655     2628      -27     
- Partials      658      661       +3
Impacted Files Coverage Δ
lib/Serge/Interface/PluginHost.pm 83.33% <0%> (+5.55%) :arrow_up:
lib/Serge/Sync/Plugin/TranslationService/pootle.pm 86.66% <0%> (+76.66%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 327f2b3...7240a60. Read the comment docs.

codecov-io avatar Nov 16 '18 16:11 codecov-io

What I fail to understand from this PR is what actually is being tested here (besides one manage_py_path validity check), and the usefulness of such tests. There's no way to test against real translation services; you're using a no-op replacement for manage.py (which also implies that for tests to run successfully, Python must be present as a dependency). But right now manage.py is not even a proper executable under *nix (it has no shebang line).

All in all, it feels like this PR is more of an exploration attempt on how TS plugin testing can be implemented in the future, but not something that can be actually used. If you decide to start exploring further plugin testing options, let's discuss the approach before implementing this in the code.

iafan avatar Jun 18 '19 21:06 iafan