1. 21 Nov, 2019 17 commits
  2. 19 Nov, 2019 1 commit
    • Jérome Perrin's avatar
      Test Suite for Coding Style test · 82206749
      Jérome Perrin authored
      A new test suite to perform static check on business templates using  `CodingStyleTestCase`.
      
      This runs a coding style test for each business template, after installing the business template and its dependencies listed in business template metadata.
      
      ---
      
      In order to start with a test suite with no failure, business templates that does not pass this test today (because they don't install or because pylint issues still needs to be reviewed) are skipped with an ad-hoc  `bt/skip_coding_style_test` in the business template. Note that this file is not created by business template system as it is a temporary measure, business templates must pass pylint and other checks from `CodingStyleTestCase`.
      
      ---
      
      I took the approach of creating one independent test per business template, instead of the approach of creating a site with all business templates like we did in testNamingConventions or testHTML. This appears as another "Coding Style" test, like Performance or Scalability tests.
      
      The idea behind this was that if we extend our business template checks ( for example when we translate the [ERP5 Module Creation Guidelines](https://www.erp5.com/documentation/developer/guideline/module) to some scripts we can run on a business template ), we can check that each business template contain what it should contain and not just that the global result is OK.
      
      
      
      /reviewed-on nexedi/erp5!629
      82206749
  3. 18 Nov, 2019 5 commits
  4. 15 Nov, 2019 2 commits
  5. 14 Nov, 2019 9 commits
  6. 13 Nov, 2019 2 commits
  7. 12 Nov, 2019 3 commits
    • Jérome Perrin's avatar
      fixup! pdm: introduce a asCellRange script for Measure · 08bf6d94
      Jérome Perrin authored
      from a41f71c3 :
      > Remove the TALES for lines, columns and tab on the matrix box because
      > the default behavior is to call this updateCellRange script
      
      that's not true, we have to list the asCellRange script explicitly.
      08bf6d94
    • Arnaud Fontaine's avatar
      ZODB Components: ModuleSecurityInfo() should also apply to the alias module,... · eabcb211
      Arnaud Fontaine authored
      ZODB Components: ModuleSecurityInfo() should also apply to the alias module, not only to the versioned one.
      
      This fixes an Unauthorized error when GitLoginError is imported from
      erp5.component.module.Git defining ModuleSecurityInfo() for __name__
      (erp5.component.module.erp5_version.Git).
      
      Note that when migrating the content of a Product, ModuleSecurityInfo() first
      parameter must be __name__.
      
      Traceback (innermost last):
        [...]
        Module script, line 1, in BusinessTemplate_handleException
         - <PythonScript at /erp5/BusinessTemplate_handleException used for /erp5/portal_templates/832>
         - Line 1
          from erp5.component.module.Git import GitLoginError
        Module Products.ERP5Type.patches.Restricted, line 305, in guarded_import
          return orig_guarded_import(mname, globals, locals, fromlist, level)
        Module AccessControl.ZopeGuards, line 305, in guarded_import
          raise Unauthorized("import of '%s' is unauthorized" % mname)
      Unauthorized: import of 'erp5.component.module.Git' is unauthorized
      eabcb211
    • Arnaud Fontaine's avatar
      ZODB Components: Alias module was not added to sys.modules if the module it... · 223d4818
      Arnaud Fontaine authored
      ZODB Components: Alias module was not added to sys.modules if the module it points to had already been loaded before.
      223d4818
  8. 11 Nov, 2019 1 commit