transformers.test_utils.TestCasePlus solves this problem by sorting out all the basic paths and provides easy
accessors to them:
pathlib objects (all fully resolved):
test_file_path - the current test file path, i.e. __file__
test_file_dir - the directory containing the current test file
tests_dir - the directory of the tests test suite
examples_dir - the directory of the examples test suite
repo_root_dir - the directory of the repository
src_dir - the directory of src (i.e. where the transformers sub-dir resides)
stringified paths---same as above but these return paths as strings, rather than pathlib objects:
test_file_path_str
test_file_dir_str
tests_dir_str
examples_dir_str
repo_root_dir_str
src_dir_str
To start using those all you need is to make sure that the test resides in a subclass of
