"""A file to define py.test fixtures that are used across more than one test file."""
import pytest
import iati.core.constants


@pytest.fixture(params=[
    ('2.02', 62),  # There are 38 embedded codelists at v2.02, plus 24 non-embedded codelists (which are valid for any version)
    ('2.01', 61),  # There are 37 embedded codelists at v2.01, plus 24 non-embedded codelists (which are valid for any version)
    ('1.05', 59),  # There are 35 embedded codelists at v1.05, plus 24 non-embedded codelists (which are valid for any version)
    ('1.04', 59)  # There are 35 embedded codelists at v1.04, plus 24 non-embedded codelists (which are valid for any version)
])
def codelist_lengths_by_version(request):
    return request.param


@pytest.fixture(params=['no_arguments', None] + iati.core.constants.STANDARD_VERSIONS)
def standard_version_optional(request):
    """Return a list that can be used as variable positional parameters (i.e. `*standard_version_optional`) to test.
    This can then be used in tests which have an optional parameter for the version, or expect None.

    Returns:
        list: Either i) an empty list, ii) a list containing None, or iii) a string which corresponds to a version of the Standard.

    """
    arg = request.param

    if arg == 'no_arguments':
        return []
    else:
        return [arg]

@@ -894,126 +894,261 @@
  be 
-u
+pas
 sed 
-as variable positional parameters (i.e. %60*standard_version_optional%60) to test.
+to a function using the argument list unpacking functionality - see https://docs.python.org/3.6/tutorial/controlflow.html#unpacking-argument-lists
 %0A    
-This can then be used in tests
+For example, the returned list can be used to test functions (such as %60get_all_codelist_paths%60)
  whi
@@ -1152,18 +1152,17 @@
 which ha
-ve
+s
  an opti
@@ -1200,19 +1200,123 @@
  or 
+can 
 expect 
-None
+version=None.,%0A    In this case test usage would be %60get_all_codelist_paths(*standard_version_optional)%60
 .%0A%0A 

Improve documentation for fixture that uses argument list unpacking