<commit_before>import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
                  "%s/.." % bindir, "%s/../.libs" % bindir ]
import unittest
import pool
import trac.versioncontrol.tests

# Run all tests

def suite():
  """Run all tests"""
  suite = unittest.TestSuite()
  suite.addTest(pool.suite())
  suite.addTest(trac.versioncontrol.tests.suite());
  return suite

if __name__ == '__main__':
  unittest.main(defaultTest='suite')
<commit_msg>Make the Python bindings testsuite be able to find the needed shared libraries on Cygwin. Needed to compensate for Windows' complete lack of library RPATHs.<commit_after>import sys, os
bindir = os.path.dirname(sys.argv[0])
sys.path[0:0] = [ os.getcwd(), "%s/.libs" % os.getcwd(), \
                  "%s/.." % bindir, "%s/../.libs" % bindir ]

# OSes without RPATH support are going to have to do things here to make
# the correct shared libraries be found.
if sys.platform == 'cygwin':
  import glob
  svndir = os.path.dirname(os.path.dirname(os.path.dirname(os.getcwd())))
  libpath = os.getenv("PATH").split(":")
  libpath.insert(0, "%s/libsvn_swig_py/.libs" % os.getcwd())
  for libdir in glob.glob("%s/libsvn_*" % svndir):
    libpath.insert(0, "%s/.libs" % (libdir))
  os.putenv("PATH", ":".join(libpath))

import unittest
import pool
import trac.versioncontrol.tests

# Run all tests

def suite():
  """Run all tests"""
  suite = unittest.TestSuite()
  suite.addTest(pool.suite())
  suite.addTest(trac.versioncontrol.tests.suite());
  return suite

if __name__ == '__main__':
  unittest.main(defaultTest='suite')

{'fraction_non_alphanumeric': 0.1684081130915796, 'fraction_numerical': 0.004917025199754148, 'mean_word_length': 3.874251497005988, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3307127', 'n_tokens_mistral': 583, 'n_tokens_neox': 570, 'n_words': 140}