docstr: Returns a tuple of result and applicable test.
  
  Applicable test can be used as a reason for the result -
  e.g. to provide details to a user on why a particular file was
  selected or not.
docstr_tok: ["Returns","a","tuple","of","result","and","applicable","test",".","Applicable","test","can","be","used","as","a","reason","for","the","result","-","e.g",".","to","provide","details","to","a","user","on","why","a","particular","file","was","selected","or","not","."]
code: def test(self, src_root, relpath):
      """Returns a tuple of result and applicable test.
  
      Applicable test can be used as a reason for the result -
      e.g. to provide details to a user on why a particular file was
      selected or not.
      """
      fullpath = os.path.join(src_root, relpath)
      tests = [
          FileSelectTest("max matches", self._test_max_matches),
          FileSelectTest("pattern", self._test_patterns, relpath),
          FileSelectTest("type", self._test_type, fullpath),
          FileSelectTest("size", self._test_size, fullpath),
      ]
      for test in tests:
          if not test():
              return None, test
      self._matches += 1
      return self.result, None
  
imports: import fnmatch
  import glob
  import logging
  import os
  import re
  import shutil
  from guild import util
label_desc: Use image node_id 9 for calling the FileSelectRule obj's underlying member method code with example usage: obj.test(src_root, relpath) and returns: self,  None, None,  test