instance_id
stringlengths
10
57
patch
stringlengths
261
37.7k
repo
stringlengths
7
53
base_commit
stringlengths
40
40
hints_text
stringclasses
301 values
test_patch
stringlengths
212
2.22M
problem_statement
stringlengths
23
37.7k
version
stringclasses
1 value
environment_setup_commit
stringlengths
40
40
FAIL_TO_PASS
listlengths
1
4.94k
PASS_TO_PASS
listlengths
0
7.82k
meta
dict
created_at
stringlengths
25
25
license
stringclasses
8 values
__index_level_0__
int64
0
6.41k
datalad__datalad-next-495
diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml new file mode 100644 index 0000000..e1e2d36 --- /dev/null +++ b/.github/workflows/mypy.yml @@ -0,0 +1,26 @@ +name: Type annotation + +on: + push: + paths: + - '*.py' + +jobs: + mypy: + runs-on: ubuntu-latest + steps: + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.8 + architecture: x64 + - name: Checkout + uses: actions/checkout@v3 + - name: Install mypy + run: pip install mypy + - name: Run mypy + uses: sasanquaneuf/mypy-github-action@releases/v1 + with: + checkName: 'mypy' # NOTE: this needs to be the same as the job name + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/changelog.d/20231023_064405_michael.hanke_www_auth.md b/changelog.d/20231023_064405_michael.hanke_www_auth.md new file mode 100644 index 0000000..f4752d5 --- /dev/null +++ b/changelog.d/20231023_064405_michael.hanke_www_auth.md @@ -0,0 +1,8 @@ +### 🏠 Internal + +- The `www-authenticate` dependencies is dropped. The functionality is + replaced by a `requests`-based implementation of an alternative parser. + This trims the dependency footprint and facilitates Debian-packaging. + The previous test cases are kept and further extended. + Fixes https://github.com/datalad/datalad-next/issues/493 via + https://github.com/datalad/datalad-next/pull/495 (by @mih) diff --git a/datalad_next/url_operations/http.py b/datalad_next/url_operations/http.py index 854677c..5d660e0 100644 --- a/datalad_next/url_operations/http.py +++ b/datalad_next/url_operations/http.py @@ -9,11 +9,13 @@ import sys from typing import Dict import requests from requests_toolbelt import user_agent -import www_authenticate import datalad -from datalad_next.utils.requests_auth import DataladAuth +from datalad_next.utils.requests_auth import ( + DataladAuth, + parse_www_authenticate, +) from . import ( UrlOperations, UrlOperationsRemoteError, @@ -233,7 +235,7 @@ class HttpUrlOperations(UrlOperations): headers=headers, ) if 'www-authenticate' in req.headers: - props['auth'] = www_authenticate.parse( + props['auth'] = parse_www_authenticate( req.headers['www-authenticate']) props['is_redirect'] = True if req.history else False props['status_code'] = req.status_code diff --git a/datalad_next/utils/requests_auth.py b/datalad_next/utils/requests_auth.py index 62cb5a4..fb4f3ce 100644 --- a/datalad_next/utils/requests_auth.py +++ b/datalad_next/utils/requests_auth.py @@ -7,7 +7,6 @@ import logging from typing import Dict from urllib.parse import urlparse import requests -import www_authenticate from datalad_next.config import ConfigManager from datalad_next.utils import CredentialManager @@ -16,7 +15,77 @@ from datalad_next.utils.http_helpers import get_auth_realm lgr = logging.getLogger('datalad.ext.next.utils.requests_auth') -__all__ = ['DataladAuth', 'HTTPBearerTokenAuth'] +__all__ = ['DataladAuth', 'HTTPBearerTokenAuth', 'parse_www_authenticate'] + + +def parse_www_authenticate(hdr: str) -> dict: + """Parse HTTP www-authenticate header + + This helper uses ``requests`` utilities to parse the ``www-authenticate`` + header as represented in a ``requests.Response`` instance. The header may + contain any number of challenge specifications. + + The implementation follows RFC7235, where a challenge parameters set is + specified as: either a comma-separated list of parameters, or a single + sequence of characters capable of holding base64-encoded information, + and parameters are name=value pairs, where the name token is matched + case-insensitively, and each parameter name MUST only occur once + per challenge. + + Returns + ------- + dict + Keys are casefolded challenge labels (e.g., 'basic', 'digest'). + Values are: ``None`` (no parameter), ``str`` (a token68), or + ``dict`` (name/value mapping of challenge parameters) + """ + plh = requests.utils.parse_list_header + pdh = requests.utils.parse_dict_header + challenges = {} + challenge = None + # challenges as well as their properties are in a single + # comma-separated list + for item in plh(hdr): + # parse the item into a key/value set + # the value will be `None` if this item was no mapping + k, v = pdh(item).popitem() + # split the key to check for a challenge spec start + key_split = k.split(' ', maxsplit=1) + if len(key_split) > 1 or v is None: + item_suffix = item[len(key_split[0]) + 1:] + challenge = [item[len(key_split[0]) + 1:]] if item_suffix else None + challenges[key_split[0].casefold()] = challenge + else: + # implementation logic assumes that the above conditional + # was triggered before we ever get here + assert challenge + challenge.append(item) + + return { + challenge: _convert_www_authenticate_items(items) + for challenge, items in challenges.items() + } + + +def _convert_www_authenticate_items(items: list) -> None | str | dict: + pdh = requests.utils.parse_dict_header + # according to RFC7235, items can be: + # either a comma-separated list of parameters + # or a single sequence of characters capable of holding base64-encoded + # information. + # parameters are name=value pairs, where the name token is matched + # case-insensitively, and each parameter name MUST only occur once + # per challenge. + if items is None: + return None + elif len(items) == 1 and pdh(items[0].rstrip('=')).popitem()[1] is None: + # this items matches the token68 appearance (no name value + # pair after potential base64 padding its removed + return items[0] + else: + return { + k.casefold(): v for i in items for k, v in pdh(i).items() + } class DataladAuth(requests.auth.AuthBase): @@ -201,7 +270,7 @@ class DataladAuth(requests.auth.AuthBase): # www-authenticate with e.g. 403s return r # which auth schemes does the server support? - auth_schemes = www_authenticate.parse(r.headers['www-authenticate']) + auth_schemes = parse_www_authenticate(r.headers['www-authenticate']) ascheme, credname, cred = self._get_credential(r.url, auth_schemes) if cred is None or 'secret' not in cred: diff --git a/setup.cfg b/setup.cfg index 8e31daa..3f6897a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,7 +16,6 @@ python_requires = >= 3.8 install_requires = annexremote datalad >= 0.18.4 - www-authenticate humanize packages = find_namespace: include_package_data = True
datalad/datalad-next
6a2d65eaec84a7e380a7077c4642c938f590ce88
diff --git a/datalad_next/utils/tests/test_parse_www_authenticate.py b/datalad_next/utils/tests/test_parse_www_authenticate.py new file mode 100644 index 0000000..d69fcd6 --- /dev/null +++ b/datalad_next/utils/tests/test_parse_www_authenticate.py @@ -0,0 +1,45 @@ + +from ..requests_auth import parse_www_authenticate + + +challenges = ( + # just challenge type + ('Negotiate', + [('negotiate', None)]), + # challenge and just a token, tolerate any base64 padding + ('Negotiate abcdef', + [('negotiate', 'abcdef')]), + ('Negotiate abcdef=', + [('negotiate', 'abcdef=')]), + ('Negotiate abcdef==', + [('negotiate', 'abcdef==')]), + # standard bearer + ('Bearer realm=example.com', + [('bearer', {'realm': 'example.com'})]), + # standard digest + ('Digest realm="example.com", qop="auth,auth-int", nonce="abcdef", ' + 'opaque="ghijkl"', + [('digest', {'realm': 'example.com', 'qop': 'auth,auth-int', + 'nonce': 'abcdef', 'opaque': 'ghijkl'})]), + # multi challenge + ('Basic speCial="paf ram", realm="basIC", ' + 'Bearer, ' + 'Digest realm="[email protected]", qop="auth, auth-int", ' + 'algorithm=MD5', + [('basic', {'special': 'paf ram', 'realm': 'basIC'}), + ('bearer', None), + ('digest', {'realm': "[email protected]", 'qop': "auth, auth-int", + 'algorithm': 'MD5'})]), + # same challenge, multiple times, last one wins + ('Basic realm="basIC", ' + 'Basic realm="complex"', + [('basic', {'realm': 'complex'})]), +) + + +def test_parse_www_authenticate(): + for hdr, targets in challenges: + res = parse_www_authenticate(hdr) + for ctype, props in targets: + assert ctype in res + assert res[ctype] == props
Replace `www-authenticate` We need this as a dependency for #490. However, packaging it for Debian seems like overkill. The whole thing is ~80 lines of code in a single file. The last update was 8 years ago. I would consider adopting a copy, unless @basilgello has other preferences.
0.0
6a2d65eaec84a7e380a7077c4642c938f590ce88
[ "datalad_next/utils/tests/test_parse_www_authenticate.py::test_parse_www_authenticate" ]
[]
{ "failed_lite_validators": [ "has_issue_reference", "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-10-22 20:17:25+00:00
mit
1,834
datalad__datalad-next-518
diff --git a/changelog.d/20231026_185357_michael.hanke_archivist_tgz.md b/changelog.d/20231026_185357_michael.hanke_archivist_tgz.md new file mode 100644 index 0000000..f41dadc --- /dev/null +++ b/changelog.d/20231026_185357_michael.hanke_archivist_tgz.md @@ -0,0 +1,6 @@ +### 💫 Enhancements and new features + +- The `archivist` remote now supports archive type detection + from `*E`-type annex keys for `.tgz` archives too. + Fixes https://github.com/datalad/datalad-next/issues/517 via + https://github.com/datalad/datalad-next/pull/518 (by @mih) diff --git a/datalad_next/types/archivist.py b/datalad_next/types/archivist.py index 12e9b2b..17c538d 100644 --- a/datalad_next/types/archivist.py +++ b/datalad_next/types/archivist.py @@ -74,7 +74,7 @@ class ArchivistLocator: """ akey: AnnexKey member: PurePosixPath - size: int + size: int | None = None # datalad-archives did not have the type info, we want to be # able to handle those too, make optional atype: ArchiveType | None = None @@ -91,21 +91,21 @@ class ArchivistLocator: @classmethod def from_str(cls, url: str): """Return ``ArchivistLocator`` from ``str`` form""" - url_matched = _recognized_urls.match(url) - if not url_matched: + url_match = _recognized_urls.match(url) + if not url_match: raise ValueError('Unrecognized dl+archives locator syntax') - url_matched = url_matched.groupdict() + url_matched = url_match.groupdict() # convert to desired type akey = AnnexKey.from_str(url_matched['key']) # archive member properties - props_matched = _archive_member_props.match(url_matched['props']) - if not props_matched: + props_match = _archive_member_props.match(url_matched['props']) + if not props_match: # without at least a 'path' there is nothing we can do here raise ValueError( 'dl+archives locator contains invalid archive member ' f'specification: {url_matched["props"]!r}') - props_matched = props_matched.groupdict() + props_matched = props_match.groupdict() amember_path = PurePosixPath(props_matched['path']) if amember_path.is_absolute(): raise ValueError( @@ -116,6 +116,8 @@ class ArchivistLocator: # size is optional, regex ensure that it is an int size = props_matched.get('size') + if size is not None: + size = int(size) # archive type, could be None atype = props_matched.get('atype') @@ -134,6 +136,8 @@ class ArchivistLocator: atype = ArchiveType.zip elif '.tar' in suf: atype = ArchiveType.tar + elif '.tgz' in suf: + atype = ArchiveType.tar return cls( akey=akey,
datalad/datalad-next
1f7d9f5fc2874078600fc64009428550c720823f
diff --git a/datalad_next/types/tests/test_archivist.py b/datalad_next/types/tests/test_archivist.py index 8f78163..b3d03ac 100644 --- a/datalad_next/types/tests/test_archivist.py +++ b/datalad_next/types/tests/test_archivist.py @@ -23,6 +23,12 @@ def test_archivistlocator(): assert ArchivistLocator.from_str( 'dl+archive:MD5E-s1--e9f624eb778e6f945771c543b6e9c7b2.tar#path=f.txt' ).atype == ArchiveType.tar + assert ArchivistLocator.from_str( + 'dl+archive:MD5E-s1--e9f624eb778e6f945771c543b6e9c7b2.tgz#path=f.txt' + ).atype == ArchiveType.tar + assert ArchivistLocator.from_str( + 'dl+archive:MD5E-s1--e9f624eb778e6f945771c543b6e9c7b2.tar.gz#path=f.txt' + ).atype == ArchiveType.tar assert ArchivistLocator.from_str( 'dl+archive:MD5E-s1--e9f624eb778e6f945771c543b6e9c7b2.zip#path=f.txt' ).atype == ArchiveType.zip
archivist special remote: add support for tar archives with `.tgz` extension I'm working on building a dataset from `.tgz` archives using the replacement for `add-archive-content` demonstrated [here](https://github.com/datalad/datalad-next/issues/183#issuecomment-1539943754) in combination with the archivist special remote. The demo below works if the archive is a `.tar.gz` extension but not with `.tgz`. With `.tgz`, I need to configure the `archivist.legacy-mode` for a successful `datalad get`. Here's a quick demo: ```shell % mkdir project % touch project/file1.txt project/file2.txt project/file3.txt % tar -czvf project.tgz project ``` ```shell % datalad create tmp && cd tmp % cp ../project.tgz ./ % datalad save -m "add archive" project.tgz % git annex initremote archivist type=external externaltype=archivist encryption=none autoenable=true % archivekey=$(git annex lookupkey project.tgz) % datalad -f json ls-file-collection tarfile project.tgz --hash md5 | jq '. | select(.type == "file")' | jq --slurp . | datalad addurls --key 'et:MD5-s{size}--{hash-md5}' - "dl+archive:${archivekey}#path={item}&size={size}" '{item}' % filekey=$(git annex lookupkey project/file1.txt) % archivist_uuid=$(git annex info archivist | grep 'uuid' | cut -d ' ' -f 2) % git annex setpresentkey $filekey $archivist_uuid 1 % datalad get project/file1.txt get(error): project/file1.txt (file) [Could not obtain 'MD5E-s0--d41d8cd98f00b204e9800998ecf8427e.txt' -caused by- NotImplementedError] ``` ```shell % datalad configuration --scope local set datalad.archivist.legacy-mode=yes 1 ! set_configuration(ok): . [datalad.archivist.legacy-mode=yes] % datalad get project/file1.txt [INFO ] datalad-archives special remote is using an extraction cache under /playground/loj/abcd/tmp3/.git/datalad/tmp/archives/8bc4249de3. Remove it with DataLad's 'clean' command to save disk space. get(ok): project/file1.txt (file) [from archivist...] ``` <details><summary>datalad wtf</summary> ``` # WTF ## configuration <SENSITIVE, report disabled by configuration> ## credentials - keyring: - active_backends: - PlaintextKeyring with no encyption v.1.0 at /home/loj/.local/share/python_keyring/keyring_pass.cfg - config_file: /home/loj/.config/python_keyring/keyringrc.cfg - data_root: /home/loj/.local/share/python_keyring ## datalad - version: 0.19.3 ## dependencies - annexremote: 1.6.0 - boto: 2.49.0 - cmd:7z: 16.02 - cmd:annex: 10.20221003 - cmd:bundled-git: UNKNOWN - cmd:git: 2.39.2 - cmd:ssh: 8.4p1 - cmd:system-git: 2.39.2 - cmd:system-ssh: 8.4p1 - humanize: 4.8.0 - iso8601: 2.1.0 - keyring: 24.2.0 - keyrings.alt: 5.0.0 - msgpack: 1.0.7 - platformdirs: 3.11.0 - requests: 2.31.0 ## environment - LANG: en_US.UTF-8 - LANGUAGE: en_US.UTF-8 - LC_ALL: en_US.UTF-8 - LC_CTYPE: en_US.UTF-8 - PATH: /home/loj/.venvs/abcd-long/bin:/home/loj/.dotfiles/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/usr/local/games:/usr/games ## extensions - container: - description: Containerized environments - entrypoints: - datalad_container.containers_add.ContainersAdd: - class: ContainersAdd - module: datalad_container.containers_add - names: - containers-add - containers_add - datalad_container.containers_list.ContainersList: - class: ContainersList - module: datalad_container.containers_list - names: - containers-list - containers_list - datalad_container.containers_remove.ContainersRemove: - class: ContainersRemove - module: datalad_container.containers_remove - names: - containers-remove - containers_remove - datalad_container.containers_run.ContainersRun: - class: ContainersRun - module: datalad_container.containers_run - names: - containers-run - containers_run - module: datalad_container - version: 1.2.3 - next: - description: What is next in DataLad - entrypoints: - datalad_next.commands.create_sibling_webdav.CreateSiblingWebDAV: - class: CreateSiblingWebDAV - module: datalad_next.commands.create_sibling_webdav - names: - create-sibling-webdav - datalad_next.commands.credentials.Credentials: - class: Credentials - module: datalad_next.commands.credentials - names: - datalad_next.commands.download.Download: - class: Download - module: datalad_next.commands.download - names: - download - datalad_next.commands.ls_file_collection.LsFileCollection: - class: LsFileCollection - module: datalad_next.commands.ls_file_collection - names: - ls-file-collection - datalad_next.commands.tree.TreeCommand: - class: TreeCommand - module: datalad_next.commands.tree - names: - tree - module: datalad_next - version: 1.0.1 ## git-annex - build flags: - Assistant - Webapp - Pairing - Inotify - DBus - DesktopNotify - TorrentParser - MagicMime - Benchmark - Feeds - Testsuite - S3 - WebDAV - dependency versions: - aws-0.22 - bloomfilter-2.0.1.0 - cryptonite-0.26 - DAV-1.3.4 - feed-1.3.0.1 - ghc-8.8.4 - http-client-0.6.4.1 - persistent-sqlite-2.10.6.2 - torrent-10000.1.1 - uuid-1.3.13 - yesod-1.6.1.0 - key/value backends: - SHA256E - SHA256 - SHA512E - SHA512 - SHA224E - SHA224 - SHA384E - SHA384 - SHA3_256E - SHA3_256 - SHA3_512E - SHA3_512 - SHA3_224E - SHA3_224 - SHA3_384E - SHA3_384 - SKEIN256E - SKEIN256 - SKEIN512E - SKEIN512 - BLAKE2B256E - BLAKE2B256 - BLAKE2B512E - BLAKE2B512 - BLAKE2B160E - BLAKE2B160 - BLAKE2B224E - BLAKE2B224 - BLAKE2B384E - BLAKE2B384 - BLAKE2BP512E - BLAKE2BP512 - BLAKE2S256E - BLAKE2S256 - BLAKE2S160E - BLAKE2S160 - BLAKE2S224E - BLAKE2S224 - BLAKE2SP256E - BLAKE2SP256 - BLAKE2SP224E - BLAKE2SP224 - SHA1E - SHA1 - MD5E - MD5 - WORM - URL - X* - operating system: linux x86_64 - remote types: - git - gcrypt - p2p - S3 - bup - directory - rsync - web - bittorrent - webdav - adb - tahoe - glacier - ddar - git-lfs - httpalso - borg - hook - external - supported repository versions: - 8 - 9 - 10 - upgrade supported from repository versions: - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - version: 10.20221003 ## location - path: /playground/loj/abcd - type: directory ## metadata.extractors - container_inspect: - distribution: datalad-container 1.2.3 - load_error: ModuleNotFoundError(No module named 'datalad_metalad') - module: datalad_container.extractors.metalad_container ## metadata.filters ## metadata.indexers ## python - implementation: CPython - version: 3.9.2 ## system - distribution: debian/11/bullseye - encoding: - default: utf-8 - filesystem: utf-8 - locale.prefered: UTF-8 - filesystem: - CWD: - path: /playground/loj/abcd - HOME: - path: /home/loj - TMP: - path: /tmp - max_path_length: 276 - name: Linux - release: 5.10.0-23-amd64 - type: posix - version: #1 SMP Debian 5.10.179-1 (2023-05-12) ``` </details>
0.0
1f7d9f5fc2874078600fc64009428550c720823f
[ "datalad_next/types/tests/test_archivist.py::test_archivistlocator" ]
[ "datalad_next/types/tests/test_archivist.py::test_archivistlocatori_errors" ]
{ "failed_lite_validators": [ "has_added_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-10-26 16:56:54+00:00
mit
1,835
datalad__datalad-next-577
diff --git a/datalad_next/commands/create_sibling_webdav.py b/datalad_next/commands/create_sibling_webdav.py index 1b286ed..ba808a9 100644 --- a/datalad_next/commands/create_sibling_webdav.py +++ b/datalad_next/commands/create_sibling_webdav.py @@ -9,9 +9,6 @@ """High-level interface for creating a combi-target on a WebDAV capable server """ import logging -from typing import ( - Dict, -) from unittest.mock import patch from urllib.parse import ( quote as urlquote, @@ -38,12 +35,19 @@ from datalad_next.constraints import ( EnsureInt, EnsureParsedURL, EnsureRange, + EnsureRemoteName, EnsureStr, ) -from datalad_next.constraints.dataset import EnsureDataset +from datalad_next.constraints.dataset import ( + DatasetParameter, + EnsureDataset, +) +from datalad_next.constraints.exceptions import ( + ConstraintError, + ParameterConstraintContext, +) from datalad_next.utils import CredentialManager from datalad_next.utils import ( - ParamDictator, get_specialremote_credential_properties, update_specialremote_credential, _yield_ds_w_matching_siblings, @@ -56,37 +60,119 @@ lgr = logging.getLogger('datalad.distributed.create_sibling_webdav') class CreateSiblingWebDAVParamValidator(EnsureCommandParameterization): - def joint_validation(self, params: Dict, on_error: str) -> Dict: - p = ParamDictator(params) - if p.url.scheme == "http": + def __init__(self): + super().__init__( + param_constraints=dict( + url=EnsureParsedURL( + required=['scheme', 'netloc'], + forbidden=['query', 'fragment'], + match='^(http|https)://', + ), + dataset=EnsureDataset( + installed=True, purpose='create WebDAV sibling(s)'), + name=EnsureRemoteName(), + storage_name=EnsureRemoteName(), + mode=EnsureChoice( + 'annex', 'filetree', 'annex-only', 'filetree-only', + 'git-only', + ), + # TODO https://github.com/datalad/datalad-next/issues/131 + credential=EnsureStr(), + existing=EnsureChoice('skip', 'error', 'reconfigure'), + recursive=EnsureBool(), + recursion_limit=EnsureInt() & EnsureRange(min=0), + ), + validate_defaults=('dataset',), + joint_constraints={ + ParameterConstraintContext(('url',), 'url'): + self._validate_param_url, + ParameterConstraintContext( + ('url', 'name'), 'default name'): + self._validate_default_name, + ParameterConstraintContext( + ('mode', 'name', 'storage_name'), 'default storage name'): + self._validate_default_storage_name, + ParameterConstraintContext( + ('mode', 'name', 'storage_name'), 'default storage name'): + self._validate_default_storage_name, + ParameterConstraintContext( + ('existing', 'recursive', 'name', 'storage_name', + 'dataset', 'mode')): + self._validate_existing_names, + }, + ) + + def _validate_param_url(self, url): + if url.scheme == "http": lgr.warning( - f"Using 'http:' ({p.url.geturl()!r}) means that WebDAV " + f"Using 'http:' ({url.geturl()!r}) means that WebDAV " "credentials are sent unencrypted over network links. " "Consider using 'https:'.") - if not params['name']: + def _validate_default_name(self, url, name): + if not name: # not using .netloc to avoid ports to show up in the name - params['name'] = p.url.hostname + return {'name': url.hostname} - if p.mode in ('annex-only', 'filetree-only') and p.storage_name: + def _validate_default_storage_name(self, mode, name, storage_name): + if mode in ('annex-only', 'filetree-only') and storage_name: lgr.warning( "Sibling name will be used for storage sibling in " "storage-sibling-only mode, but a storage sibling name " "was provided" ) - if p.mode == 'git-only' and p.storage_name: + if mode == 'git-only' and storage_name: lgr.warning( "Storage sibling setup disabled, but a storage sibling name " "was provided" ) - if p.mode != 'git-only' and not p.storage_name: - p.storage_name = f"{p.name}-storage" + if mode != 'git-only' and not storage_name: + storage_name = f"{name}-storage" - if p.mode != 'git-only' and p.name == p.storage_name: + if mode != 'git-only' and name == storage_name: # leads to unresolvable, circular dependency with publish-depends - raise ValueError("sibling names must not be equal") + self.raise_for( + dict(mode=mode, name=name, storage_name=storage_name), + "sibling names must not be equal", + ) + return dict(mode=mode, name=name, storage_name=storage_name) + + def _validate_existing_names( + self, existing, recursive, name, storage_name, dataset, + mode): + if recursive: + # we don't do additional validation for recursive processing, + # this has to be done when things are running, because an + # upfront validation would require an expensive traversal + return - return params + if existing != 'error': + # nothing to check here + return + + if not isinstance(dataset, DatasetParameter): + # we did not get a proper dataset parameter, + # hence cannot tailor to a dataset to check a remote + # name against + return + + validator = EnsureRemoteName(known=False, dsarg=dataset) + try: + if mode != 'annex-only': + validator(name) + if mode != 'git-only': + validator(storage_name) + except ConstraintError as e: + self.raise_for( + dict(existing=existing, + recursive=recursive, + name=name, + storage_name=storage_name, + dataset=dataset, + mode=mode), + e.msg, + ) + return @build_doc @@ -251,29 +337,7 @@ class CreateSiblingWebDAV(ValidatedInterface): """), ) - _validators = dict( - url=EnsureParsedURL( - required=['scheme', 'netloc'], - forbidden=['query', 'fragment'], - match='^(http|https)://', - ), - dataset=EnsureDataset( - installed=True, purpose='create WebDAV sibling(s)'), - name=EnsureStr(), - storage_name=EnsureStr(), - mode=EnsureChoice( - 'annex', 'filetree', 'annex-only', 'filetree-only', 'git-only' - ), - # TODO https://github.com/datalad/datalad-next/issues/131 - credential=EnsureStr(), - existing=EnsureChoice('skip', 'error', 'reconfigure'), - recursive=EnsureBool(), - recursion_limit=EnsureInt() & EnsureRange(min=0), - ) - _validator_ = CreateSiblingWebDAVParamValidator( - _validators, - validate_defaults=('dataset',), - ) + _validator_ = CreateSiblingWebDAVParamValidator() @staticmethod @datasetmethod(name='create_sibling_webdav') diff --git a/datalad_next/constraints/__init__.py b/datalad_next/constraints/__init__.py index e6f0139..42fea3f 100644 --- a/datalad_next/constraints/__init__.py +++ b/datalad_next/constraints/__init__.py @@ -85,3 +85,8 @@ from .formats import ( EnsureURL, EnsureParsedURL, ) + +from .git import ( + EnsureGitRefName, + EnsureRemoteName +) \ No newline at end of file diff --git a/datalad_next/constraints/git.py b/datalad_next/constraints/git.py index 25f8363..073c131 100644 --- a/datalad_next/constraints/git.py +++ b/datalad_next/constraints/git.py @@ -1,8 +1,12 @@ """Constraints for Git-related concepts and parameters""" +from __future__ import annotations import subprocess -from .base import Constraint +from .base import ( + Constraint, + DatasetParameter, +) class EnsureGitRefName(Constraint): @@ -74,3 +78,101 @@ class EnsureGitRefName(Constraint): '(single-level) ' if self._allow_onelevel else '', ' or refspec pattern' if self._refspec_pattern else '', ) + + +class EnsureRemoteName(Constraint): + """Ensures a valid remote name, and optionally if such a remote is known + """ + _label = 'remote' + + def __init__(self, + known: bool | None = None, + dsarg: DatasetParameter | None = None): + """ + Parameters + ---------- + known: bool, optional + By default, a given value is only checked if it is a syntactically + correct remote name. + If ``True``, also checks that the given name corresponds to a + known remote in the dataset given by ``dsarg``. If ``False``, + checks that the given remote does not match any known remote + in that dataset. + dsarg: DatasetParameter, optional + Identifies a dataset for testing remote existence, if requested. + """ + self._label = 'remote' + self._known = known + self._dsarg = dsarg + + def __call__(self, value: str) -> str: + if not value: + # simple, do here + self.raise_for( + value, + f'missing {self._label} name', + ) + + if self._known is not None: + assert self._dsarg, \ + f"Existence check for {self._label} requires dataset " \ + "specification" + + if self._known: + # we don't need to check much, only if a remote of this name + # already exists -- no need to check for syntax compliance + # again + if not any( + k.startswith(f"remote.{value}.") + for k in self._dsarg.ds.config.keys() + ): + self.raise_for( + value, + f'is not a known {self._label}', + ) + else: + # whether or not the remote must not exist, or we would not care, + # in all cases we need to check for syntax compliance + EnsureGitRefName( + allow_onelevel=True, + refspec_pattern=False, + )(value) + + if self._known is None: + # we only need to know that something was provided, + # no further check + return value + + if self._known is False and any( + k.startswith(f"remote.{value}.") + for k in self._dsarg.ds.config.keys() + ): + self.raise_for( + value, + f'name conflicts with a known {self._label}', + ) + + return value + + def short_description(self): + return f"Name of a{{desc}} {self._label}".format( + desc=' known' if self._known + else ' not-yet-known' if self._known is False else '' + ) + + def for_dataset(self, dataset: DatasetParameter) -> Constraint: + """Return an similarly parametrized variant that checks remote names + against a given dataset (argument)""" + return self.__class__( + known=self._known, + dsarg=dataset, + ) + + +class EnsureSiblingName(EnsureRemoteName): + """Identical to ``EnsureRemoteName``, but used the term "sibling" + + Only error messages and documentation differ, with "remote" being + replaced with "sibling". + """ + _label = 'sibling'
datalad/datalad-next
2138efef0cf69a9b6a57505c5a48b9b13ad27088
diff --git a/datalad_next/commands/tests/test_create_sibling_webdav.py b/datalad_next/commands/tests/test_create_sibling_webdav.py index 5fda1fd..cd22232 100644 --- a/datalad_next/commands/tests/test_create_sibling_webdav.py +++ b/datalad_next/commands/tests/test_create_sibling_webdav.py @@ -74,6 +74,26 @@ def check_common_workflow( if declare_credential else None, mode=mode, ) + # Ensure that remote name constraint check works + # second time should raise because the sibling exists already + with pytest.raises(ValueError) as e: + create_sibling_webdav( + url, + credential=webdav_credential['name'] + if declare_credential else None, + mode=mode, + name='127.0.0.1', + ) + with pytest.raises(ValueError) as e: + create_sibling_webdav( + url, + credential=webdav_credential['name'] + if declare_credential else None, + mode=mode, + name='other', + storage_name='127.0.0.1-storage', + ) + assert_in_results( res, action='create_sibling_webdav.storage', diff --git a/datalad_next/constraints/tests/test_special_purpose.py b/datalad_next/constraints/tests/test_special_purpose.py index fb3d508..c69b3be 100644 --- a/datalad_next/constraints/tests/test_special_purpose.py +++ b/datalad_next/constraints/tests/test_special_purpose.py @@ -4,6 +4,7 @@ import pytest from datalad_next.commands import Parameter from datalad_next.utils import chpwd +from ..base import DatasetParameter from ..basic import ( EnsureInt, EnsureStr, @@ -22,6 +23,7 @@ from ..formats import ( ) from ..git import ( EnsureGitRefName, + EnsureRemoteName ) from ..parameter_legacy import EnsureParameterConstraint @@ -52,6 +54,36 @@ def test_EnsureGitRefName(): 'refs/heads/*') == 'refs/heads/*' +def test_EnsureRemoteName(existing_dataset): + # empty sibling name must raise + with pytest.raises(ValueError): + EnsureRemoteName()('') + assert EnsureRemoteName().short_description() == 'Name of a remote' + assert EnsureRemoteName( + known=True).short_description() == 'Name of a known remote' + assert EnsureRemoteName( + known=False).short_description() == 'Name of a not-yet-known remote' + ds = existing_dataset + c = EnsureRemoteName(known=False) + tc = c.for_dataset(DatasetParameter(None, ds)) + assert tc('newremotename') == 'newremotename' + # add a remote + ds._repo.add_remote('my-remote', 'here') + # check should fail when it shouldn't exist + with pytest.raises(ValueError): + tc('my-remote') + # should work when it should exist + c = EnsureRemoteName(known=True) + tc = c.for_dataset(DatasetParameter(None, ds)) + assert tc('my-remote') == 'my-remote' + # but fail with non-existing remote + with pytest.raises(ValueError) as e: + tc('not-my-remote') + assert str(e.value) == "is not a known remote" + # return sibling name with no existence checks + assert EnsureRemoteName()('anything') == 'anything' + + def test_EnsureParameterConstraint(): # most basic case, no value constraint c = EnsureParameterConstraint(NoConstraint())
Provide `EnsureRemoteName` Many commands needs sibling names, existing or prospective. Checking for syntax compliance is essentially `EnsureGitRefName(allow_onelevel=True, refspec_pattern=False)` for any given dataset, it can be turned into a `EnsureChoice()`, but it would also need some kind of `EnsureNotIn()` (for setting a non-existing remote name). So likely the best is to implement dataset interaction directly in `EnsureRemoteName`, and make it a subclass of `EnsureGitRefName`
0.0
2138efef0cf69a9b6a57505c5a48b9b13ad27088
[ "datalad_next/constraints/tests/test_special_purpose.py::test_EnsureGitRefName", "datalad_next/constraints/tests/test_special_purpose.py::test_EnsureParameterConstraint", "datalad_next/constraints/tests/test_special_purpose.py::test_EnsureParameterConstraint_passthrough", "datalad_next/constraints/tests/test_special_purpose.py::test_EnsureJSONLines", "datalad_next/constraints/tests/test_special_purpose.py::test_EnsureURL", "datalad_next/constraints/tests/test_special_purpose.py::test_EnsureURL_match" ]
[]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-12-17 19:39:48+00:00
mit
1,836
datalad__datalad-next-632
diff --git a/datalad_next/gitremotes/datalad_annex.py b/datalad_next/gitremotes/datalad_annex.py index a39fa8d..561d4c4 100755 --- a/datalad_next/gitremotes/datalad_annex.py +++ b/datalad_next/gitremotes/datalad_annex.py @@ -210,8 +210,9 @@ from datalad_next.datasets import ( from datalad_next.exceptions import CapturedException from datalad_next.runners import ( CommandError, - NoCapture, - StdOutCapture, + call_git, + call_git_oneline, + call_git_success, ) from datalad_next.uis import ui_switcher as ui from datalad_next.utils import ( @@ -224,6 +225,7 @@ from datalad_next.utils import ( get_specialremote_credential_envpatch, get_specialremote_credential_properties, needs_specialremote_credential_envpatch, + patched_env, specialremote_credential_envmap, update_specialremote_credential, ) @@ -494,8 +496,9 @@ class RepoAnnexGitRemote(object): try: # send annex into private mode, if supported # this repo will never ever be shared - ra.call_git(['config', 'annex.private', 'true']) - ra.call_git(['annex', 'init']) + call_git_success(['config', 'annex.private', 'true'], + cwd=ra.pathobj, capture_output=True) + call_git_success(['annex', 'init'], capture_output=True) ra = AnnexRepo(self._repoannexdir) if 'type=web' in self.initremote_params: self._init_repoannex_type_web(ra) @@ -620,8 +623,15 @@ class RepoAnnexGitRemote(object): # otherwise we can end up in a conflict situation where the mirror # points to 'master' (or something else) and the source actually # has 'main' (or something different) - src_head_ref = self.repo.call_git(['symbolic-ref', 'HEAD']).strip() - mr.call_git(['symbolic-ref', 'HEAD', src_head_ref]) + src_head_ref = call_git_oneline( + ['symbolic-ref', 'HEAD'], + cwd=self.repo.pathobj, + ).strip() + call_git_success( + ['symbolic-ref', 'HEAD', src_head_ref], + cwd=mr.pathobj, + capture_output=True, + ) self.log('Established mirror') self._mirrorrepo = mr @@ -669,9 +679,9 @@ class RepoAnnexGitRemote(object): pre_refs = sorted(self.mirrorrepo.for_each_ref_(), key=lambda x: x['refname']) # must not capture -- git is talking to it directly from here - self.mirrorrepo._git_runner.run( - ['git', 'receive-pack', self.mirrorrepo.path], - protocol=NoCapture, + call_git( + ['receive-pack', self.mirrorrepo.path], + cwd=self.mirrorrepo.pathobj, ) post_refs = sorted(self.mirrorrepo.for_each_ref_(), key=lambda x: x['refname']) @@ -698,12 +708,15 @@ class RepoAnnexGitRemote(object): for ref in post_refs: # best MIH can think of is to leave behind another # ref to indicate the unsuccessful upload - self.repo.call_git([ + call_git_success([ 'update-ref', # strip 'refs/heads/' from refname f'refs/dlra-upload-failed/{self.remote_name}/' f'{ref["refname"][11:]}', - ref['objectname']]) + ref['objectname']], + cwd=self.repo.pathobj, + capture_output=True, + ) raise # clean-up potential upload failure markers for this particular @@ -712,7 +725,11 @@ class RepoAnnexGitRemote(object): for ref in self.repo.for_each_ref_( fields=('refname',), pattern=f'refs/dlra-upload-failed/{self.remote_name}'): - self.repo.call_git(['update-ref', '-d', ref['refname']]) + call_git_success( + ['update-ref', '-d', ref['refname']], + cwd=self.repo.pathobj, + capture_output=True, + ) # we do not need to update `self._cached_remote_refs`, # because we end the remote-helper process here # everything has worked, if we used a credential, update it @@ -724,9 +741,9 @@ class RepoAnnexGitRemote(object): # must not capture -- git is talking to it directly from here. # the `self.mirrorrepo` access will ensure that the mirror # is up-to-date - self.mirrorrepo._git_runner.run( - ['git', 'upload-pack', self.mirrorrepo.path], - protocol=NoCapture, + call_git( + ['upload-pack', self.mirrorrepo.path], + cwd=self.mirrorrepo.pathobj, ) # everything has worked, if we used a credential, update it self._store_credential() @@ -766,7 +783,7 @@ class RepoAnnexGitRemote(object): repoannex = self.repoannex # trim it down, as much as possible - mirrorrepo.call_git(['gc']) + call_git(['gc'], cwd=mirrorrepo.pathobj) # update the repo state keys # it is critical to drop the local keys first, otherwise @@ -1047,7 +1064,10 @@ def _format_refs(repo, refs=None): if refstr: refstr += '\n' refstr += '@{} HEAD\n'.format( - repo.call_git(['symbolic-ref', 'HEAD']).strip() + call_git_oneline( + ['symbolic-ref', 'HEAD'], + cwd=repo.pathobj, + ).strip() ) return refstr @@ -1156,69 +1176,67 @@ def make_export_tree(repo): # we need to force Git to use a throwaway index file to maintain # the bare nature of the repoannex, git-annex would stop functioning # properly otherwise - env = os.environ.copy() index_file = repo.pathobj / 'datalad_tmp_index' - env['GIT_INDEX_FILE'] = str(index_file) - try: - for key, kinfo in RepoAnnexGitRemote.xdlra_key_locations.items(): - # create a blob for the annex link - out = repo._git_runner.run( - ['git', 'hash-object', '-w', '--stdin'], - stdin=bytes( - f'../../.git/annex/objects/{kinfo["prefix"]}/{key}/{key}', - 'utf-8'), - protocol=StdOutCapture) - linkhash = out['stdout'].strip() - # place link into a tree - out = repo._git_runner.run( - ['git', 'update-index', '--add', '--cacheinfo', '120000', - linkhash, kinfo["loc"]], - protocol=StdOutCapture, - env=env) - # write the complete tree, and return ID - out = repo._git_runner.run( - ['git', 'write-tree'], - protocol=StdOutCapture, - env=env) - exporttree = out['stdout'].strip() - # this should always come out identically - # unless we made changes in the composition of the export tree - assert exporttree == '7f0e7953e93b4c9920c2bff9534773394f3a5762' - - # clean slate - if index_file.exists(): - index_file.unlink() - # fake export.log record - # <unixepoch>s <here>:<origin> <exporttree> - now_ts = datetime.datetime.now().timestamp() - out = repo._git_runner.run( - ['git', 'hash-object', '-w', '--stdin'], - stdin=bytes( - f'{now_ts}s {here}:{origin} {exporttree}\n', 'utf-8'), - protocol=StdOutCapture) - exportlog = out['stdout'].strip() - repo._git_runner.run( - ['git', 'read-tree', 'git-annex'], - env=env) - out = repo._git_runner.run( - ['git', 'update-index', '--add', '--cacheinfo', '100644', - exportlog, 'export.log'], - protocol=StdOutCapture, - env=env) - out = repo._git_runner.run( - ['git', 'write-tree'], - protocol=StdOutCapture, - env=env) - gaupdate = out['stdout'].strip() - out = repo._git_runner.run( - ['git', 'commit-tree', '-m', 'Fake export', '-p', 'git-annex', - gaupdate], - protocol=StdOutCapture, - env=env) - gacommit = out['stdout'].strip() - repo.call_git(['update-ref', 'refs/heads/git-annex', gacommit]) - finally: - index_file.unlink() + with patched_env(GIT_INDEX_FILE=index_file): + try: + for key, kinfo in RepoAnnexGitRemote.xdlra_key_locations.items(): + # create a blob for the annex link + linkhash = call_git_oneline( + ['hash-object', '-w', '--stdin'], + cwd=repo.pathobj, + input=f'../../.git/annex/objects/{kinfo["prefix"]}/{key}/{key}', + ).strip() + # place link into a tree + call_git_success( + ['update-index', '--add', '--cacheinfo', '120000', + linkhash, kinfo["loc"]], + cwd=repo.pathobj, + capture_output=True, + ) + # write the complete tree, and return ID + exporttree = call_git_oneline( + ['write-tree'], cwd=repo.pathobj + ).strip() + # this should always come out identically + # unless we made changes in the composition of the export tree + assert exporttree == '7f0e7953e93b4c9920c2bff9534773394f3a5762' + + # clean slate + if index_file.exists(): + index_file.unlink() + # fake export.log record + # <unixepoch>s <here>:<origin> <exporttree> + now_ts = datetime.datetime.now().timestamp() + exportlog = call_git_oneline( + ['hash-object', '-w', '--stdin'], + input=f'{now_ts}s {here}:{origin} {exporttree}\n', + cwd=repo.pathobj, + ).strip() + call_git_success( + ['read-tree', 'git-annex'], + cwd=repo.pathobj, + ) + call_git_success( + ['update-index', '--add', '--cacheinfo', '100644', + exportlog, 'export.log'], + cwd=repo.pathobj, + capture_output=True, + ) + gaupdate = call_git_oneline( + ['write-tree'], cwd=repo.pathobj, + ).strip() + gacommit = call_git_oneline( + ['commit-tree', '-m', 'Fake export', '-p', 'git-annex', + gaupdate], + cwd=repo.pathobj, + ).strip() + call_git_success( + ['update-ref', 'refs/heads/git-annex', gacommit], + cwd=repo.pathobj, + ) + finally: + if index_file.exists(): + index_file.unlink() return exporttree diff --git a/datalad_next/runners/git.py b/datalad_next/runners/git.py index ec158f2..bc6b74b 100644 --- a/datalad_next/runners/git.py +++ b/datalad_next/runners/git.py @@ -18,6 +18,7 @@ def _call_git( cwd: Path | None = None, check: bool = False, text: bool | None = None, + input: str | bytes | None = None, # TODO #patch_env: dict[str, str] | None = None, ) -> subprocess.CompletedProcess: @@ -39,6 +40,7 @@ def _call_git( cwd=cwd, check=check, text=text, + input=input, ) except subprocess.CalledProcessError as e: # TODO we could support post-error forensics, but some client @@ -77,6 +79,7 @@ def call_git_success( args: list[str], *, cwd: Path | None = None, + capture_output: bool = False, ) -> bool: """Call Git for a single line of output. @@ -86,11 +89,14 @@ def call_git_success( If ``cwd`` is not None, the function changes the working directory to ``cwd`` before executing the command. + + If ``capture_output`` is ``True``, process output is captured, but not + returned. By default process output is not captured. """ try: _call_git( args, - capture_output=False, + capture_output=capture_output, cwd=cwd, check=True, ) @@ -104,7 +110,8 @@ def call_git_lines( args: list[str], *, cwd: Path | None = None, -) -> bool: + input: str | None = None, +) -> list[str]: """Call Git for any (small) number of lines of output. ``args`` is a list of arguments for the Git command. This list must not @@ -114,6 +121,10 @@ def call_git_lines( If ``cwd`` is not None, the function changes the working directory to ``cwd`` before executing the command. + If ``input`` is not None, the argument becomes the subprocess’s stdin. + This is intended for small-scale inputs. For call that require processing + large inputs, ``iter_git_subproc()`` is to be preferred. + Raises ------ CommandError if the call exits with a non-zero status. @@ -124,6 +135,7 @@ def call_git_lines( cwd=cwd, check=True, text=True, + input=input, ) return res.stdout.splitlines() @@ -132,6 +144,7 @@ def call_git_oneline( args: list[str], *, cwd: Path | None = None, + input: str | None = None, ) -> str: """Call git for a single line of output. @@ -143,7 +156,7 @@ def call_git_oneline( CommandError if the call exits with a non-zero status. AssertionError if there is more than one line of output. """ - lines = call_git_lines(args, cwd=cwd) + lines = call_git_lines(args, cwd=cwd, input=input) if len(lines) > 1: raise AssertionError( f"Expected Git {args} to return a single line, but got {lines}" diff --git a/datalad_next/utils/__init__.py b/datalad_next/utils/__init__.py index 6729d0c..faed7c2 100644 --- a/datalad_next/utils/__init__.py +++ b/datalad_next/utils/__init__.py @@ -12,6 +12,7 @@ external_versions log_progress parse_www_authenticate + patched_env rmtree get_specialremote_param_dict get_specialremote_credential_properties @@ -72,7 +73,7 @@ from .specialremote import ( needs_specialremote_credential_envpatch, get_specialremote_credential_envpatch, ) - +from .patch import patched_env # TODO REMOVE EVERYTHING BELOW FOR V2.0 # https://github.com/datalad/datalad-next/issues/611 diff --git a/datalad_next/utils/patch.py b/datalad_next/utils/patch.py index 299b321..3ea1cdb 100644 --- a/datalad_next/utils/patch.py +++ b/datalad_next/utils/patch.py @@ -1,2 +1,31 @@ +import contextlib +from os import environ + # legacy import from datalad_next.patches import apply_patch + + [email protected] +def patched_env(**env): + """Context manager for patching the process environment + + Any number of kwargs can be given. Keys represent environment variable + names, and values their values. A value of ``None`` indicates that + the respective variable should be unset, i.e., removed from the + environment. + """ + preserve = {} + for name, val in env.items(): + preserve[name] = environ.get(name, None) + if val is None: + del environ[name] + else: + environ[name] = str(val) + try: + yield + finally: + for name, val in preserve.items(): + if val is None: + del environ[name] + else: + environ[name] = val
datalad/datalad-next
7a08a58eb3110b491640c6628f74baf7ecc4faea
diff --git a/datalad_next/utils/tests/test_patch.py b/datalad_next/utils/tests/test_patch.py new file mode 100644 index 0000000..c281cce --- /dev/null +++ b/datalad_next/utils/tests/test_patch.py @@ -0,0 +1,15 @@ +from ..patch import patched_env +from os import environ + + +def test_patched_env(): + if 'HOME' in environ: + home = environ['HOME'] + with patched_env(HOME=None): + assert 'HOME' not in environ + assert environ['HOME'] == home + unusual_name = 'DATALADPATCHENVTESTVAR' + if unusual_name not in environ: + with patched_env(**{unusual_name: 'dummy'}): + assert environ[unusual_name] == 'dummy' + assert unusual_name not in environ
Discontinue (direct) usage of any runner implementations With #538 we made the start of a new paradigm: iterator-based interaction with (concurrent) subprocesses. It is our (@mih and @christian-monch) understanding that this basic approach would work for most (if not all) use cases that involve the execution of subprocesses. Respective experiments have been made and the results look promising. The "ultimate" challenge will be the implementation of a queue-based remote shell. In order to bring down the complexity of implementations after the introduction of this new paradigm, all subprocess execution in datalad-next should be switch to it. Afterwards all runner-related imports from datalad-core should be discontinued (which involves updating any extensions that make use of it). This plan answers the questions of #519. `GitRunner` has no future.
0.0
7a08a58eb3110b491640c6628f74baf7ecc4faea
[ "datalad_next/utils/tests/test_patch.py::test_patched_env" ]
[]
{ "failed_lite_validators": [ "has_issue_reference", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2024-02-07 11:52:00+00:00
mit
1,837
datalad__datalad-next-93
diff --git a/changelog.d/20220812_190404_benjaminpoldrack_fix_push_patch.md b/changelog.d/20220812_190404_benjaminpoldrack_fix_push_patch.md new file mode 100644 index 0000000..b092504 --- /dev/null +++ b/changelog.d/20220812_190404_benjaminpoldrack_fix_push_patch.md @@ -0,0 +1,7 @@ +### 🐛 Bug Fixes + +- Fixed datalad-push always reporting success when pushing to + an export remote. + Fixes https://github.com/datalad/datalad-next/issues/88 via + https://github.com/datalad/datalad-next/pull/93 (by @bpoldrack) + diff --git a/datalad_next/patches/push_to_export_remote.py b/datalad_next/patches/push_to_export_remote.py index d6b82ed..432f209 100644 --- a/datalad_next/patches/push_to_export_remote.py +++ b/datalad_next/patches/push_to_export_remote.py @@ -167,6 +167,8 @@ def _transfer_data(repo: AnnexRepo, ) return + from datalad.interface.results import annexjson2result + # TODO: # - check for configuration entries, e.g. what to export @@ -221,12 +223,13 @@ def _transfer_data(repo: AnnexRepo, ], progress=True ): - yield { - **res_kwargs, - "action": "copy", - "status": "ok", - "path": str(Path(res_kwargs["path"]) / result["file"]) - } + result_adjusted = \ + annexjson2result(result, ds, **res_kwargs) + # annexjson2result overwrites 'action' with annex' 'command', + # even if we provided our 'action' within res_kwargs. Therefore, + # change afterwards instead: + result_adjusted['action'] = "copy" + yield result_adjusted except CommandError as cmd_error: ce = CapturedException(cmd_error) diff --git a/docs/policy/release-management.md b/docs/policy/release-management.md new file mode 100644 index 0000000..fdf9313 --- /dev/null +++ b/docs/policy/release-management.md @@ -0,0 +1,15 @@ +# Release team + +The release team (RT) is an charge reviewing merge requests, and issuing new releases. + +The members of the RT are defined in `docs/CODEOWNERS` in the `main` branch of the repository. + +The RT itself adds or removes RT members. + +It is the RT's duty to act on any merge request in a timely manner. + +A code review of at least one RT member is required for any changeset to be merged into the `main` branch. + +When all technical checks pass (e.g., CI success, resolved pull-request conversations), any RT member approval is a sufficient condition for an (automatic) merge of a changeset into the `main` branch. + +RT members are not expected to be an expert in all techniques, features, and parts of the code base. Consequently, a team member should seek feedback prior to approving merge requests whenever necessary.
datalad/datalad-next
35af20542c46c523f4d635ffc187fcc3d50ade6a
diff --git a/datalad_next/conftest.py b/datalad_next/conftest.py index 7c727c3..1b42ad0 100644 --- a/datalad_next/conftest.py +++ b/datalad_next/conftest.py @@ -1,16 +1,1 @@ -try: - from datalad.conftest import setup_package -except ImportError: - # assume old datalad without pytest support introduced in - # https://github.com/datalad/datalad/pull/6273 - import pytest - from datalad import setup_package as _setup_package - from datalad import teardown_package as _teardown_package - - - @pytest.fixture(autouse=True, scope="session") - def setup_package(): - _setup_package() - yield - _teardown_package() - +from datalad.conftest import setup_package diff --git a/datalad_next/patches/tests/test_push_to_export_remote.py b/datalad_next/patches/tests/test_push_to_export_remote.py index 3b0ef55..bb51c0d 100644 --- a/datalad_next/patches/tests/test_push_to_export_remote.py +++ b/datalad_next/patches/tests/test_push_to_export_remote.py @@ -11,6 +11,7 @@ from datalad.tests.utils_pytest import ( SkipTest, assert_false, assert_in, + assert_in_results, assert_true, eq_, ) @@ -55,11 +56,19 @@ class MockRepo: def _call_annex_records_items_(self, *args, **kwargs): yield { - 'target': args[0][3], - 'action': 'copy', - 'status': 'ok', + "command": f"export {args[0][3]}", "file": "file.txt", + "success": True, + "input": [], + "error-messages": [] } + yield { + "command": f"export {args[0][3]}", + "success": False, + "input": [], + "error-messages": + ["external special remote error: WHATEVER WENT WRONG"], + "file": "somefile"} def _call_transfer(target: str, @@ -67,6 +76,7 @@ def _call_transfer(target: str, return_special_remotes: bool = True) -> Generator: ds_mock = MagicMock() ds_mock.config.getbool.return_value = config_result + ds_mock.pathobj = Path("/root") return _transfer_data( repo=MockRepo(return_special_remotes), ds=ds_mock, @@ -107,14 +117,16 @@ def test_patch_execute_export(): gele_mock.return_value = None results = tuple(_call_transfer("yes-target", False)) eq_(pd_mock.call_count, 0) - assert_in( - { - "path": str(Path("/root/file.txt")), - "target": "yes-target", - "action": "copy", - "status": "ok", - }, - results) + assert_in_results(results, + path=str(Path("/root/file.txt")), + target="yes-target", + action="copy", + status="ok") + assert_in_results(results, + path=str(Path("/root/somefile")), + target="yes-target", + action="copy", + status="error") def test_patch_skip_ignore_targets_export(): @@ -144,14 +156,16 @@ def test_patch_check_envpatch(): gc_mock.return_value = {"secret": "abc", "user": "hans"} results = tuple(_call_transfer("yes-target", False)) eq_(pd_mock.call_count, 0) - assert_in( - { - "path": str(Path("/root/file.txt")), - "target": "yes-target", - "action": "copy", - "status": "ok", - }, - results) + assert_in_results(results, + path=str(Path("/root/file.txt")), + target="yes-target", + action="copy", + status="ok") + assert_in_results(results, + path=str(Path("/root/somefile")), + target="yes-target", + action="copy", + status="error") def test_no_special_remotes():
push to export remote patch swallows errors This `try ... except`: https://github.com/datalad/datalad-next/blob/864896e26af7361b739b05df4fcd302b0b407db3/datalad_next/patches/push_to_export_remote.py#L216 is wrong. If `annex export` fails we get an error result from `_call_annex_records_items_` rather than an exception. And this error result is unconditionally turned into an `status='ok'` record here.
0.0
35af20542c46c523f4d635ffc187fcc3d50ade6a
[ "datalad_next/patches/tests/test_push_to_export_remote.py::test_patch_execute_export", "datalad_next/patches/tests/test_push_to_export_remote.py::test_patch_check_envpatch" ]
[ "datalad_next/patches/tests/test_push_to_export_remote.py::test_is_export_remote", "datalad_next/patches/tests/test_push_to_export_remote.py::test_patch_pass_through", "datalad_next/patches/tests/test_push_to_export_remote.py::test_patch_skip_ignore_targets_export", "datalad_next/patches/tests/test_push_to_export_remote.py::test_no_special_remotes", "datalad_next/patches/tests/test_push_to_export_remote.py::test_get_export_records_no_exports", "datalad_next/patches/tests/test_push_to_export_remote.py::test_get_export_records", "datalad_next/patches/tests/test_push_to_export_remote.py::test_get_export_log_entry" ]
{ "failed_lite_validators": [ "has_added_files" ], "has_test_patch": true, "is_lite": false }
2022-08-12 16:59:17+00:00
mit
1,838
datapythonista__mnist-12
diff --git a/README.md b/README.md index b164037..80a9d4e 100644 --- a/README.md +++ b/README.md @@ -63,4 +63,18 @@ train_images = mnist.train_images() x = images.reshape((images.shape[0], images.shape[1] * images.shape[2])) ``` +Both the url where the files can be found, and the temporary directory where +they will be cached locally can be modified in the next way: +``` +import mnist + +mnist.datasets_url = 'http://url-to-the/datasets' + +# temporary_dir is a function, so it can be dinamically created +# like Python stdlib `tempfile.gettempdir` (which is the default) +mnist.temporary_dir = lambda: '/tmp/mnist' + +train_images = mnist.train_images() +``` + It supports Python 2.7 and Python >= 3.5. diff --git a/mnist/__init__.py b/mnist/__init__.py index 2a41398..a567875 100644 --- a/mnist/__init__.py +++ b/mnist/__init__.py @@ -16,8 +16,11 @@ except ImportError: import numpy -# the url can be changed by the users of the library (not a constant) +# `datasets_url` and `temporary_dir` can be set by the user using: +# >>> mnist.datasets_url = 'http://my.mnist.url' +# >>> mnist.temporary_dir = lambda: '/tmp/mnist' datasets_url = 'http://yann.lecun.com/exdb/mnist/' +temporary_dir = tempfile.gettempdir class IdxDecodeError(ValueError): @@ -45,8 +48,7 @@ def download_file(fname, target_dir=None, force=False): fname : str Full path of the downloaded file """ - if not target_dir: - target_dir = tempfile.gettempdir() + target_dir = target_dir or temporary_dir() target_fname = os.path.join(target_dir, fname) if force or not os.path.isfile(target_fname):
datapythonista/mnist
aeae1406afea11c1c23788f23856053edcfc536b
diff --git a/tests/test_download_mnist.py b/tests/test_download_mnist.py index 631104d..e71aabe 100644 --- a/tests/test_download_mnist.py +++ b/tests/test_download_mnist.py @@ -97,8 +97,20 @@ class TestDownloadMNIST(unittest.TestCase): @mock.patch('mnist.urlretrieve') def test_datasets_url_is_used(self, urlretrieve): + original_url = mnist.datasets_url mnist.datasets_url = 'http://aaa.com/' mnist.download_file('mnist_datasets_url.gz') fname = os.path.join(tempfile.gettempdir(), 'mnist_datasets_url.gz') urlretrieve.assert_called_once_with( 'http://aaa.com/mnist_datasets_url.gz', fname) + mnist.datasets_url = original_url + + @mock.patch('mnist.urlretrieve') + def test_temporary_dir_is_used(self, urlretrieve): + original_temp_dir = mnist.temporary_dir + mnist.temporary_dir = lambda: '/another/tmp/dir/' + fname = mnist.download_file('test') + urlretrieve.assert_called_once_with(mnist.datasets_url + 'test', + '/another/tmp/dir/test') + self.assertEqual(fname, '/another/tmp/dir/test') + mnist.temporary_dir = original_temp_dir
Allowing specification of the download directory Right now the functions listed on the README.md doesn't allow specifying the target directory. This functionality should be possible just by propagating extra parameters to the download function.
0.0
aeae1406afea11c1c23788f23856053edcfc536b
[ "tests/test_download_mnist.py::TestDownloadMNIST::test_temporary_dir_is_used" ]
[ "tests/test_download_mnist.py::TestDownloadMNIST::test_datasets_url_is_used", "tests/test_download_mnist.py::TestDownloadMNIST::test_file_is_downloaded_to_target_dir", "tests/test_download_mnist.py::TestDownloadMNIST::test_file_is_downloaded_when_exists_and_force_is_true", "tests/test_download_mnist.py::TestDownloadMNIST::test_file_is_not_downloaded_when_force_is_false" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2018-09-24 13:52:46+00:00
bsd-3-clause
1,839
datosgobar__pydatajson-125
diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 2191b01..39d9678 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -94,8 +94,11 @@ Toma los siguientes parámetros: - **portal_url**: URL del portal de CKAN de destino. - **apikey**: La apikey de un usuario del portal de destino con los permisos para crear el dataset bajo la organización pasada como parámetro. + - **demote_superThemes** (opcional, default: True):Si está en true, los ids de los themes del dataset, se escriben + como groups de CKAN. - **demote_themes** (opcional, default: True): Si está en true, los labels de los themes del dataset, se escriben como tags de CKAN; sino,se pasan como grupo. + Retorna el id en el nodo de destino del dataset federado. diff --git a/pydatajson/ckan_utils.py b/pydatajson/ckan_utils.py index 31f6737..b915bde 100644 --- a/pydatajson/ckan_utils.py +++ b/pydatajson/ckan_utils.py @@ -14,7 +14,8 @@ def append_attribute_to_extra(package, dataset, attribute, serialize=False): package['extras'].append({'key': attribute, 'value': value}) -def map_dataset_to_package(dataset, catalog_id, owner_org, theme_taxonomy, demote_themes=True): +def map_dataset_to_package(dataset, catalog_id, owner_org, theme_taxonomy, + demote_superThemes=True, demote_themes=True): package = dict() package['extras'] = [] # Obligatorios @@ -33,8 +34,10 @@ def map_dataset_to_package(dataset, catalog_id, owner_org, theme_taxonomy, demot package['resources'] = map_distributions_to_resources(distributions, catalog_id) super_themes = dataset['superTheme'] - package['groups'] = [{'name': title_to_name(super_theme, decode=False)} for super_theme in super_themes] append_attribute_to_extra(package, dataset, 'superTheme', serialize=True) + if demote_superThemes: + package['groups'] = [{'name': title_to_name(super_theme, decode=False)} for super_theme in super_themes] + # Recomendados y opcionales package['url'] = dataset.get('landingPage') @@ -66,7 +69,8 @@ def map_dataset_to_package(dataset, catalog_id, owner_org, theme_taxonomy, demot label = next(x['label'] for x in theme_taxonomy if x['id'] == theme) package['tags'].append({'name': label}) else: - package['groups'] += [{'name': title_to_name(theme, decode=False)} for theme in themes] + package['groups'] = package.get('groups', []) + [{'name': title_to_name(theme, decode=False)} + for theme in themes] return package diff --git a/pydatajson/federation.py b/pydatajson/federation.py index f9a4f6b..7807dfe 100644 --- a/pydatajson/federation.py +++ b/pydatajson/federation.py @@ -10,7 +10,7 @@ from .search import get_datasets def push_dataset_to_ckan(catalog, catalog_id, owner_org, dataset_origin_identifier, portal_url, apikey, - demote_themes=True): + demote_superThemes=True, demote_themes=True): """Escribe la metadata de un dataset en el portal pasado por parámetro. Args: @@ -20,6 +20,7 @@ def push_dataset_to_ckan(catalog, catalog_id, owner_org, dataset_origin_identifi dataset_origin_identifier (str): El id del dataset que se va a federar. portal_url (str): La URL del portal CKAN de destino. apikey (str): La apikey de un usuario con los permisos que le permitan crear o actualizar el dataset. + demote_superThemes(bool): Si está en true, los ids de los super themes del dataset, se propagan como grupo. demote_themes(bool): Si está en true, los labels de los themes del dataset, pasan a ser tags. Sino, se pasan como grupo. @@ -30,7 +31,8 @@ def push_dataset_to_ckan(catalog, catalog_id, owner_org, dataset_origin_identifi ckan_portal = RemoteCKAN(portal_url, apikey=apikey) theme_taxonomy = catalog.themes - package = map_dataset_to_package(dataset, catalog_id, owner_org, theme_taxonomy, demote_themes=demote_themes) + package = map_dataset_to_package(dataset, catalog_id, owner_org, theme_taxonomy, + demote_superThemes, demote_themes) # Get license id if dataset.get('license'):
datosgobar/pydatajson
3c428354f3f1b48b9b70815ba370e8cd1b11b07b
diff --git a/tests/test_ckan_utils.py b/tests/test_ckan_utils.py index 3884251..dca112c 100644 --- a/tests/test_ckan_utils.py +++ b/tests/test_ckan_utils.py @@ -67,8 +67,8 @@ class DatasetConversionTestCase(unittest.TestCase): self.assertCountEqual(keywords + theme_labels, tags) def test_themes_are_preserved_if_not_demoted(self): - package = map_dataset_to_package(self.dataset, self.catalog_id, 'owner', self.catalog.themes, - demote_themes=False) + package = map_dataset_to_package(self.dataset, self.catalog_id, 'owner', + self.catalog.themes, demote_themes=False) groups = [group['name'] for group in package.get('groups', [])] super_themes = [title_to_name(s_theme.lower()) for s_theme in self.dataset.get('superTheme')] themes = self.dataset.get('theme', []) @@ -84,15 +84,48 @@ class DatasetConversionTestCase(unittest.TestCase): except AttributeError: self.assertCountEqual(keywords, tags) + def test_superThemes_dont_impact_groups_if_not_demoted(self): + package = map_dataset_to_package(self.dataset, self.catalog_id, 'owner', + self.catalog.themes, demote_superThemes=False) + groups = [group['name'] for group in package.get('groups', [])] + tags = [tag['name'] for tag in package['tags']] + keywords = self.dataset.get('keyword', []) + themes = self.dataset.get('theme', []) + theme_labels = [] + for theme in themes: + label = next(x['label'] for x in self.catalog.themes if x['id'] == theme) + theme_labels.append(label) + try: + self.assertItemsEqual([], groups) + except AttributeError: + self.assertCountEqual([], groups) + try: + self.assertItemsEqual(keywords + theme_labels, tags) + except AttributeError: + self.assertCountEqual(keywords + theme_labels, tags) + + def test_preserve_themes_and_superThemes(self): + package = map_dataset_to_package(self.dataset, self.catalog_id, 'owner', + self.catalog.themes, False, False) + groups = [group['name'] for group in package.get('groups', [])] + tags = [tag['name'] for tag in package['tags']] + keywords = self.dataset.get('keyword', []) + themes = self.dataset.get('theme', []) + try: + self.assertItemsEqual(themes, groups) + except AttributeError: + self.assertCountEqual(themes, groups) + try: + self.assertItemsEqual(keywords, tags) + except AttributeError: + self.assertCountEqual(keywords, tags) + def test_dataset_extra_attributes_are_correct(self): package = map_dataset_to_package(self.dataset, self.catalog_id, 'owner', self.catalog.themes) # extras are included in dataset if package['extras']: for extra in package['extras']: - if extra['key'] == 'super_theme': - dataset_value = self.dataset['superTheme'] - else: - dataset_value = self.dataset[extra['key']] + dataset_value = self.dataset[extra['key']] if type(dataset_value) is list: extra_value = json.loads(extra['value']) try: @@ -106,7 +139,7 @@ class DatasetConversionTestCase(unittest.TestCase): def test_dataset_extra_attributes_are_complete(self): package = map_dataset_to_package(self.dataset, self.catalog_id, 'owner', self.catalog.themes) # dataset attributes are included in extras - extra_attrs = ['issued', 'modified', 'accrualPeriodicity', 'temporal', 'language', 'spatial'] + extra_attrs = ['issued', 'modified', 'accrualPeriodicity', 'temporal', 'language', 'spatial', 'superTheme'] for key in extra_attrs: value = self.dataset.get(key) if value: @@ -115,8 +148,6 @@ class DatasetConversionTestCase(unittest.TestCase): resulting_dict = {'key': key, 'value': value} self.assertTrue(resulting_dict in package['extras']) - self.assertTrue({'key': 'super_theme', 'value': json.dumps(self.dataset['superTheme'])}) - def test_resources_replicated_attributes_stay_the_same(self): resources = map_distributions_to_resources(self.distributions, self.catalog_id+'_'+self.dataset_id) for resource in resources:
Agregar opción para copiar `superTheme` a `theme` en `push_dataset_to_ckan` **Contexto** Los temas globales (`superTheme`) son temas transversales bajo los cuales los nodos originales clasifican a sus datasets para indexarlos en un nodo integrador. El `superTheme` de un dataset en su nodo original, es el `theme` de ese dataset en el nodo integrador (son los temas que usa CKAN para visualizar en la landing del Portal). **Implementar** Agregar a la función `push_dataset_to_ckan` un argumento opcional `superTheme_to_theme` con default `True`. Este _flag_ copia todos los elementos del array `superTheme` en la metadata original de un dataset y los agrega al array `theme` del dataset que va a ser empujado a un CKAN. **Notas** Esto es una operación de transformación de los metadatos originales cuyo sentido es federar correctamente los metadatos de un dataset en un contexto de portal diferente (con un público y alcance temático _transversal_, mientras que el nodo original tiene un público y alcance temático _específico_). **Entregable** La nueva opción en `push_dataset_to_ckan`, junto con sus tests asociados y las modificaciones correspondientes a la documentación en los docs de RTD.
0.0
3c428354f3f1b48b9b70815ba370e8cd1b11b07b
[ "tests/test_ckan_utils.py::DatasetConversionTestCase::test_preserve_themes_and_superThemes", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_superThemes_dont_impact_groups_if_not_demoted" ]
[ "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_array_attributes_are_correct", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_extra_attributes_are_complete", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_extra_attributes_are_correct", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_nested_replicated_attributes_stay_the_same", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_replicated_plain_attributes_are_corrext", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_resources_extra_attributes_are_created_correctly", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_resources_replicated_attributes_stay_the_same", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_resources_transformed_attributes_are_correct", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_themes_are_preserved_if_not_demoted", "tests/test_ckan_utils.py::DatetimeConversionTests::test_dates_change_correctly", "tests/test_ckan_utils.py::DatetimeConversionTests::test_dates_stay_the_same", "tests/test_ckan_utils.py::DatetimeConversionTests::test_datetimes_without_microseconds_are_handled_correctly", "tests/test_ckan_utils.py::DatetimeConversionTests::test_datetimes_without_seconds_are_handled_correctly", "tests/test_ckan_utils.py::DatetimeConversionTests::test_datetimes_without_timezones_stay_the_same", "tests/test_ckan_utils.py::DatetimeConversionTests::test_timezones_are_handled_correctly" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-03-12 20:48:48+00:00
mit
1,840
datosgobar__pydatajson-137
diff --git a/docs/MANUAL.md b/docs/MANUAL.md index cd72809..914f87c 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -107,7 +107,7 @@ Toma los siguientes parámetros: mantener una consistencia más estricta dentro del catálogo a federar, es necesario validar los datos antes de pasarlos a la función. -- **pydatajson.DataJson.remove_dataset_from_ckan()**: Hace un borrado físico de un dataset en un portal de CKAN. +- **pydatajson.federation.remove_dataset_from_ckan()**: Hace un borrado físico de un dataset en un portal de CKAN. Toma los siguientes parámetros: - **portal_url**: La URL del portal CKAN. Debe implementar la funcionalidad de `/data.json`. - **apikey**: La apikey de un usuario con los permisos que le permitan borrar el dataset. @@ -121,6 +121,16 @@ Toma los siguientes parámetros: En caso de pasar más de un parámetro opcional, la función `remove_dataset_from_ckan()` borra aquellos datasets que cumplan con todas las condiciones. +- **pydatajson.DataJson.push_theme_to_ckan()**: Crea un tema en el portal de destino +Toma los siguientes parámetros: + - **portal_url**: La URL del portal CKAN. Debe implementar la funcionalidad de `/data.json`. + - **apikey**: La apikey de un usuario con los permisos que le permitan borrar el dataset. + - **identifier** (opcional, default: None): Id del `theme` que se quiere federar, en el catálogo de origen. + - **label** (opcional, default: None): label del `theme` que se quiere federar, en el catálogo de origen. + + Debe pasarse por lo menos uno de los 2 parámetros opcionales. En caso de que se provean los 2, se prioriza el + identifier sobre el label. + ## Uso ### Setup diff --git a/pydatajson/ckan_utils.py b/pydatajson/ckan_utils.py index 9724f44..9f68692 100644 --- a/pydatajson/ckan_utils.py +++ b/pydatajson/ckan_utils.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- import json import re -import sys from datetime import time from dateutil import parser, tz from .helpers import title_to_name @@ -109,10 +108,21 @@ def map_distributions_to_resources(distributions, catalog_id=None): resource['mimetype'] = distribution.get('mediaType') resource['size'] = distribution.get('byteSize') resource['accessURL'] = distribution.get('accessURL') - resource['fileName'] = distribution.get('fileName') + fileName = distribution.get('fileName') + if fileName: + resource['fileName'] = fileName dist_fields = distribution.get('field') if dist_fields: resource['attributesDescription'] = json.dumps(dist_fields) resources.append(resource) return resources + + +def map_theme_to_group(theme): + + return { + "name": title_to_name(theme.get('id') or theme['label']), + "title": theme.get('label'), + "description": theme.get('description'), + } diff --git a/pydatajson/federation.py b/pydatajson/federation.py index 9573040..9f132cd 100644 --- a/pydatajson/federation.py +++ b/pydatajson/federation.py @@ -5,7 +5,7 @@ from __future__ import print_function from ckanapi import RemoteCKAN from ckanapi.errors import NotFound -from .ckan_utils import map_dataset_to_package +from .ckan_utils import map_dataset_to_package, map_theme_to_group from .search import get_datasets @@ -23,7 +23,6 @@ def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, portal_u demote_superThemes(bool): Si está en true, los ids de los super themes del dataset, se propagan como grupo. demote_themes(bool): Si está en true, los labels de los themes del dataset, pasan a ser tags. Sino, se pasan como grupo. - Returns: str: El id del dataset en el catálogo de destino. """ @@ -103,3 +102,22 @@ def remove_datasets_from_ckan(portal_url, apikey, filter_in=None, filter_out=Non for identifier in identifiers: ckan_portal.call_action('dataset_purge', data_dict={'id': identifier}) + + +def push_theme_to_ckan(catalog, portal_url, apikey, identifier=None, label=None): + """Escribe la metadata de un theme en el portal pasado por parámetro. + + Args: + catalog (DataJson): El catálogo de origen que contiene el theme. + portal_url (str): La URL del portal CKAN de destino. + apikey (str): La apikey de un usuario con los permisos que le permitan crear o actualizar el dataset. + identifier (str): El identificador para buscar el theme en la taxonomia. + label (str): El label para buscar el theme en la taxonomia. + Returns: + str: El name del theme en el catálogo de destino. + """ + ckan_portal = RemoteCKAN(portal_url, apikey=apikey) + theme = catalog.get_theme(identifier=identifier, label=label) + group = map_theme_to_group(theme) + pushed_group = ckan_portal.call_action('group_create', data_dict=group) + return pushed_group['name']
datosgobar/pydatajson
afc2856312e6ebea0e76396c2b1f663193b962e0
diff --git a/tests/test_ckan_utils.py b/tests/test_ckan_utils.py index f90406e..83a7697 100644 --- a/tests/test_ckan_utils.py +++ b/tests/test_ckan_utils.py @@ -2,12 +2,8 @@ import unittest import os -import json -import re -import sys -from dateutil import parser, tz from .context import pydatajson -from pydatajson.ckan_utils import map_dataset_to_package, map_distributions_to_resources, convert_iso_string_to_utc +from pydatajson.ckan_utils import * from pydatajson.helpers import title_to_name SAMPLES_DIR = os.path.join("tests", "samples") @@ -216,6 +212,57 @@ class DatasetConversionTestCase(unittest.TestCase): self.assertIsNone(resource.get('attributesDescription')) +class ThemeConversionTests(unittest.TestCase): + + @classmethod + def get_sample(cls, sample_filename): + return os.path.join(SAMPLES_DIR, sample_filename) + + @classmethod + def setUpClass(cls): + catalog = pydatajson.DataJson(cls.get_sample('full_data.json')) + cls.theme = catalog.get_theme(identifier='adjudicaciones') + + def test_all_attributes_are_replicated_if_present(self): + group = map_theme_to_group(self.theme) + self.assertEqual('adjudicaciones', group['name']) + self.assertEqual('Adjudicaciones', group['title']) + self.assertEqual('Datasets sobre licitaciones adjudicadas.', group['description']) + + def test_label_is_used_as_name_if_id_not_present(self): + missing_id = dict(self.theme) + missing_id['label'] = u'#Will be used as name#' + missing_id.pop('id') + group = map_theme_to_group(missing_id) + self.assertEqual('will-be-used-as-name', group['name']) + self.assertEqual('#Will be used as name#', group['title']) + self.assertEqual('Datasets sobre licitaciones adjudicadas.', group['description']) + + def test_theme_missing_label(self): + missing_label = dict(self.theme) + missing_label.pop('label') + group = map_theme_to_group(missing_label) + self.assertEqual('adjudicaciones', group['name']) + self.assertIsNone(group.get('title')) + self.assertEqual('Datasets sobre licitaciones adjudicadas.', group['description']) + + def test_theme_missing_description(self): + missing_description = dict(self.theme) + missing_description.pop('description') + group = map_theme_to_group(missing_description) + self.assertEqual('adjudicaciones', group['name']) + self.assertEqual('Adjudicaciones', group['title']) + self.assertIsNone(group['description']) + + def test_id_special_characters_are_removed(self): + special_char_id = dict(self.theme) + special_char_id['id'] = u'#Théme& $id?' + group = map_theme_to_group(special_char_id) + self.assertEqual('theme-id', group['name']) + self.assertEqual('Adjudicaciones', group['title']) + self.assertEqual('Datasets sobre licitaciones adjudicadas.', group['description']) + + class DatetimeConversionTests(unittest.TestCase): def test_timezones_are_handled_correctly(self): diff --git a/tests/test_federation.py b/tests/test_federation.py index e6804b9..fd8284e 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -3,14 +3,14 @@ import unittest import os import re -import sys + try: from mock import patch, MagicMock except ImportError: from unittest.mock import patch, MagicMock from .context import pydatajson -from pydatajson.federation import push_dataset_to_ckan, remove_datasets_from_ckan +from pydatajson.federation import push_dataset_to_ckan, remove_datasets_from_ckan, push_theme_to_ckan from ckanapi.errors import NotFound SAMPLES_DIR = os.path.join("tests", "samples") @@ -215,3 +215,40 @@ class RemoveDatasetTestCase(unittest.TestCase): 'portal', 'key', only_time_series=True, organization='some_org') mock_portal.return_value.call_action.assert_called_with( 'dataset_purge', data_dict={'id': 'id_2'}) + + +class PushThemeTestCase(unittest.TestCase): + + @classmethod + def get_sample(cls, sample_filename): + return os.path.join(SAMPLES_DIR, sample_filename) + + @classmethod + def setUpClass(cls): + cls.catalog = pydatajson.DataJson(cls.get_sample('full_data.json')) + + @patch('pydatajson.federation.RemoteCKAN', autospec=True) + def test_empty_theme_search_raises_exception(self, mock_portal): + with self.assertRaises(AssertionError): + push_theme_to_ckan(self.catalog, 'portal_url', 'apikey') + + @patch('pydatajson.federation.RemoteCKAN', autospec=True) + def test_function_pushes_theme_by_identifier(self, mock_portal): + mock_portal.return_value.call_action = MagicMock(return_value={'name': 'group_name'}) + result = push_theme_to_ckan(self.catalog, 'portal_url', 'apikey', identifier='compras') + self.assertEqual('group_name', result) + + @patch('pydatajson.federation.RemoteCKAN', autospec=True) + def test_function_pushes_theme_by_label(self, mock_portal): + mock_portal.return_value.call_action = MagicMock(return_value={'name': 'other_name'}) + result = push_theme_to_ckan(self.catalog, 'portal_url', 'apikey', label='Adjudicaciones') + self.assertEqual('other_name', result) + + @patch('pydatajson.federation.RemoteCKAN', autospec=True) + def test_ckan_portal_is_called_with_correct_parametres(self, mock_portal): + mock_portal.return_value.call_action = MagicMock(return_value={'name': u'contrataciones'}) + group = {'name': u'contrataciones', + 'title': u'Contrataciones', + 'description': u'Datasets sobre contrataciones.'} + push_theme_to_ckan(self.catalog, 'portal_url', 'apikey', identifier='contrataciones') + mock_portal.return_value.call_action.assert_called_once_with('group_create', data_dict=group)
Función push theme_to_ckan() **Contexto** Por el momento, la función `push_dataset_to_ckan()` federa los datasets sin tener en cuenta los `themes` presentes en el catálogo de destino. La operación se concreta, pero cualquier `theme` del dataset que no esté presente en el catálogo es ignorado. El objetivo es implementar una función `push_theme_to_ckan()`, que mediante la API, cree los grupos de CKAN indicados. Esta función será luego utilizada por si sola o en conjunto con los wrappers para generar los temas pertinentes de un catalogo.
0.0
afc2856312e6ebea0e76396c2b1f663193b962e0
[ "tests/test_ckan_utils.py::DatasetConversionTestCase::test_catalog_id_is_prefixed_in_resource_id_if_passed", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_catalog_id_is_prepended_to_dataset_id_if_passed", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_array_attributes_are_correct", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_extra_attributes_are_complete", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_extra_attributes_are_correct", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_id_is_preserved_if_catlog_id_is_not_passed", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_dataset_nested_replicated_attributes_stay_the_same", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_preserve_themes_and_superThemes", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_replicated_plain_attributes_are_corrext", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_resource_id_is_preserved_if_catalog_id_is_not_passed", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_resources_extra_attributes_are_created_correctly", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_resources_replicated_attributes_stay_the_same", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_resources_transformed_attributes_are_correct", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_superThemes_dont_impact_groups_if_not_demoted", "tests/test_ckan_utils.py::DatasetConversionTestCase::test_themes_are_preserved_if_not_demoted", "tests/test_ckan_utils.py::ThemeConversionTests::test_all_attributes_are_replicated_if_present", "tests/test_ckan_utils.py::ThemeConversionTests::test_id_special_characters_are_removed", "tests/test_ckan_utils.py::ThemeConversionTests::test_label_is_used_as_name_if_id_not_present", "tests/test_ckan_utils.py::ThemeConversionTests::test_theme_missing_description", "tests/test_ckan_utils.py::ThemeConversionTests::test_theme_missing_label", "tests/test_ckan_utils.py::DatetimeConversionTests::test_dates_change_correctly", "tests/test_ckan_utils.py::DatetimeConversionTests::test_dates_stay_the_same", "tests/test_ckan_utils.py::DatetimeConversionTests::test_datetimes_without_microseconds_are_handled_correctly", "tests/test_ckan_utils.py::DatetimeConversionTests::test_datetimes_without_seconds_are_handled_correctly", "tests/test_ckan_utils.py::DatetimeConversionTests::test_datetimes_without_timezones_stay_the_same", "tests/test_ckan_utils.py::DatetimeConversionTests::test_timezones_are_handled_correctly", "tests/test_federation.py::PushDatasetTestCase::test_dataset_id_is_preserved_if_catalog_id_is_not_passed", "tests/test_federation.py::PushDatasetTestCase::test_dataset_without_license_sets_notspecified", "tests/test_federation.py::PushDatasetTestCase::test_id_is_created_correctly", "tests/test_federation.py::PushDatasetTestCase::test_id_is_updated_correctly", "tests/test_federation.py::PushDatasetTestCase::test_licenses_are_interpreted_correctly", "tests/test_federation.py::PushDatasetTestCase::test_tags_are_passed_correctly", "tests/test_federation.py::RemoveDatasetTestCase::test_empty_search_doesnt_call_purge", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_out_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_query_one_dataset", "tests/test_federation.py::RemoveDatasetTestCase::test_query_over_500_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_remove_through_filters_and_organization", "tests/test_federation.py::PushThemeTestCase::test_ckan_portal_is_called_with_correct_parametres", "tests/test_federation.py::PushThemeTestCase::test_empty_theme_search_raises_exception", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_identifier", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_label" ]
[]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false }
2018-04-06 14:20:19+00:00
mit
1,841
datosgobar__pydatajson-153
diff --git a/pydatajson/ckan_utils.py b/pydatajson/ckan_utils.py index 6df8eaa..c67d3dc 100644 --- a/pydatajson/ckan_utils.py +++ b/pydatajson/ckan_utils.py @@ -1,5 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +from __future__ import print_function + import json import re from datetime import time @@ -76,12 +78,13 @@ def map_dataset_to_package(catalog, dataset, owner_org, catalog_id=None, if themes and demote_themes: package['tags'] = package.get('tags', []) for theme in themes: + # si falla continúa sin agregar ese theme a los tags del dataset try: - label = catalog.get_theme(identifier=theme)['label'] - except: - label = catalog.get_theme(label=theme)['label'] - label = re.sub(r'[^\wá-úÁ-ÚñÑ .-]+', '', label, flags=re.UNICODE) - package['tags'].append({'name': label}) + label = _get_theme_label(catalog, theme) + package['tags'].append({'name': label}) + except Exception as e: + print(e) + continue else: package['groups'] = package.get('groups', []) + [ {'name': title_to_name(theme, decode=False)} @@ -91,6 +94,18 @@ def map_dataset_to_package(catalog, dataset, owner_org, catalog_id=None, return package +def _get_theme_label(catalog, theme): + """Intenta conseguir el theme por id o por label.""" + try: + label = catalog.get_theme(identifier=theme)['label'] + except: + label = catalog.get_theme(label=theme)['label'] + + label = re.sub(r'[^\wá-úÁ-ÚñÑ .-]+', '', + label, flags=re.UNICODE) + return label + + def convert_iso_string_to_utc(date_string): date_time = parser.parse(date_string) if date_time.time() == time(0): diff --git a/pydatajson/federation.py b/pydatajson/federation.py index 43e932e..b503d95 100644 --- a/pydatajson/federation.py +++ b/pydatajson/federation.py @@ -5,11 +5,13 @@ de la API de CKAN. """ from __future__ import print_function +import logging from ckanapi import RemoteCKAN -from ckanapi.errors import NotFound +from ckanapi.errors import NotFound, NotAuthorized from .ckan_utils import map_dataset_to_package, map_theme_to_group from .search import get_datasets +logger = logging.getLogger(__name__) def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, portal_url, apikey, catalog_id=None, @@ -250,14 +252,20 @@ def harvest_catalog_to_ckan(catalog, portal_url, apikey, catalog_id, Returns: str: El id del dataset en el catálogo de destino. """ - dataset_list = dataset_list or [ds['identifier'] - for ds in catalog.datasets] + # Evitar entrar con valor falsy + if dataset_list is None: + dataset_list = [ds['identifier'] for ds in catalog.datasets] owner_org = owner_org or catalog_id harvested = [] for dataset_id in dataset_list: - harvested_id = harvest_dataset_to_ckan( - catalog, owner_org, dataset_id, portal_url, apikey, catalog_id) - harvested.append(harvested_id) + try: + harvested_id = harvest_dataset_to_ckan( + catalog, owner_org, dataset_id, portal_url, apikey, catalog_id) + harvested.append(harvested_id) + except (NotAuthorized, NotFound, KeyError, TypeError) as e: + logger.error("Error federando catalogo:"+catalog_id+", dataset:"+dataset_id + "al portal: "+portal_url) + logger.error(str(e)) + return harvested
datosgobar/pydatajson
dae546a739eb2aab1c34b3d8bbb5896fe804e0aa
diff --git a/tests/test_federation.py b/tests/test_federation.py index fe95079..9d0515f 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -223,6 +223,13 @@ class PushDatasetTestCase(unittest.TestCase): self.assertCountEqual([self.catalog_id+'_'+ds['identifier'] for ds in self.catalog.datasets], harvested_ids) + @patch('pydatajson.federation.RemoteCKAN', autospec=True) + def test_harvest_catalog_with_empty_list(self, mock_portal): + harvested_ids = harvest_catalog_to_ckan(self.catalog, 'portal', 'key', self.catalog_id, + owner_org='owner', dataset_list=[]) + mock_portal.assert_not_called() + self.assertEqual([], harvested_ids) + class RemoveDatasetTestCase(unittest.TestCase):
Robustecer el manejo de harvest_catalog_to_ckan() Hay que corregir 2 problemas: - En caso de pasar una lista vacía en el dataset list, no se debe federar ningún dataset. Actualmente se federan todos. -En caso de que alguno de las llamadas a `harvest_dataset_to_ckan()` falle, loggear y continuar con el resto. Actualmente la federación entera del catálogo levanta la excepción.
0.0
dae546a739eb2aab1c34b3d8bbb5896fe804e0aa
[ "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_empty_list" ]
[ "tests/test_federation.py::PushDatasetTestCase::test_dataset_id_is_preserved_if_catalog_id_is_not_passed", "tests/test_federation.py::PushDatasetTestCase::test_dataset_level_wrappers", "tests/test_federation.py::PushDatasetTestCase::test_dataset_without_license_sets_notspecified", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_dataset_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_no_optional_parametres", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_owner_org", "tests/test_federation.py::PushDatasetTestCase::test_id_is_created_correctly", "tests/test_federation.py::PushDatasetTestCase::test_id_is_updated_correctly", "tests/test_federation.py::PushDatasetTestCase::test_licenses_are_interpreted_correctly", "tests/test_federation.py::PushDatasetTestCase::test_tags_are_passed_correctly", "tests/test_federation.py::RemoveDatasetTestCase::test_empty_search_doesnt_call_purge", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_out_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_query_one_dataset", "tests/test_federation.py::RemoveDatasetTestCase::test_query_over_500_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_remove_through_filters_and_organization", "tests/test_federation.py::PushThemeTestCase::test_ckan_portal_is_called_with_correct_parametres", "tests/test_federation.py::PushThemeTestCase::test_empty_theme_search_raises_exception", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_identifier", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_label", "tests/test_federation.py::PushCatalogThemesTestCase::test_empty_portal_pushes_every_theme", "tests/test_federation.py::PushCatalogThemesTestCase::test_full_portal_pushes_nothing", "tests/test_federation.py::PushCatalogThemesTestCase::test_non_empty_intersection_pushes_missing_themes" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-04-24 17:27:32+00:00
mit
1,842
datosgobar__pydatajson-181
diff --git a/pydatajson/time_series.py b/pydatajson/time_series.py index 683020d..182986c 100644 --- a/pydatajson/time_series.py +++ b/pydatajson/time_series.py @@ -10,7 +10,8 @@ definidas según la extensión del perfil de metadatos para series de tiempo. from __future__ import unicode_literals from __future__ import print_function from __future__ import with_statement -import os + +from . import custom_exceptions as ce def field_is_time_series(field, distribution=None): @@ -42,10 +43,10 @@ def get_distribution_time_index(distribution): def distribution_has_time_index(distribution): - for field in distribution.get('field', []): - if field.get('specialType') == 'time_index': - return True - return False + try: + return any([field.get('specialType') == 'time_index' for field in distribution.get('field', [])]) + except AttributeError: + return False def dataset_has_time_series(dataset):
datosgobar/pydatajson
0a8a32e5c1def9f73f2f98b03c8c7d72d4c0ad54
diff --git a/tests/test_time_series.py b/tests/test_time_series.py new file mode 100644 index 0000000..716314c --- /dev/null +++ b/tests/test_time_series.py @@ -0,0 +1,41 @@ +from __future__ import unicode_literals +from __future__ import print_function +from __future__ import with_statement + +import os.path +import unittest +from pydatajson.core import DataJson +from pydatajson.time_series import get_distribution_time_index, distribution_has_time_index, dataset_has_time_series +from pydatajson.custom_exceptions import DistributionTimeIndexNonExistentError + +SAMPLES_DIR = os.path.join("tests", "samples") + + +class TimeSeriesTestCase(unittest.TestCase): + + @classmethod + def get_sample(cls, sample_filename): + return os.path.join(SAMPLES_DIR, sample_filename) + + def setUp(self): + ts_catalog = DataJson(self.get_sample('time_series_data.json')) + full_catalog = DataJson(self.get_sample('full_data.json')) + self.ts_dataset = ts_catalog.datasets[0] + self.non_ts_datasets = full_catalog.datasets[0] + self.ts_distribution = ts_catalog.distributions[1] + self.non_ts_distribution = full_catalog.distributions[0] + + def test_get_distribution_time_index(self): + self.assertEqual('indice_tiempo', get_distribution_time_index(self.ts_distribution)) + with self.assertRaises(DistributionTimeIndexNonExistentError): + get_distribution_time_index(self.non_ts_distribution) + + def test_distribution_has_time_index(self): + self.assertTrue(distribution_has_time_index(self.ts_distribution)) + self.assertFalse(distribution_has_time_index(self.non_ts_distribution)) + self.ts_distribution['field'] = ['p', 'r', 'o', 'b', 'l', 'e', 'm'] + self.assertFalse(distribution_has_time_index(self.ts_distribution)) + + def test_dataset_has_time_series(self): + self.assertTrue(dataset_has_time_series(self.ts_dataset)) + self.assertFalse(dataset_has_time_series(self.non_ts_datasets))
Robustecer la función `distribution_has_time_index` para que no se rompa **Contexto** Actualmente si el campo `field` de una distribución no tiene la estructura esperada, la función presume que puede realizar acciones contra ella para validar si tiene o no un índice de tiempo que pueden fallar (como presumir que hay un `dict` contra el que hacer un `get`). **Propuesta** Re-factorizar la función con un `try` `except` (o con cualquier otra estrategia) para que si falla por cualquier motivo interprete que la distribución *no tiene un índice de tiempo*. La justificación detrás es que la función *sólo devuelve True cuando consigue encontrar una distribución que cumple con la especificación de series de tiempo para tener un índice de tiempo, si esto no es así - por el motivo que sea - se considera que la distribución _no tiene un índice de tiempo_*, pero no rompe.
0.0
0a8a32e5c1def9f73f2f98b03c8c7d72d4c0ad54
[ "tests/test_time_series.py::TimeSeriesTestCase::test_distribution_has_time_index", "tests/test_time_series.py::TimeSeriesTestCase::test_get_distribution_time_index" ]
[ "tests/test_time_series.py::TimeSeriesTestCase::test_dataset_has_time_series" ]
{ "failed_lite_validators": [ "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false }
2018-07-27 19:24:18+00:00
mit
1,843
datosgobar__pydatajson-210
diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 207d9fe..e03b74f 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -428,6 +428,15 @@ Toma los siguientes parámetros: portal de destino. Si no se pasa, se toma como organización el catalog_id Retorna el id en el nodo de destino de los datasets federados. + +### Métodos para manejo de organizaciones + +- **pydatajson.federation.get_organizations_from_ckan()**: Devuelve el árbol de organizaciones del portal pasado por parámetro. +Toma los siguientes parámetros: + - **portal_url**: URL del portal de CKAN. Debe implementar el endpoint `/group_tree`. + + Retorna una lista de diccionarios con la información de las organizaciones. Recursivamente, dentro del campo `children`, + se encuentran las organizaciones dependientes en la jerarquía. ## Anexo I: Estructura de respuestas diff --git a/pydatajson/federation.py b/pydatajson/federation.py index 6e57ec1..1138121 100644 --- a/pydatajson/federation.py +++ b/pydatajson/federation.py @@ -300,3 +300,17 @@ def push_new_themes(catalog, portal_url, apikey): catalog, portal_url, apikey, identifier=new_theme) pushed_names.append(name) return pushed_names + + +def get_organizations_from_ckan(portal_url): + """Toma la url de un portal y devuelve su árbol de organizaciones. + + Args: + portal_url (str): La URL del portal CKAN de origen. + Returns: + dict: Diccionarios anidados con la información de + las organizaciones. + """ + ckan_portal = RemoteCKAN(portal_url) + return ckan_portal.call_action('group_tree', + data_dict={'type': 'organization'})
datosgobar/pydatajson
3b9447bbe8f4250cc1b3def1e014f67c4fca0eb0
diff --git a/tests/test_federation.py b/tests/test_federation.py index 746ae23..58449e4 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -18,12 +18,15 @@ from ckanapi.errors import NotFound SAMPLES_DIR = os.path.join("tests", "samples") -class PushDatasetTestCase(unittest.TestCase): - +class FederationSuite(unittest.TestCase): @classmethod def get_sample(cls, sample_filename): return os.path.join(SAMPLES_DIR, sample_filename) + +@patch('pydatajson.federation.RemoteCKAN', autospec=True) +class PushDatasetTestCase(FederationSuite): + @classmethod def setUpClass(cls): cls.catalog = pydatajson.DataJson(cls.get_sample('full_data.json')) @@ -43,7 +46,6 @@ class PushDatasetTestCase(unittest.TestCase): cls.minimum_dataset['distribution'][0][ 'identifier'] = cls.dataset['distribution'][0]['identifier'] - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_id_is_created_correctly(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'package_update': @@ -62,7 +64,6 @@ class PushDatasetTestCase(unittest.TestCase): catalog_id=self.catalog_id) self.assertEqual(self.catalog_id + '_' + self.dataset_id, res_id) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_id_is_updated_correctly(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'package_update': @@ -81,7 +82,6 @@ class PushDatasetTestCase(unittest.TestCase): catalog_id=self.catalog_id) self.assertEqual(self.catalog_id + '_' + self.dataset_id, res_id) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_dataset_id_is_preserved_if_catalog_id_is_not_passed( self, mock_portal): def mock_call_action(action, data_dict=None): @@ -97,7 +97,6 @@ class PushDatasetTestCase(unittest.TestCase): 'portal', 'key') self.assertEqual(self.dataset_id, res_id) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_tags_are_passed_correctly(self, mock_portal): themes = self.dataset['theme'] keywords = [kw for kw in self.dataset['keyword']] @@ -132,7 +131,6 @@ class PushDatasetTestCase(unittest.TestCase): catalog_id=self.catalog_id) self.assertEqual(self.catalog_id + '_' + self.dataset_id, res_id) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_licenses_are_interpreted_correctly(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'license_list': @@ -149,7 +147,6 @@ class PushDatasetTestCase(unittest.TestCase): push_dataset_to_ckan(self.catalog, 'owner', self.dataset_id, 'portal', 'key', catalog_id=self.catalog_id) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_dataset_without_license_sets_notspecified(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'license_list': @@ -172,7 +169,6 @@ class PushDatasetTestCase(unittest.TestCase): 'key', catalog_id=self.minimum_catalog_id) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_dataset_level_wrappers(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'package_update': @@ -192,7 +188,6 @@ class PushDatasetTestCase(unittest.TestCase): self.assertEqual(self.dataset_id, restored_id) self.assertEqual(self.catalog_id + '_' + self.dataset_id, harvested_id) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_harvest_catalog_with_no_optional_parametres(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'package_update': @@ -218,7 +213,6 @@ class PushDatasetTestCase(unittest.TestCase): for ds in self.catalog.datasets], harvested_ids) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_harvest_catalog_with_dataset_list(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'package_update': @@ -254,7 +248,6 @@ class PushDatasetTestCase(unittest.TestCase): [self.catalog_id + '_' + ds_id for ds_id in dataset_list], harvested_ids) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_harvest_catalog_with_owner_org(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'package_update': @@ -275,7 +268,6 @@ class PushDatasetTestCase(unittest.TestCase): for ds in self.catalog.datasets], harvested_ids) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_harvest_catalog_with_errors(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'package_update': @@ -292,7 +284,6 @@ class PushDatasetTestCase(unittest.TestCase): self.assertDictEqual( {self.catalog.datasets[1]['identifier']: "some message"}, errors) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_harvest_catalog_with_empty_list(self, mock_portal): harvested_ids, _ = harvest_catalog_to_ckan( self.catalog, 'portal', 'key', self.catalog_id, @@ -301,7 +292,7 @@ class PushDatasetTestCase(unittest.TestCase): self.assertEqual([], harvested_ids) -class RemoveDatasetTestCase(unittest.TestCase): +class RemoveDatasetTestCase(FederationSuite): @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_empty_search_doesnt_call_purge(self, mock_portal): @@ -378,22 +369,17 @@ class RemoveDatasetTestCase(unittest.TestCase): 'dataset_purge', data_dict={'id': 'id_2'}) -class PushThemeTestCase(unittest.TestCase): - - @classmethod - def get_sample(cls, sample_filename): - return os.path.join(SAMPLES_DIR, sample_filename) +@patch('pydatajson.federation.RemoteCKAN', autospec=True) +class PushThemeTestCase(FederationSuite): @classmethod def setUpClass(cls): cls.catalog = pydatajson.DataJson(cls.get_sample('full_data.json')) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_empty_theme_search_raises_exception(self, mock_portal): with self.assertRaises(AssertionError): push_theme_to_ckan(self.catalog, 'portal_url', 'apikey') - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_function_pushes_theme_by_identifier(self, mock_portal): mock_portal.return_value.call_action = MagicMock( return_value={'name': 'group_name'}) @@ -404,7 +390,6 @@ class PushThemeTestCase(unittest.TestCase): identifier='compras') self.assertEqual('group_name', result) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_function_pushes_theme_by_label(self, mock_portal): mock_portal.return_value.call_action = MagicMock( return_value={'name': 'other_name'}) @@ -415,7 +400,6 @@ class PushThemeTestCase(unittest.TestCase): label='Adjudicaciones') self.assertEqual('other_name', result) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_ckan_portal_is_called_with_correct_parametres(self, mock_portal): mock_portal.return_value.call_action = MagicMock( return_value={'name': u'contrataciones'}) @@ -431,16 +415,13 @@ class PushThemeTestCase(unittest.TestCase): 'group_create', data_dict=group) -class PushCatalogThemesTestCase(unittest.TestCase): - @classmethod - def get_sample(cls, sample_filename): - return os.path.join(SAMPLES_DIR, sample_filename) +@patch('pydatajson.federation.RemoteCKAN', autospec=True) +class PushCatalogThemesTestCase(FederationSuite): @classmethod def setUpClass(cls): cls.catalog = pydatajson.DataJson(cls.get_sample('full_data.json')) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_empty_portal_pushes_every_theme(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'group_list': @@ -461,7 +442,6 @@ class PushCatalogThemesTestCase(unittest.TestCase): [theme['id'] for theme in self.catalog['themeTaxonomy']], res_names) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_full_portal_pushes_nothing(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'group_list': @@ -476,7 +456,6 @@ class PushCatalogThemesTestCase(unittest.TestCase): except AttributeError: self.assertCountEqual([], res_names) - @patch('pydatajson.federation.RemoteCKAN', autospec=True) def test_non_empty_intersection_pushes_missing_themes(self, mock_portal): def mock_call_action(action, data_dict=None): if action == 'group_list': @@ -497,3 +476,12 @@ class PushCatalogThemesTestCase(unittest.TestCase): self.assertCountEqual( [theme['id'] for theme in self.catalog['themeTaxonomy']][2:], res_names) + + +@patch('pydatajson.federation.RemoteCKAN', autospec=True) +class OrganizationsTestCase(FederationSuite): + + def test_get_organization_calls_api_correctly(self, mock_portal): + get_organizations_from_ckan('portal_url') + mock_portal.return_value.call_action.assert_called_with( + 'group_tree', data_dict={'type': 'organization'})
Get organizations from ckan El objetivo es implementar un método que pasada la url de un portal, devuelva las organizaciones presentes completas con su jerarquía.
0.0
3b9447bbe8f4250cc1b3def1e014f67c4fca0eb0
[ "tests/test_federation.py::OrganizationsTestCase::test_get_organization_calls_api_correctly" ]
[ "tests/test_federation.py::PushDatasetTestCase::test_dataset_id_is_preserved_if_catalog_id_is_not_passed", "tests/test_federation.py::PushDatasetTestCase::test_dataset_level_wrappers", "tests/test_federation.py::PushDatasetTestCase::test_dataset_without_license_sets_notspecified", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_dataset_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_empty_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_errors", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_no_optional_parametres", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_owner_org", "tests/test_federation.py::PushDatasetTestCase::test_id_is_created_correctly", "tests/test_federation.py::PushDatasetTestCase::test_id_is_updated_correctly", "tests/test_federation.py::PushDatasetTestCase::test_licenses_are_interpreted_correctly", "tests/test_federation.py::PushDatasetTestCase::test_tags_are_passed_correctly", "tests/test_federation.py::RemoveDatasetTestCase::test_empty_search_doesnt_call_purge", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_out_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_query_one_dataset", "tests/test_federation.py::RemoveDatasetTestCase::test_query_over_500_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_remove_through_filters_and_organization", "tests/test_federation.py::PushThemeTestCase::test_ckan_portal_is_called_with_correct_parametres", "tests/test_federation.py::PushThemeTestCase::test_empty_theme_search_raises_exception", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_identifier", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_label", "tests/test_federation.py::PushCatalogThemesTestCase::test_empty_portal_pushes_every_theme", "tests/test_federation.py::PushCatalogThemesTestCase::test_full_portal_pushes_nothing", "tests/test_federation.py::PushCatalogThemesTestCase::test_non_empty_intersection_pushes_missing_themes" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false }
2018-10-19 14:09:54+00:00
mit
1,844
datosgobar__pydatajson-211
diff --git a/docs/MANUAL.md b/docs/MANUAL.md index e03b74f..8a0c2f6 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -438,6 +438,19 @@ Toma los siguientes parámetros: Retorna una lista de diccionarios con la información de las organizaciones. Recursivamente, dentro del campo `children`, se encuentran las organizaciones dependientes en la jerarquía. +- **pydatajson.federation.push_organization_tree_to_ckan()**: Tomando un árbol de organizaciones como el creado por +`get_organizations_from_ckan()` crea en el portal de destino las organizaciones dentro de su jerarquía. Toma los siguientes +parámetros: + - **portal_url**: La URL del portal CKAN de destino. + - **apikey**: La apikey de un usuario con los permisos que le permitan crear las organizaciones. + - **org_tree**: lista de diccionarios con la data de organizaciones a crear. + - **parent** (opcional, default: None): Si se pasa, el árbol de organizaciones pasado en `org_tree` se + crea bajo la organización con `name` pasado en `parent`. Si no se pasa un parámetro, las organizaciones son creadas + como primer nivel. + + Retorna el árbol de organizaciones creadas. Cada nodo tiene un campo `success` que indica si fue creado exitosamente o + no. En caso de que `success` sea False, los hijos de esa organización no son creados. + ## Anexo I: Estructura de respuestas ### validate_catalog() diff --git a/pydatajson/documentation.py b/pydatajson/documentation.py index 48d8b99..51745d1 100644 --- a/pydatajson/documentation.py +++ b/pydatajson/documentation.py @@ -47,10 +47,12 @@ def dataset_to_markdown(dataset): def distribution_to_markdown(distribution): - """Genera texto en markdown a partir de los metadatos de una `distribution`. + """Genera texto en markdown a partir de los metadatos de una + `distribution`. Args: - distribution (dict): Diccionario con metadatos de una `distribution`. + distribution (dict): Diccionario con metadatos de una + `distribution`. Returns: str: Texto que describe una `distribution`. diff --git a/pydatajson/federation.py b/pydatajson/federation.py index 1138121..fa0b31b 100644 --- a/pydatajson/federation.py +++ b/pydatajson/federation.py @@ -286,7 +286,7 @@ def push_new_themes(catalog, portal_url, apikey): taxonomía. portal_url (str): La URL del portal CKAN de destino. apikey (str): La apikey de un usuario con los permisos que le - permitan crear o actualizar el dataset. + permitan crear o actualizar los temas. Returns: str: Los ids de los temas creados. """ @@ -314,3 +314,42 @@ def get_organizations_from_ckan(portal_url): ckan_portal = RemoteCKAN(portal_url) return ckan_portal.call_action('group_tree', data_dict={'type': 'organization'}) + + +def push_organization_tree_to_ckan(portal_url, apikey, org_tree, parent=None): + """Toma un árbol de organizaciones y lo replica en el portal de + destino. + + Args: + portal_url (str): La URL del portal CKAN de destino. + apikey (str): La apikey de un usuario con los permisos que le + permitan crear las organizaciones. + org_tree(list): lista de diccionarios con la data de las + organizaciones a crear. + parent(str): campo name de la organizacion padre. + Returns: + (list): Devuelve el arbol de organizaciones recorridas, + junto con el status detallando si la creación fue + exitosa o no. + + """ + portal = RemoteCKAN(portal_url, apikey=apikey) + created = [] + for node in org_tree: + if parent: + node['groups'] = [{'name': parent}] + try: + pushed_org = portal.call_action('organization_create', + data_dict=node) + pushed_org['success'] = True + except Exception as e: + logger.exception('Ocurrió un error creando la organización {}: {}' + .format(node['title'], str(e))) + pushed_org = {'name': node, 'success': False} + + if pushed_org['success']: + pushed_org['children'] = push_organization_tree_to_ckan( + portal_url, apikey, node['children'], parent=node['name']) + + created.append(pushed_org) + return created
datosgobar/pydatajson
185d79d95555dd3041404b208a09583cb95a9a19
diff --git a/tests/samples/organization_tree.json b/tests/samples/organization_tree.json new file mode 100644 index 0000000..0e0ff6d --- /dev/null +++ b/tests/samples/organization_tree.json @@ -0,0 +1,235 @@ +[ + { + "highlighted": false, + "title": " Jefatura de Gabinete de Ministros", + "children": [ + { + "highlighted": false, + "title": "Agencia de Acceso a la Informaci\u00f3n P\u00fablica", + "children": [], + "name": "aaip", + "id": "daa8b40c-fa37-478c-a7ef-081305aeadd8" + }, + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Ambiente y Desarrollo Sustentable", + "children": [ + { + "highlighted": false, + "title": "Autoridad de Cuenca Matanza Riachuelo", + "children": [], + "name": "acumar", + "id": "1b6b28cd-098f-41d7-b43f-d5a01ffa8759" + } + ], + "name": "ambiente", + "id": "0e5aa328-825e-4509-851d-5421e866635e" + }, + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Modernizaci\u00f3n", + "children": [ + { + "highlighted": false, + "title": "Empresa Argentina de Soluciones Satelitales", + "children": [], + "name": "arsat", + "id": "b2509ac0-3af6-4f66-9ffa-8c6fb4206791" + }, + { + "highlighted": false, + "title": "Ente Nacional de Comunicaciones", + "children": [], + "name": "enacom", + "id": "6eb7d19b-2d42-494f-8e57-d67c501d23eb" + } + ], + "name": "modernizacion", + "id": "4c7a6f6b-5caf-42a1-aae5-0a07e609a235" + }, + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Turismo", + "children": [], + "name": "turismo", + "id": "3a751de6-128e-4f9a-a479-4672ef79a0e8" + } + ], + "name": "jgm", + "id": "f917ad65-28ea-42a9-81ae-61a2bb8f58d0" + }, + { + "highlighted": false, + "title": " Ministerio de Defensa", + "children": [ + { + "highlighted": false, + "title": "Instituto Geogr\u00e1fico Nacional", + "children": [], + "name": "ign", + "id": "9b47c8eb-bb5c-40df-bbaa-589374d14da8" + }, + { + "highlighted": false, + "title": "Servicio Meteorol\u00f3gico Nacional", + "children": [], + "name": "smn", + "id": "dba2a17e-e2ea-4e0b-b0ef-bf4ffe9f9ad9" + } + ], + "name": "defensa", + "id": "5e80ed4f-8bfb-4451-8240-e8f39e695ee1" + }, + { + "highlighted": false, + "title": "Ministerio de Educaci\u00f3n, Cultura, Ciencia y Tecnolog\u00eda", + "children": [ + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Ciencia y Tecnolog\u00eda", + "children": [], + "name": "mincyt", + "id": "772ab9b7-056d-4ae4-b7a2-a1329e979690" + }, + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Cultura", + "children": [], + "name": "cultura", + "id": "9fcc8ffc-3dcc-4437-acc8-72c5b08d8d51" + } + ], + "name": "educacion", + "id": "27d39ff7-7110-4c6d-b7e8-1b8eba392d7e" + }, + { + "highlighted": false, + "title": " Ministerio de Hacienda", + "children": [ + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Energ\u00eda", + "children": [ + { + "highlighted": false, + "title": "Ente Nacional Regulador del Gas", + "children": [], + "name": "enargas", + "id": "dddda9d3-644d-4e3d-974b-302fd8945a86" + } + ], + "name": "energia", + "id": "cd1b32a2-2d3a-44ac-8c98-a425a7b62d42" + }, + { + "highlighted": false, + "title": "Subsecretar\u00eda de Presupuesto", + "children": [], + "name": "sspre", + "id": "a753aeb8-52eb-4cfc-a6ee-6d930094b0f2" + }, + { + "highlighted": false, + "title": "Subsecretar\u00eda de Programaci\u00f3n Macroecon\u00f3mica", + "children": [], + "name": "sspm", + "id": "68f9ee22-5ec3-44cf-a32b-b87d9db46b93" + }, + { + "highlighted": false, + "title": "Subsecretar\u00eda de Programaci\u00f3n Microecon\u00f3mica", + "children": [], + "name": "sspmi", + "id": "b4baa84a-16a7-4db0-af9c-bd925971d26a" + } + ], + "name": "hacienda", + "id": "b2a6e77e-a3c8-4e1a-bcba-7134a9436051" + }, + { + "highlighted": false, + "title": " Ministerio de Justicia y Derechos Humanos", + "children": [], + "name": "justicia", + "id": "06b380f8-888f-43c0-8367-16a7ddf47d4f" + }, + { + "highlighted": false, + "title": " Ministerio del Interior, Obras P\u00fablicas y Vivienda ", + "children": [], + "name": "interior", + "id": "c88b1ad1-f78d-4cf9-848d-d73ccae6cd8e" + }, + { + "highlighted": false, + "title": "Ministerio de Producci\u00f3n y Trabajo", + "children": [ + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Agroindustria", + "children": [], + "name": "agroindustria", + "id": "b10c94e2-ade1-4a97-8c4c-b1ada7878d60" + }, + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Trabajo y Empleo", + "children": [], + "name": "trabajo", + "id": "f31cb5dc-79ab-442b-ac7f-87ef6ad7749d" + }, + { + "highlighted": false, + "title": "Secretar\u00eda de Transformaci\u00f3n Productiva", + "children": [], + "name": "siep", + "id": "83a04686-747a-4ba3-a0b1-2f05c3196bc4" + } + ], + "name": "produccion", + "id": "1ca8d15b-31fc-4f09-ba09-53edd3d4cce6" + }, + { + "highlighted": false, + "title": "Ministerio de Relaciones Exteriores y Culto", + "children": [], + "name": "exterior", + "id": "89cd05f2-11c1-4f1a-875f-b4faf97eb4d4" + }, + { + "highlighted": false, + "title": "Ministerio de Salud y Desarrollo Social", + "children": [ + { + "highlighted": false, + "title": "Secretar\u00eda de Gobierno de Salud", + "children": [], + "name": "salud", + "id": "dd1f2018-587f-43af-9b07-fc32f5ab588b" + } + ], + "name": "desarrollo-social", + "id": "ef25c735-2abb-4165-94a6-a6798a103603" + }, + { + "highlighted": false, + "title": " Ministerio de Seguridad", + "children": [], + "name": "seguridad", + "id": "908fd413-5a22-40e7-9204-38ef380ae232" + }, + { + "highlighted": false, + "title": " Ministerio de Transporte", + "children": [], + "name": "transporte", + "id": "71418928-10c4-4625-aeaf-69a4d73d00ed" + }, + { + "highlighted": false, + "title": "Sin organizaci\u00f3n asignada", + "children": [], + "name": "otros", + "id": "109d53ef-3ed3-498e-97d0-a456698969f7" + } +] \ No newline at end of file diff --git a/tests/test_federation.py b/tests/test_federation.py index 58449e4..d2a0af6 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -5,6 +5,7 @@ from __future__ import unicode_literals import unittest import os import re +import json try: from mock import patch, MagicMock @@ -481,7 +482,49 @@ class PushCatalogThemesTestCase(FederationSuite): @patch('pydatajson.federation.RemoteCKAN', autospec=True) class OrganizationsTestCase(FederationSuite): + def setUp(self): + self.portal_url = 'portal_url' + self.apikey = 'apikey' + self.org_tree = json.load(open( + self.get_sample('organization_tree.json'))) + + def check_hierarchy(self, node, parent=None): + if not node['success']: + self.assertTrue('children' not in node) + return + if parent is None: + self.assertTrue('groups' not in node) + else: + self.assertDictEqual(node['groups'][0], + {'name': parent}) + + for child in node['children']: + self.check_hierarchy(child, parent=node['name']) + def test_get_organization_calls_api_correctly(self, mock_portal): - get_organizations_from_ckan('portal_url') + get_organizations_from_ckan(self.portal_url) mock_portal.return_value.call_action.assert_called_with( 'group_tree', data_dict={'type': 'organization'}) + + def test_push_organizations_sends_correct_hierarchy(self, mock_portal): + mock_portal.return_value.call_action = (lambda _, data_dict: data_dict) + pushed_tree = push_organization_tree_to_ckan(self.portal_url, + self.apikey, + self.org_tree) + for node in pushed_tree: + self.check_hierarchy(node) + + def test_push_organizations_cuts_trees_on_failures(self, mock_portal): + def mock_org_create(_action, data_dict): + broken_orgs = ('acumar', 'modernizacion', 'hacienda') + if data_dict['name'] in broken_orgs: + raise Exception('broken org on each level') + else: + return data_dict + + mock_portal.return_value.call_action = mock_org_create + pushed_tree = push_organization_tree_to_ckan(self.portal_url, + self.apikey, + self.org_tree) + for node in pushed_tree: + self.check_hierarchy(node)
Push organizations to ckan Dado un árbol jerárquico de organizaciones, el objetivo es crear las organizaciones allí descriptas, manteniendo la jerarquía original
0.0
185d79d95555dd3041404b208a09583cb95a9a19
[ "tests/test_federation.py::OrganizationsTestCase::test_push_organizations_cuts_trees_on_failures", "tests/test_federation.py::OrganizationsTestCase::test_push_organizations_sends_correct_hierarchy" ]
[ "tests/test_federation.py::PushDatasetTestCase::test_dataset_id_is_preserved_if_catalog_id_is_not_passed", "tests/test_federation.py::PushDatasetTestCase::test_dataset_level_wrappers", "tests/test_federation.py::PushDatasetTestCase::test_dataset_without_license_sets_notspecified", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_dataset_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_empty_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_errors", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_no_optional_parametres", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_owner_org", "tests/test_federation.py::PushDatasetTestCase::test_id_is_created_correctly", "tests/test_federation.py::PushDatasetTestCase::test_id_is_updated_correctly", "tests/test_federation.py::PushDatasetTestCase::test_licenses_are_interpreted_correctly", "tests/test_federation.py::PushDatasetTestCase::test_tags_are_passed_correctly", "tests/test_federation.py::RemoveDatasetTestCase::test_empty_search_doesnt_call_purge", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_out_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_query_one_dataset", "tests/test_federation.py::RemoveDatasetTestCase::test_query_over_500_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_remove_through_filters_and_organization", "tests/test_federation.py::PushThemeTestCase::test_ckan_portal_is_called_with_correct_parametres", "tests/test_federation.py::PushThemeTestCase::test_empty_theme_search_raises_exception", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_identifier", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_label", "tests/test_federation.py::PushCatalogThemesTestCase::test_empty_portal_pushes_every_theme", "tests/test_federation.py::PushCatalogThemesTestCase::test_full_portal_pushes_nothing", "tests/test_federation.py::PushCatalogThemesTestCase::test_non_empty_intersection_pushes_missing_themes", "tests/test_federation.py::OrganizationsTestCase::test_get_organization_calls_api_correctly" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-10-23 12:34:37+00:00
mit
1,845
datosgobar__pydatajson-212
diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 8a0c2f6..a84878b 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -438,6 +438,16 @@ Toma los siguientes parámetros: Retorna una lista de diccionarios con la información de las organizaciones. Recursivamente, dentro del campo `children`, se encuentran las organizaciones dependientes en la jerarquía. +- **pydatajson.federation.get_organization_from_ckan()**: Devuelve un diccionario con la información de una +organización en base a un id y un portal pasados por parámetro. +Toma los siguientes parámetros: + - **portal_url**: URL del portal de CKAN. Debe implementar el endpoint `/organization_show`. + - **org_id**: Identificador o name de la organización a buscar. + + Retorna un diccionario con la información de la organización correspondiente al identificador obtenido. + _No_ incluye su jerarquía, por lo cual ésta deberá ser conseguida mediante el uso de la función + `get_organizations_from_ckan`. + - **pydatajson.federation.push_organization_tree_to_ckan()**: Tomando un árbol de organizaciones como el creado por `get_organizations_from_ckan()` crea en el portal de destino las organizaciones dentro de su jerarquía. Toma los siguientes parámetros: diff --git a/pydatajson/federation.py b/pydatajson/federation.py index fa0b31b..eb5564b 100644 --- a/pydatajson/federation.py +++ b/pydatajson/federation.py @@ -308,7 +308,7 @@ def get_organizations_from_ckan(portal_url): Args: portal_url (str): La URL del portal CKAN de origen. Returns: - dict: Diccionarios anidados con la información de + list: Lista de diccionarios anidados con la información de las organizaciones. """ ckan_portal = RemoteCKAN(portal_url) @@ -316,6 +316,20 @@ def get_organizations_from_ckan(portal_url): data_dict={'type': 'organization'}) +def get_organization_from_ckan(portal_url, org_id): + """Toma la url de un portal y un id, y devuelve la organización a buscar. + + Args: + portal_url (str): La URL del portal CKAN de origen. + org_id (str): El id de la organización a buscar. + Returns: + dict: Diccionario con la información de la organización. + """ + ckan_portal = RemoteCKAN(portal_url) + return ckan_portal.call_action('organization_show', + data_dict={'id': org_id}) + + def push_organization_tree_to_ckan(portal_url, apikey, org_tree, parent=None): """Toma un árbol de organizaciones y lo replica en el portal de destino.
datosgobar/pydatajson
bcc401111ada65362839f1f92490198ddc5d94ea
diff --git a/tests/test_federation.py b/tests/test_federation.py index d2a0af6..daf9df4 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -501,11 +501,16 @@ class OrganizationsTestCase(FederationSuite): for child in node['children']: self.check_hierarchy(child, parent=node['name']) - def test_get_organization_calls_api_correctly(self, mock_portal): + def test_get_organizations_calls_api_correctly(self, mock_portal): get_organizations_from_ckan(self.portal_url) mock_portal.return_value.call_action.assert_called_with( 'group_tree', data_dict={'type': 'organization'}) + def test_get_organization_calls_api_correctly(self, mock_portal): + get_organization_from_ckan(self.portal_url, 'test_id') + mock_portal.return_value.call_action.assert_called_with( + 'organization_show', data_dict={'id': 'test_id'}) + def test_push_organizations_sends_correct_hierarchy(self, mock_portal): mock_portal.return_value.call_action = (lambda _, data_dict: data_dict) pushed_tree = push_organization_tree_to_ckan(self.portal_url,
Get organization from ckan El objetivo es implementar un método que devuelva la información de una organizacion a partir de su nombre o id y la url del portal pasado por parametro.
0.0
bcc401111ada65362839f1f92490198ddc5d94ea
[ "tests/test_federation.py::OrganizationsTestCase::test_get_organization_calls_api_correctly" ]
[ "tests/test_federation.py::PushDatasetTestCase::test_dataset_id_is_preserved_if_catalog_id_is_not_passed", "tests/test_federation.py::PushDatasetTestCase::test_dataset_level_wrappers", "tests/test_federation.py::PushDatasetTestCase::test_dataset_without_license_sets_notspecified", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_dataset_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_empty_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_errors", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_no_optional_parametres", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_owner_org", "tests/test_federation.py::PushDatasetTestCase::test_id_is_created_correctly", "tests/test_federation.py::PushDatasetTestCase::test_id_is_updated_correctly", "tests/test_federation.py::PushDatasetTestCase::test_licenses_are_interpreted_correctly", "tests/test_federation.py::PushDatasetTestCase::test_tags_are_passed_correctly", "tests/test_federation.py::RemoveDatasetTestCase::test_empty_search_doesnt_call_purge", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_out_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_query_one_dataset", "tests/test_federation.py::RemoveDatasetTestCase::test_query_over_500_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_remove_through_filters_and_organization", "tests/test_federation.py::PushThemeTestCase::test_ckan_portal_is_called_with_correct_parametres", "tests/test_federation.py::PushThemeTestCase::test_empty_theme_search_raises_exception", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_identifier", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_label", "tests/test_federation.py::PushCatalogThemesTestCase::test_empty_portal_pushes_every_theme", "tests/test_federation.py::PushCatalogThemesTestCase::test_full_portal_pushes_nothing", "tests/test_federation.py::PushCatalogThemesTestCase::test_non_empty_intersection_pushes_missing_themes", "tests/test_federation.py::OrganizationsTestCase::test_get_organizations_calls_api_correctly", "tests/test_federation.py::OrganizationsTestCase::test_push_organizations_cuts_trees_on_failures", "tests/test_federation.py::OrganizationsTestCase::test_push_organizations_sends_correct_hierarchy" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2018-10-24 13:57:03+00:00
mit
1,846
datosgobar__pydatajson-219
diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 6ab393f..d68ab0a 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -350,6 +350,10 @@ Toma los siguientes parámetros: como groups de CKAN. - **demote_themes** (opcional, default: True): Si está en true, los labels de los themes del dataset, se escriben como tags de CKAN; sino,se pasan como grupo. + - **download_strategy** (opcional, default None): La referencia a una función que toma (catalog, distribution) de + entrada y devuelve un booleano. Esta función se aplica sobre todas las distribuciones del dataset. Si devuelve `True`, + se descarga el archivo indicado en el `downloadURL` de la distribución y se lo sube al portal de destino. Si es None, + se omite esta operación. Retorna el id en el nodo de destino del dataset federado. @@ -400,6 +404,10 @@ Toma los siguientes parámetros: organización pasada como parámetro. - **catalog_id**: El prefijo que va a preceder el id y name del dataset en el portal destino, separado por un guión. + - **download_strategy** (opcional, default None): La referencia a una función que toma (catalog, distribution) de + entrada y devuelve un booleano. Esta función se aplica sobre todas las distribuciones del dataset. Si devuelve `True`, + se descarga el archivo indicado en el `downloadURL` de la distribución y se lo sube al portal de destino. Si es None, + se omite esta operación. Retorna el id en el nodo de destino del dataset federado. @@ -411,6 +419,10 @@ Toma los siguientes parámetros: - **portal_url**: URL del portal de CKAN de destino. - **apikey**: La apikey de un usuario del portal de destino con los permisos para crear el dataset bajo la organización pasada como parámetro. + - **download_strategy** (opcional, default None): La referencia a una función que toma (catalog, distribution) de + entrada y devuelve un booleano. Esta función se aplica sobre todas las distribuciones del dataset. Si devuelve `True`, + se descarga el archivo indicado en el `downloadURL` de la distribución y se lo sube al portal de destino. Si es None, + se omite esta operación. Retorna el id del dataset restaurado. @@ -424,7 +436,11 @@ Toma los siguientes parámetros: - **dataset_list** (opcional, default: None): Lista de ids de los datasets a federar. Si no se pasa, se federan todos los datasets del catálogo. - **owner_org** (opcional, default: None): La organización a la que pertence el dataset. Debe encontrarse en el - portal de destino. Si no se pasa, se toma como organización el catalog_id + portal de destino. Si no se pasa, se toma como organización el catalog_id. + - **download_strategy** (opcional, default None): La referencia a una función que toma (catalog, distribution) de + entrada y devuelve un booleano. Esta función se aplica sobre todas las distribuciones del catálogo. Si devuelve + `True`, se descarga el archivo indicado en el `downloadURL` de la distribución y se lo sube al portal de destino. Si + es None, se omite esta operación. Retorna el id en el nodo de destino de los datasets federados. diff --git a/pydatajson/federation.py b/pydatajson/federation.py index 0cd1e5e..646f470 100644 --- a/pydatajson/federation.py +++ b/pydatajson/federation.py @@ -10,13 +10,15 @@ from ckanapi import RemoteCKAN from ckanapi.errors import NotFound from .ckan_utils import map_dataset_to_package, map_theme_to_group from .search import get_datasets +from .helpers import resource_files_download logger = logging.getLogger('pydatajson.federation') def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, portal_url, apikey, catalog_id=None, - demote_superThemes=True, demote_themes=True): + demote_superThemes=True, demote_themes=True, + download_strategy=None): """Escribe la metadata de un dataset en el portal pasado por parámetro. Args: @@ -33,6 +35,10 @@ def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, themes del dataset, se propagan como grupo. demote_themes(bool): Si está en true, los labels de los themes del dataset, pasan a ser tags. Sino, se pasan como grupo. + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset en el catálogo de destino. """ @@ -64,11 +70,17 @@ def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, pushed_package = ckan_portal.call_action( 'package_create', data_dict=package) + if download_strategy: + with resource_files_download(catalog, dataset.get('distribution', []), + download_strategy) as resource_files: + resources_upload(portal_url, apikey, resource_files, + catalog_id=catalog_id) + ckan_portal.close() return pushed_package['id'] -def resources_upload(portal_url, apikey, resource_files): +def resources_upload(portal_url, apikey, resource_files, catalog_id=None): """Sube archivos locales a sus distribuciones correspondientes en el portal pasado por parámetro. @@ -78,15 +90,18 @@ def resources_upload(portal_url, apikey, resource_files): permitan crear o actualizar el dataset. resource_files(dict): Diccionario con entradas id_de_distribucion:path_al_recurso a subir + catalog_id(str): prependea el id al id del recurso para + encontrarlo antes de subirlo Returns: list: los ids de los recursos modificados """ ckan_portal = RemoteCKAN(portal_url, apikey=apikey) res = [] for resource in resource_files: + resource_id = catalog_id + '_' + resource if catalog_id else resource try: pushed = ckan_portal.action.resource_patch( - id=resource, + id=resource_id, resource_type='file.upload', upload=open(resource_files[resource], 'rb')) res.append(pushed['id']) @@ -199,7 +214,7 @@ def push_theme_to_ckan(catalog, portal_url, apikey, def restore_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, - portal_url, apikey): + portal_url, apikey, download_strategy=None): """Restaura la metadata de un dataset en el portal pasado por parámetro. Args: @@ -210,15 +225,22 @@ def restore_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, portal_url (str): La URL del portal CKAN de destino. apikey (str): La apikey de un usuario con los permisos que le permitan crear o actualizar el dataset. + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset restaurado. """ - return push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, - portal_url, apikey, None, False, False) + + return push_dataset_to_ckan(catalog, owner_org, + dataset_origin_identifier, portal_url, + apikey, None, False, False, download_strategy) def harvest_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, - portal_url, apikey, catalog_id): + portal_url, apikey, catalog_id, + download_strategy=None): """Federa la metadata de un dataset en el portal pasado por parámetro. Args: @@ -229,17 +251,22 @@ def harvest_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, portal_url (str): La URL del portal CKAN de destino. apikey (str): La apikey de un usuario con los permisos que le permitan crear o actualizar el dataset. - catalog_id(str): El id que prep + catalog_id(str): El id que prependea al dataset y recursos + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset restaurado. """ return push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, - portal_url, apikey, catalog_id=catalog_id) + portal_url, apikey, catalog_id=catalog_id, + download_strategy=download_strategy) def restore_catalog_to_ckan(catalog, owner_org, portal_url, apikey, - dataset_list=None): + dataset_list=None, download_strategy=None): """Restaura los datasets de un catálogo al portal pasado por parámetro. Si hay temas presentes en el DataJson que no están en el portal de CKAN, los genera. @@ -253,6 +280,10 @@ def restore_catalog_to_ckan(catalog, owner_org, portal_url, apikey, se pasa una lista, todos los datasests se restauran. owner_org (str): La organización a la cual pertencen los datasets. Si no se pasa, se utiliza el catalog_id. + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset en el catálogo de destino. """ @@ -261,14 +292,16 @@ def restore_catalog_to_ckan(catalog, owner_org, portal_url, apikey, for ds in catalog.datasets] restored = [] for dataset_id in dataset_list: - restored_id = restore_dataset_to_ckan( - catalog, owner_org, dataset_id, portal_url, apikey) + restored_id = restore_dataset_to_ckan(catalog, owner_org, dataset_id, + portal_url, apikey, + download_strategy) restored.append(restored_id) return restored def harvest_catalog_to_ckan(catalog, portal_url, apikey, catalog_id, - dataset_list=None, owner_org=None): + dataset_list=None, owner_org=None, + download_strategy=None): """Federa los datasets de un catálogo al portal pasado por parámetro. Args: @@ -282,6 +315,10 @@ def harvest_catalog_to_ckan(catalog, portal_url, apikey, catalog_id, se pasa una lista, todos los datasests se federan. owner_org (str): La organización a la cual pertencen los datasets. Si no se pasa, se utiliza el catalog_id. + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset en el catálogo de destino. """ @@ -293,8 +330,10 @@ def harvest_catalog_to_ckan(catalog, portal_url, apikey, catalog_id, errors = {} for dataset_id in dataset_list: try: - harvested_id = harvest_dataset_to_ckan( - catalog, owner_org, dataset_id, portal_url, apikey, catalog_id) + harvested_id = harvest_dataset_to_ckan(catalog, owner_org, + dataset_id, portal_url, + apikey, catalog_id, + download_strategy) harvested.append(harvested_id) except Exception as e: msg = "Error federando catalogo: %s, dataset: %s al portal: %s\n"\ diff --git a/pydatajson/helpers.py b/pydatajson/helpers.py index 1e0b48c..8331c83 100644 --- a/pydatajson/helpers.py +++ b/pydatajson/helpers.py @@ -11,13 +11,20 @@ from datetime import datetime import os import json import re +import logging +import tempfile +from contextlib import contextmanager from openpyxl import load_workbook from six.moves.urllib_parse import urlparse from six import string_types, iteritems from unidecode import unidecode +from pydatajson.download import download_to_file + +logger = logging.getLogger('pydatajson.helpers') + ABSOLUTE_PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) ABSOLUTE_SCHEMA_DIR = os.path.join(ABSOLUTE_PROJECT_DIR, "schemas") STOP_WORDS = [ @@ -392,3 +399,39 @@ def pprint(result): result, indent=4, separators=(",", ": "), ensure_ascii=False ))) + + +@contextmanager +def resource_files_download(catalog, distributions, download_strategy): + resource_files = {} + distributions = [dist for dist in distributions if + download_strategy(catalog, dist)] + for dist in distributions: + try: + tmpfile = tempfile.NamedTemporaryFile(delete=False) + tmpfile.close() + download_to_file(dist['downloadURL'], tmpfile.name) + resource_files[dist['identifier']] = tmpfile.name + except Exception as e: + logger.exception( + "Error descargando el recurso {} de la distribución {}: {}" + .format(dist.get('downloadURL'), + dist.get('identifier'), str(e)) + ) + continue + try: + yield resource_files + + finally: + for resource in resource_files: + os.remove(resource_files[resource]) + + +def is_local_andino_resource(catalog, distribution): + dist_type = distribution.get('type') + if dist_type is not None: + return dist_type == 'file.upload' + homepage = catalog.get('homepage') + if homepage is not None: + return distribution.get('downloadURL', '').startswith(homepage) + return False
datosgobar/pydatajson
bdc7e8f4d6e1128c657ffa5b8e66215311da9e9c
diff --git a/tests/test_federation.py b/tests/test_federation.py index 21c1c5e..900cf42 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -14,6 +14,7 @@ except ImportError: from .context import pydatajson from pydatajson.federation import * +from pydatajson.helpers import is_local_andino_resource from ckanapi.errors import NotFound SAMPLES_DIR = os.path.join("tests", "samples") @@ -317,6 +318,43 @@ class PushDatasetTestCase(FederationSuite): ) self.assertEqual([], res) + @patch('pydatajson.helpers.download_to_file') + def test_push_dataset_upload_strategy(self, mock_download, mock_portal): + def mock_call_action(action, data_dict=None): + if action == 'package_update': + return data_dict + else: + return [] + mock_portal.return_value.call_action = mock_call_action + push_dataset_to_ckan( + self.catalog, + 'owner', + self.dataset_id, + 'portal', + 'key', + download_strategy=(lambda _, x: x['identifier'] == '1.1')) + mock_portal.return_value.action.resource_patch.assert_called_with( + id='1.1', + resource_type='file.upload', + upload=ANY + ) + + def test_push_dataset_upload_empty_strategy(self, mock_portal): + def mock_call_action(action, data_dict=None): + if action == 'package_update': + return data_dict + else: + return [] + mock_portal.return_value.call_action = mock_call_action + push_dataset_to_ckan( + self.minimum_catalog, + 'owner', + self.dataset_id, + 'portal', + 'key', + download_strategy=is_local_andino_resource) + mock_portal.return_value.action.resource_patch.not_called() + class RemoveDatasetTestCase(FederationSuite):
Agregar la posibilidad de carga/descarga de distribuciones en el método `restore_catalog_to_ckan()` El método tendría 2 flags que permitirían discriminar estas situaciones: + Quiero restaurar un catálogo solamente transfiriendo los metadatos (sin descargar ni volver a cargar distribuciones). + Quiero restaurar un catálogo descargando todas las distribuciones y cargándolas por API al CKAN de destino. + Quiero restaurar un catálogo descargando solamente las distribuciones que cumplen un determinado patrón (aka. el "pattern" de URL de descarga que tiene un CKAN) y cargándolas en el CKAN de destino, el resto de las distribuciones sólo se transfiere la metadata de downloadURL como está. Nota: implementar el patrón regular de identificación de "qué me tengo que descargar" como una variable con el default hecho para las URLs de CKAN.
0.0
bdc7e8f4d6e1128c657ffa5b8e66215311da9e9c
[ "tests/test_federation.py::PushDatasetTestCase::test_dataset_id_is_preserved_if_catalog_id_is_not_passed", "tests/test_federation.py::PushDatasetTestCase::test_dataset_level_wrappers", "tests/test_federation.py::PushDatasetTestCase::test_dataset_without_license_sets_notspecified", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_dataset_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_empty_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_errors", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_no_optional_parametres", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_owner_org", "tests/test_federation.py::PushDatasetTestCase::test_id_is_created_correctly", "tests/test_federation.py::PushDatasetTestCase::test_id_is_updated_correctly", "tests/test_federation.py::PushDatasetTestCase::test_licenses_are_interpreted_correctly", "tests/test_federation.py::PushDatasetTestCase::test_push_dataset_upload_empty_strategy", "tests/test_federation.py::PushDatasetTestCase::test_push_dataset_upload_strategy", "tests/test_federation.py::PushDatasetTestCase::test_resource_upload_error", "tests/test_federation.py::PushDatasetTestCase::test_resource_upload_succesfully", "tests/test_federation.py::PushDatasetTestCase::test_tags_are_passed_correctly", "tests/test_federation.py::RemoveDatasetTestCase::test_empty_search_doesnt_call_purge", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_out_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_query_one_dataset", "tests/test_federation.py::RemoveDatasetTestCase::test_query_over_500_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_remove_through_filters_and_organization", "tests/test_federation.py::PushThemeTestCase::test_ckan_portal_is_called_with_correct_parametres", "tests/test_federation.py::PushThemeTestCase::test_empty_theme_search_raises_exception", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_identifier", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_label", "tests/test_federation.py::PushCatalogThemesTestCase::test_empty_portal_pushes_every_theme", "tests/test_federation.py::PushCatalogThemesTestCase::test_full_portal_pushes_nothing", "tests/test_federation.py::PushCatalogThemesTestCase::test_non_empty_intersection_pushes_missing_themes", "tests/test_federation.py::OrganizationsTestCase::test_get_organization_calls_api_correctly", "tests/test_federation.py::OrganizationsTestCase::test_get_organizations_calls_api_correctly", "tests/test_federation.py::OrganizationsTestCase::test_push_organization_assigns_parent_correctly", "tests/test_federation.py::OrganizationsTestCase::test_push_organization_sets_correct_attributes_on_failures", "tests/test_federation.py::OrganizationsTestCase::test_push_organization_sets_correct_attributes_on_success", "tests/test_federation.py::OrganizationsTestCase::test_push_organizations_cuts_trees_on_failures", "tests/test_federation.py::OrganizationsTestCase::test_push_organizations_sends_correct_hierarchy" ]
[]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-11-06 18:10:59+00:00
mit
1,847
datosgobar__pydatajson-220
diff --git a/docs/MANUAL.md b/docs/MANUAL.md index 6ab393f..0e27a6b 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -350,6 +350,10 @@ Toma los siguientes parámetros: como groups de CKAN. - **demote_themes** (opcional, default: True): Si está en true, los labels de los themes del dataset, se escriben como tags de CKAN; sino,se pasan como grupo. + - **download_strategy** (opcional, default None): La referencia a una función que toma (catalog, distribution) de + entrada y devuelve un booleano. Esta función se aplica sobre todas las distribuciones del dataset. Si devuelve `True`, + se descarga el archivo indicado en el `downloadURL` de la distribución y se lo sube al portal de destino. Si es None, + se omite esta operación. Retorna el id en el nodo de destino del dataset federado. @@ -400,6 +404,10 @@ Toma los siguientes parámetros: organización pasada como parámetro. - **catalog_id**: El prefijo que va a preceder el id y name del dataset en el portal destino, separado por un guión. + - **download_strategy** (opcional, default None): La referencia a una función que toma (catalog, distribution) de + entrada y devuelve un booleano. Esta función se aplica sobre todas las distribuciones del dataset. Si devuelve `True`, + se descarga el archivo indicado en el `downloadURL` de la distribución y se lo sube al portal de destino. Si es None, + se omite esta operación. Retorna el id en el nodo de destino del dataset federado. @@ -411,6 +419,10 @@ Toma los siguientes parámetros: - **portal_url**: URL del portal de CKAN de destino. - **apikey**: La apikey de un usuario del portal de destino con los permisos para crear el dataset bajo la organización pasada como parámetro. + - **download_strategy** (opcional, default None): La referencia a una función que toma (catalog, distribution) de + entrada y devuelve un booleano. Esta función se aplica sobre todas las distribuciones del dataset. Si devuelve `True`, + se descarga el archivo indicado en el `downloadURL` de la distribución y se lo sube al portal de destino. Si es None, + se omite esta operación. Retorna el id del dataset restaurado. @@ -424,7 +436,11 @@ Toma los siguientes parámetros: - **dataset_list** (opcional, default: None): Lista de ids de los datasets a federar. Si no se pasa, se federan todos los datasets del catálogo. - **owner_org** (opcional, default: None): La organización a la que pertence el dataset. Debe encontrarse en el - portal de destino. Si no se pasa, se toma como organización el catalog_id + portal de destino. Si no se pasa, se toma como organización el catalog_id. + - **download_strategy** (opcional, default None): La referencia a una función que toma (catalog, distribution) de + entrada y devuelve un booleano. Esta función se aplica sobre todas las distribuciones del catálogo. Si devuelve + `True`, se descarga el archivo indicado en el `downloadURL` de la distribución y se lo sube al portal de destino. Si + es None, se omite esta operación. Retorna el id en el nodo de destino de los datasets federados. @@ -483,6 +499,16 @@ en el portal de destino. Toma los siguientes parámetros: Retorna el diccionario de la organización creada. El resultado tiene un campo `success` que indica si fue creado exitosamente o no. +- **pydatajson.federation.remove_organization_from_ckan()**: Tomando el id o name de una organización; la borra en el +portal de destino. Toma los siguientes parámetros: + - **portal_url**: La URL del portal CKAN de destino. + - **apikey**: La apikey de un usuario con los permisos que le permitan borrar la organización. + - **organization_id**: Id o name de la organización a borrar. + + Retorna None. + + **Advertencia**: En caso de que la organización tenga hijos en la jerarquía, estos pasan a ser de primer nivel. + ## Anexo I: Estructura de respuestas diff --git a/pydatajson/federation.py b/pydatajson/federation.py index 0cd1e5e..1b4465c 100644 --- a/pydatajson/federation.py +++ b/pydatajson/federation.py @@ -10,13 +10,15 @@ from ckanapi import RemoteCKAN from ckanapi.errors import NotFound from .ckan_utils import map_dataset_to_package, map_theme_to_group from .search import get_datasets +from .helpers import resource_files_download logger = logging.getLogger('pydatajson.federation') def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, portal_url, apikey, catalog_id=None, - demote_superThemes=True, demote_themes=True): + demote_superThemes=True, demote_themes=True, + download_strategy=None): """Escribe la metadata de un dataset en el portal pasado por parámetro. Args: @@ -33,6 +35,10 @@ def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, themes del dataset, se propagan como grupo. demote_themes(bool): Si está en true, los labels de los themes del dataset, pasan a ser tags. Sino, se pasan como grupo. + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset en el catálogo de destino. """ @@ -64,11 +70,17 @@ def push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, pushed_package = ckan_portal.call_action( 'package_create', data_dict=package) + if download_strategy: + with resource_files_download(catalog, dataset.get('distribution', []), + download_strategy) as resource_files: + resources_upload(portal_url, apikey, resource_files, + catalog_id=catalog_id) + ckan_portal.close() return pushed_package['id'] -def resources_upload(portal_url, apikey, resource_files): +def resources_upload(portal_url, apikey, resource_files, catalog_id=None): """Sube archivos locales a sus distribuciones correspondientes en el portal pasado por parámetro. @@ -78,15 +90,18 @@ def resources_upload(portal_url, apikey, resource_files): permitan crear o actualizar el dataset. resource_files(dict): Diccionario con entradas id_de_distribucion:path_al_recurso a subir + catalog_id(str): prependea el id al id del recurso para + encontrarlo antes de subirlo Returns: list: los ids de los recursos modificados """ ckan_portal = RemoteCKAN(portal_url, apikey=apikey) res = [] for resource in resource_files: + resource_id = catalog_id + '_' + resource if catalog_id else resource try: pushed = ckan_portal.action.resource_patch( - id=resource, + id=resource_id, resource_type='file.upload', upload=open(resource_files[resource], 'rb')) res.append(pushed['id']) @@ -199,7 +214,7 @@ def push_theme_to_ckan(catalog, portal_url, apikey, def restore_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, - portal_url, apikey): + portal_url, apikey, download_strategy=None): """Restaura la metadata de un dataset en el portal pasado por parámetro. Args: @@ -210,15 +225,22 @@ def restore_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, portal_url (str): La URL del portal CKAN de destino. apikey (str): La apikey de un usuario con los permisos que le permitan crear o actualizar el dataset. + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset restaurado. """ - return push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, - portal_url, apikey, None, False, False) + + return push_dataset_to_ckan(catalog, owner_org, + dataset_origin_identifier, portal_url, + apikey, None, False, False, download_strategy) def harvest_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, - portal_url, apikey, catalog_id): + portal_url, apikey, catalog_id, + download_strategy=None): """Federa la metadata de un dataset en el portal pasado por parámetro. Args: @@ -229,17 +251,22 @@ def harvest_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, portal_url (str): La URL del portal CKAN de destino. apikey (str): La apikey de un usuario con los permisos que le permitan crear o actualizar el dataset. - catalog_id(str): El id que prep + catalog_id(str): El id que prependea al dataset y recursos + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset restaurado. """ return push_dataset_to_ckan(catalog, owner_org, dataset_origin_identifier, - portal_url, apikey, catalog_id=catalog_id) + portal_url, apikey, catalog_id=catalog_id, + download_strategy=download_strategy) def restore_catalog_to_ckan(catalog, owner_org, portal_url, apikey, - dataset_list=None): + dataset_list=None, download_strategy=None): """Restaura los datasets de un catálogo al portal pasado por parámetro. Si hay temas presentes en el DataJson que no están en el portal de CKAN, los genera. @@ -253,6 +280,10 @@ def restore_catalog_to_ckan(catalog, owner_org, portal_url, apikey, se pasa una lista, todos los datasests se restauran. owner_org (str): La organización a la cual pertencen los datasets. Si no se pasa, se utiliza el catalog_id. + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset en el catálogo de destino. """ @@ -261,14 +292,16 @@ def restore_catalog_to_ckan(catalog, owner_org, portal_url, apikey, for ds in catalog.datasets] restored = [] for dataset_id in dataset_list: - restored_id = restore_dataset_to_ckan( - catalog, owner_org, dataset_id, portal_url, apikey) + restored_id = restore_dataset_to_ckan(catalog, owner_org, dataset_id, + portal_url, apikey, + download_strategy) restored.append(restored_id) return restored def harvest_catalog_to_ckan(catalog, portal_url, apikey, catalog_id, - dataset_list=None, owner_org=None): + dataset_list=None, owner_org=None, + download_strategy=None): """Federa los datasets de un catálogo al portal pasado por parámetro. Args: @@ -282,6 +315,10 @@ def harvest_catalog_to_ckan(catalog, portal_url, apikey, catalog_id, se pasa una lista, todos los datasests se federan. owner_org (str): La organización a la cual pertencen los datasets. Si no se pasa, se utiliza el catalog_id. + download_strategy(callable): Una función (catálogo, distribución)-> + bool. Sobre las distribuciones que evalúa True, descarga el + recurso en el downloadURL y lo sube al portal de destino. + Por default no sube ninguna distribución. Returns: str: El id del dataset en el catálogo de destino. """ @@ -293,8 +330,10 @@ def harvest_catalog_to_ckan(catalog, portal_url, apikey, catalog_id, errors = {} for dataset_id in dataset_list: try: - harvested_id = harvest_dataset_to_ckan( - catalog, owner_org, dataset_id, portal_url, apikey, catalog_id) + harvested_id = harvest_dataset_to_ckan(catalog, owner_org, + dataset_id, portal_url, + apikey, catalog_id, + download_strategy) harvested.append(harvested_id) except Exception as e: msg = "Error federando catalogo: %s, dataset: %s al portal: %s\n"\ @@ -417,3 +456,24 @@ def push_organization_to_ckan(portal_url, apikey, organization, parent=None): pushed_org = {'name': organization, 'success': False} return pushed_org + + +def remove_organization_from_ckan(portal_url, apikey, organization_id): + """Toma un id de organización y la purga del portal de destino. + Args: + portal_url (str): La URL del portal CKAN de destino. + apikey (str): La apikey de un usuario con los permisos que le + permitan borrar la organización. + organization_id(str): Id o name de la organización a borrar. + Returns: + None. + + """ + portal = RemoteCKAN(portal_url, apikey=apikey) + try: + portal.call_action('organization_purge', + data_dict={'id': organization_id}) + + except Exception as e: + logger.exception('Ocurrió un error borrando la organización {}: {}' + .format(organization_id, str(e))) diff --git a/pydatajson/helpers.py b/pydatajson/helpers.py index 1e0b48c..8331c83 100644 --- a/pydatajson/helpers.py +++ b/pydatajson/helpers.py @@ -11,13 +11,20 @@ from datetime import datetime import os import json import re +import logging +import tempfile +from contextlib import contextmanager from openpyxl import load_workbook from six.moves.urllib_parse import urlparse from six import string_types, iteritems from unidecode import unidecode +from pydatajson.download import download_to_file + +logger = logging.getLogger('pydatajson.helpers') + ABSOLUTE_PROJECT_DIR = os.path.dirname(os.path.abspath(__file__)) ABSOLUTE_SCHEMA_DIR = os.path.join(ABSOLUTE_PROJECT_DIR, "schemas") STOP_WORDS = [ @@ -392,3 +399,39 @@ def pprint(result): result, indent=4, separators=(",", ": "), ensure_ascii=False ))) + + +@contextmanager +def resource_files_download(catalog, distributions, download_strategy): + resource_files = {} + distributions = [dist for dist in distributions if + download_strategy(catalog, dist)] + for dist in distributions: + try: + tmpfile = tempfile.NamedTemporaryFile(delete=False) + tmpfile.close() + download_to_file(dist['downloadURL'], tmpfile.name) + resource_files[dist['identifier']] = tmpfile.name + except Exception as e: + logger.exception( + "Error descargando el recurso {} de la distribución {}: {}" + .format(dist.get('downloadURL'), + dist.get('identifier'), str(e)) + ) + continue + try: + yield resource_files + + finally: + for resource in resource_files: + os.remove(resource_files[resource]) + + +def is_local_andino_resource(catalog, distribution): + dist_type = distribution.get('type') + if dist_type is not None: + return dist_type == 'file.upload' + homepage = catalog.get('homepage') + if homepage is not None: + return distribution.get('downloadURL', '').startswith(homepage) + return False
datosgobar/pydatajson
bdc7e8f4d6e1128c657ffa5b8e66215311da9e9c
diff --git a/tests/test_federation.py b/tests/test_federation.py index 21c1c5e..14fac16 100644 --- a/tests/test_federation.py +++ b/tests/test_federation.py @@ -14,6 +14,7 @@ except ImportError: from .context import pydatajson from pydatajson.federation import * +from pydatajson.helpers import is_local_andino_resource from ckanapi.errors import NotFound SAMPLES_DIR = os.path.join("tests", "samples") @@ -317,6 +318,43 @@ class PushDatasetTestCase(FederationSuite): ) self.assertEqual([], res) + @patch('pydatajson.helpers.download_to_file') + def test_push_dataset_upload_strategy(self, mock_download, mock_portal): + def mock_call_action(action, data_dict=None): + if action == 'package_update': + return data_dict + else: + return [] + mock_portal.return_value.call_action = mock_call_action + push_dataset_to_ckan( + self.catalog, + 'owner', + self.dataset_id, + 'portal', + 'key', + download_strategy=(lambda _, x: x['identifier'] == '1.1')) + mock_portal.return_value.action.resource_patch.assert_called_with( + id='1.1', + resource_type='file.upload', + upload=ANY + ) + + def test_push_dataset_upload_empty_strategy(self, mock_portal): + def mock_call_action(action, data_dict=None): + if action == 'package_update': + return data_dict + else: + return [] + mock_portal.return_value.call_action = mock_call_action + push_dataset_to_ckan( + self.minimum_catalog, + 'owner', + self.dataset_id, + 'portal', + 'key', + download_strategy=is_local_andino_resource) + mock_portal.return_value.action.resource_patch.not_called() + class RemoveDatasetTestCase(FederationSuite): @@ -586,3 +624,17 @@ class OrganizationsTestCase(FederationSuite): self.org_tree) for node in pushed_tree: self.check_hierarchy(node) + + def test_remove_organization_sends_correct_parameters(self, mock_portal): + remove_organization_from_ckan(self.portal_url, self.apikey, 'test_id') + mock_portal.return_value.call_action.assert_called_with( + 'organization_purge', data_dict={'id': 'test_id'}) + + @patch('logging.Logger.exception') + def test_remove_organization_logs_failures(self, mock_logger, mock_portal): + mock_portal.return_value.call_action.side_effect = Exception('test') + remove_organization_from_ckan(self.portal_url, self.apikey, 'test_id') + mock_portal.return_value.call_action.assert_called_with( + 'organization_purge', data_dict={'id': 'test_id'}) + mock_logger.assert_called_with( + 'Ocurrió un error borrando la organización test_id: test')
remove_organization_from_ckan() Implementar el método `remove_organization_from_ckan()`, el cual borra una organización de acuerdo a un id.
0.0
bdc7e8f4d6e1128c657ffa5b8e66215311da9e9c
[ "tests/test_federation.py::PushDatasetTestCase::test_dataset_id_is_preserved_if_catalog_id_is_not_passed", "tests/test_federation.py::PushDatasetTestCase::test_dataset_level_wrappers", "tests/test_federation.py::PushDatasetTestCase::test_dataset_without_license_sets_notspecified", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_dataset_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_empty_list", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_errors", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_no_optional_parametres", "tests/test_federation.py::PushDatasetTestCase::test_harvest_catalog_with_owner_org", "tests/test_federation.py::PushDatasetTestCase::test_id_is_created_correctly", "tests/test_federation.py::PushDatasetTestCase::test_id_is_updated_correctly", "tests/test_federation.py::PushDatasetTestCase::test_licenses_are_interpreted_correctly", "tests/test_federation.py::PushDatasetTestCase::test_push_dataset_upload_empty_strategy", "tests/test_federation.py::PushDatasetTestCase::test_push_dataset_upload_strategy", "tests/test_federation.py::PushDatasetTestCase::test_resource_upload_error", "tests/test_federation.py::PushDatasetTestCase::test_resource_upload_succesfully", "tests/test_federation.py::PushDatasetTestCase::test_tags_are_passed_correctly", "tests/test_federation.py::RemoveDatasetTestCase::test_empty_search_doesnt_call_purge", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_filter_in_out_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_query_one_dataset", "tests/test_federation.py::RemoveDatasetTestCase::test_query_over_500_datasets", "tests/test_federation.py::RemoveDatasetTestCase::test_remove_through_filters_and_organization", "tests/test_federation.py::PushThemeTestCase::test_ckan_portal_is_called_with_correct_parametres", "tests/test_federation.py::PushThemeTestCase::test_empty_theme_search_raises_exception", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_identifier", "tests/test_federation.py::PushThemeTestCase::test_function_pushes_theme_by_label", "tests/test_federation.py::PushCatalogThemesTestCase::test_empty_portal_pushes_every_theme", "tests/test_federation.py::PushCatalogThemesTestCase::test_full_portal_pushes_nothing", "tests/test_federation.py::PushCatalogThemesTestCase::test_non_empty_intersection_pushes_missing_themes", "tests/test_federation.py::OrganizationsTestCase::test_get_organization_calls_api_correctly", "tests/test_federation.py::OrganizationsTestCase::test_get_organizations_calls_api_correctly", "tests/test_federation.py::OrganizationsTestCase::test_push_organization_assigns_parent_correctly", "tests/test_federation.py::OrganizationsTestCase::test_push_organization_sets_correct_attributes_on_failures", "tests/test_federation.py::OrganizationsTestCase::test_push_organization_sets_correct_attributes_on_success", "tests/test_federation.py::OrganizationsTestCase::test_push_organizations_cuts_trees_on_failures", "tests/test_federation.py::OrganizationsTestCase::test_push_organizations_sends_correct_hierarchy", "tests/test_federation.py::OrganizationsTestCase::test_remove_organization_logs_failures", "tests/test_federation.py::OrganizationsTestCase::test_remove_organization_sends_correct_parameters" ]
[]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-11-06 20:01:09+00:00
mit
1,848
dave-shawley__setupext-janitor-14
diff --git a/README.rst b/README.rst index 6a767de..3b7d103 100644 --- a/README.rst +++ b/README.rst @@ -38,7 +38,7 @@ imported into *setup.py* so that it can be passed as a keyword parameter import setuptools try: - from setupext import janitor + from setupext_janitor import janitor CleanCommand = janitor.CleanCommand except ImportError: CleanCommand = None @@ -49,8 +49,13 @@ imported into *setup.py* so that it can be passed as a keyword parameter setup( # normal parameters - setup_requires=['setupext.janitor'], + setup_requires=['setupext_janitor'], cmdclass=cmd_classes, + entry_points={ + # normal parameters, ie. console_scripts[] + 'distutils.commands': [ + ' clean = setupext_janitor.janitor:CleanCommand'] + } ) You can use a different approach if you are simply a developer that wants @@ -67,7 +72,7 @@ few new command line parameters. ``setup.py clean --dist`` Removes directories that the various *dist* commands produce. -``setup.py clean --egg`` +``setup.py clean --eggs`` Removes *.egg* and *.egg-info* directories. ``setup.py clean --environment`` diff --git a/docs/conf.py b/docs/conf.py index 718339e..f1efef7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,7 +3,7 @@ import sphinx_rtd_theme -from setupext import janitor +from setupext_janitor import janitor project = 'Setupext: janitor' diff --git a/setup.py b/setup.py index d564df8..a267c85 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import codecs import setuptools import sys -from setupext import janitor +from setupext_janitor import janitor with codecs.open('README.rst', 'rb', encoding='utf-8') as file_obj: @@ -26,7 +26,6 @@ setuptools.setup( description='Making setup.py clean more useful.', long_description=long_description, packages=setuptools.find_packages(exclude=['tests', 'tests.*']), - namespace_packages=['setupext'], zip_safe=True, platforms='any', install_requires=install_requirements, @@ -41,7 +40,7 @@ setuptools.setup( ], entry_points={ 'distutils.commands': [ - 'clean = setupext.janitor:CleanCommand', + 'clean = setupext_janitor.janitor:CleanCommand', ], }, cmdclass={ diff --git a/setupext/__init__.py b/setupext/__init__.py deleted file mode 100644 index de40ea7..0000000 --- a/setupext/__init__.py +++ /dev/null @@ -1,1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/setupext_janitor/__init__.py b/setupext_janitor/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/setupext_janitor/__init__.py @@ -0,0 +1,1 @@ + diff --git a/setupext/janitor.py b/setupext_janitor/janitor.py similarity index 83% rename from setupext/janitor.py rename to setupext_janitor/janitor.py index 1a014e0..13b08c1 100644 --- a/setupext/janitor.py +++ b/setupext_janitor/janitor.py @@ -1,11 +1,11 @@ from distutils import dir_util, errors from distutils.command.clean import clean as _CleanCommand import os.path +import traceback - -version_info = (1, 0, 0) +version_info = (1, 0, 1) __version__ = '.'.join(str(v) for v in version_info) - +debug = False class CleanCommand(_CleanCommand): """ @@ -71,17 +71,32 @@ class CleanCommand(_CleanCommand): for cmd_name, _ in self.distribution.get_command_list(): if 'dist' in cmd_name: command = self.distribution.get_command_obj(cmd_name) - command.ensure_finalized() + #command.ensure_finalized() + # Stop premature exit for RPM-on-NT err + # https://github.com/dave-shawley/setupext-janitor/issues/12 + try: + command.ensure_finalized() + except Exception as err: + skip = "don't know how to create RPM distributions on platform nt" + if skip in err.args: + print('-'*50,'\nException encountered and ignored:') + print('{} {}'.format(err.__class__.__name__, err.args[0])) + if debug: traceback.print_exc() + print('-'*50) + else: + raise err + if getattr(command, 'dist_dir', None): dir_names.add(command.dist_dir) - + if self.eggs: for name in os.listdir(self.egg_base): if name.endswith('.egg-info'): dir_names.add(os.path.join(self.egg_base, name)) for name in os.listdir(os.curdir): - if name.endswith('.egg'): - dir_names.add(name) + for e in ['.egg', '.eggs']: + if name.endswith(e): + dir_names.add(name) if self.environment and self.virtualenv_dir: dir_names.add(self.virtualenv_dir)
dave-shawley/setupext-janitor
801d4e51b10c8880be16c99fd6316051808141fa
diff --git a/tests.py b/tests.py index 39af958..53f0d20 100644 --- a/tests.py +++ b/tests.py @@ -12,7 +12,7 @@ if sys.version_info >= (2, 7): else: # noinspection PyPackageRequirements,PyUnresolvedReferences import unittest2 as unittest -from setupext import janitor +from setupext_janitor import janitor def run_setup(*command_line): @@ -171,6 +171,16 @@ class EggDirectoryCleanupTests(DirectoryCleanupMixin, unittest.TestCase): os.rmdir(dir_name) raise + def test_that_eggs_directories_are_removed(self): + dir_name = uuid.uuid4().hex + '.eggs' + os.mkdir(dir_name) + try: + run_setup('clean', '--eggs') + self.assert_path_does_not_exist(dir_name) + except: + os.rmdir(dir_name) + raise + def test_that_directories_are_not_removed_in_dry_run_mode(self): egg_root = self.create_directory('egg-info-root') os.mkdir(os.path.join(egg_root, 'package.egg-info'))
clean --egg misses .eggs (plural) Eggs downloaded via `setup_requires=...` are put in `.eggs` not `.egg` and `python setup.py clean --eggs` misses them. (sidebar: setup_requires isn't necessary post PEP-518 and pip >v10)
0.0
801d4e51b10c8880be16c99fd6316051808141fa
[ "tests.py::CommandOptionTests::test_that_distutils_options_are_present", "tests.py::CommandOptionTests::test_that_janitor_defines_dist_command", "tests.py::CommandOptionTests::test_that_janitor_user_options_are_not_clean_options", "tests.py::PycacheCleanupTests::test_that_janitor_does_not_fail_when_cache_parent_is_removed", "tests.py::RemoveAllTests::test_that_distdir_is_removed", "tests.py::RemoveAllTests::test_that_eggdir_is_removed", "tests.py::RemoveAllTests::test_that_envdir_is_removed", "tests.py::RemoveAllTests::test_that_pycache_is_removed" ]
[]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_added_files", "has_removed_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2019-02-07 23:36:43+00:00
bsd-3-clause
1,849
dave-shawley__setupext-janitor-8
diff --git a/README.rst b/README.rst index 6a767de..c6a8596 100644 --- a/README.rst +++ b/README.rst @@ -38,7 +38,7 @@ imported into *setup.py* so that it can be passed as a keyword parameter import setuptools try: - from setupext import janitor + from setupext_janitor import janitor CleanCommand = janitor.CleanCommand except ImportError: CleanCommand = None @@ -49,8 +49,13 @@ imported into *setup.py* so that it can be passed as a keyword parameter setup( # normal parameters - setup_requires=['setupext.janitor'], + setup_requires=['setupext_janitor'], cmdclass=cmd_classes, + entry_points={ + # normal parameters, ie. console_scripts[] + 'distutils.commands': [ + ' clean = setupext_janitor.janitor:CleanCommand'] + } ) You can use a different approach if you are simply a developer that wants diff --git a/docs/conf.py b/docs/conf.py index 718339e..f1efef7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,7 +3,7 @@ import sphinx_rtd_theme -from setupext import janitor +from setupext_janitor import janitor project = 'Setupext: janitor' diff --git a/setup.py b/setup.py index d564df8..a267c85 100755 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ import codecs import setuptools import sys -from setupext import janitor +from setupext_janitor import janitor with codecs.open('README.rst', 'rb', encoding='utf-8') as file_obj: @@ -26,7 +26,6 @@ setuptools.setup( description='Making setup.py clean more useful.', long_description=long_description, packages=setuptools.find_packages(exclude=['tests', 'tests.*']), - namespace_packages=['setupext'], zip_safe=True, platforms='any', install_requires=install_requirements, @@ -41,7 +40,7 @@ setuptools.setup( ], entry_points={ 'distutils.commands': [ - 'clean = setupext.janitor:CleanCommand', + 'clean = setupext_janitor.janitor:CleanCommand', ], }, cmdclass={ diff --git a/setupext/__init__.py b/setupext/__init__.py deleted file mode 100644 index de40ea7..0000000 --- a/setupext/__init__.py +++ /dev/null @@ -1,1 +0,0 @@ -__import__('pkg_resources').declare_namespace(__name__) diff --git a/setupext_janitor/__init__.py b/setupext_janitor/__init__.py new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/setupext_janitor/__init__.py @@ -0,0 +1,1 @@ +
dave-shawley/setupext-janitor
801d4e51b10c8880be16c99fd6316051808141fa
diff --git a/setupext/janitor.py b/setupext_janitor/janitor.py similarity index 100% rename from setupext/janitor.py rename to setupext_janitor/janitor.py diff --git a/tests.py b/tests.py index 39af958..a1d6b72 100644 --- a/tests.py +++ b/tests.py @@ -12,7 +12,7 @@ if sys.version_info >= (2, 7): else: # noinspection PyPackageRequirements,PyUnresolvedReferences import unittest2 as unittest -from setupext import janitor +from setupext_janitor import janitor def run_setup(*command_line):
Breaks matplotlib's setup.py It appears that matplotlib has a setupext.py file, for whatever reason, and that breaks if setupext-janitor is installed. Is the setupext nspackage thing really necessary?
0.0
801d4e51b10c8880be16c99fd6316051808141fa
[ "tests.py::DistDirectoryCleanupTests::test_that_multiple_dist_directories_with_be_removed", "tests.py::DistDirectoryCleanupTests::test_that_dist_directory_is_removed_for_bdist_dumb", "tests.py::DistDirectoryCleanupTests::test_that_directories_are_not_removed_without_parameter", "tests.py::DistDirectoryCleanupTests::test_that_dist_directory_is_removed_for_sdist", "tests.py::DistDirectoryCleanupTests::test_that_directories_are_not_removed_in_dry_run_mode" ]
[ "tests.py::CommandOptionTests::test_that_distutils_options_are_present", "tests.py::CommandOptionTests::test_that_janitor_user_options_are_not_clean_options", "tests.py::CommandOptionTests::test_that_janitor_defines_dist_command", "tests.py::RemoveAllTests::test_that_envdir_is_removed", "tests.py::RemoveAllTests::test_that_distdir_is_removed", "tests.py::RemoveAllTests::test_that_eggdir_is_removed", "tests.py::RemoveAllTests::test_that_pycache_is_removed", "tests.py::EggDirectoryCleanupTests::test_that_directories_are_not_removed_in_dry_run_mode", "tests.py::EggDirectoryCleanupTests::test_that_egg_directories_are_removed", "tests.py::EggDirectoryCleanupTests::test_that_egg_info_directories_are_removed", "tests.py::PycacheCleanupTests::test_that_janitor_does_not_fail_when_cache_parent_is_removed" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_added_files", "has_removed_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2015-11-16 22:59:02+00:00
bsd-3-clause
1,850
davidchall__topas2numpy-13
diff --git a/topas2numpy/binned.py b/topas2numpy/binned.py index dac1dfe..2b65a6d 100644 --- a/topas2numpy/binned.py +++ b/topas2numpy/binned.py @@ -47,15 +47,15 @@ class BinnedResult(object): dimensions: list of BinnedDimension objects data: dict of scored data """ - def __init__(self, filepath): + def __init__(self, filepath, dtype=float): self.path = filepath _, ext = os.path.splitext(self.path) if ext == '.bin': - self._read_binary() + self._read_binary(dtype) elif ext == '.csv': - self._read_ascii() + self._read_ascii(dtype) - def _read_binary(self): + def _read_binary(self, dtype): """Reads data and metadata from binary format.""" # NOTE: binary files store binned data using Fortran-like ordering. # Dimensions are iterated like z, y, x (so x changes fastest) @@ -64,7 +64,7 @@ class BinnedResult(object): with open(header_path) as f_header: self._read_header(f_header.read()) - data = np.fromfile(self.path) + data = np.fromfile(self.path, dtype=dtype) # separate data by statistic data = data.reshape((len(self.statistics), -1), order='F') @@ -76,7 +76,7 @@ class BinnedResult(object): self.data = data - def _read_ascii(self): + def _read_ascii(self, dtype): """Reads data and metadata from ASCII format.""" # NOTE: ascii files store binned data using C-like ordering. # Dimensions are iterated like x, y, z (so z changes fastest) @@ -88,7 +88,7 @@ class BinnedResult(object): header_str += line self._read_header(header_str) - data = np.loadtxt(self.path, delimiter=',', unpack=True, ndmin=1) + data = np.loadtxt(self.path, dtype=dtype, delimiter=',', unpack=True, ndmin=1) # separate data by statistic (neglecting bin columns when necessary) n_dim = len(self.dimensions)
davidchall/topas2numpy
f20177d6930798e317033ab0e66117bb65ee08d6
diff --git a/tests/test_binned.py b/tests/test_binned.py index 19e68b3..04e7a37 100644 --- a/tests/test_binned.py +++ b/tests/test_binned.py @@ -12,6 +12,9 @@ Tests for TOPAS binned reading. import unittest import os.path +# third-party imports +import numpy as np + # project imports from topas2numpy import BinnedResult @@ -55,6 +58,7 @@ class TestAscii1D(unittest.TestCase): assert self.result.statistics[0] == 'Sum' assert len(self.result.data) == 1 data = self.result.data['Sum'] + assert data.dtype == np.float64 assert data.shape[0] == self.result.dimensions[0].n_bins assert data.shape[1] == self.result.dimensions[1].n_bins assert data.shape[2] == self.result.dimensions[2].n_bins @@ -62,7 +66,7 @@ class TestAscii1D(unittest.TestCase): class TestAscii2D(unittest.TestCase): def setUp(self): - self.result = BinnedResult(ascii_2d_path) + self.result = BinnedResult(ascii_2d_path, dtype=np.uint32) def test_quantity(self): assert self.result.quantity == 'SurfaceTrackCount' @@ -88,6 +92,7 @@ class TestAscii2D(unittest.TestCase): assert self.result.statistics[0] == 'Sum' assert len(self.result.data) == 1 data = self.result.data['Sum'] + assert data.dtype == np.uint32 assert data.shape[0] == self.result.dimensions[0].n_bins assert data.shape[1] == self.result.dimensions[1].n_bins assert data.shape[2] == self.result.dimensions[2].n_bins
Detect best NumPy dtype (use unsigned int for SurfaceTrackCount) When the TOPAS scorer mode is set to 'SurfaceTrackCount' then the result is an integer. It would be best if the numpy dtype of the loaded data was set to an unsigned integer type in this case. It seems this library loads such arrrays as 'float64' type which uses only 53 of the 64 bits to store the mantissa, meaning 11/64 bits are wasted in the case of 'SurfaceTrackCount', which unecessarily increases filesize. It's also unexpected to receive a NumPy array of type 'float64' when the data consists of unsigned integers so this may have a usability impact also. Is it possible to change this library so that it bases the data type whether the scorer is 'SurfaceTrackCount' or something else?
0.0
f20177d6930798e317033ab0e66117bb65ee08d6
[ "tests/test_binned.py::TestAscii2D::test_data", "tests/test_binned.py::TestAscii2D::test_dimensions", "tests/test_binned.py::TestAscii2D::test_quantity" ]
[ "tests/test_binned.py::TestAscii1D::test_data", "tests/test_binned.py::TestAscii1D::test_dimensions", "tests/test_binned.py::TestAscii1D::test_quantity", "tests/test_binned.py::TestBinary1D::test_data", "tests/test_binned.py::TestBinary1D::test_dimensions", "tests/test_binned.py::TestBinary1D::test_quantity" ]
{ "failed_lite_validators": [ "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2022-06-22 05:16:22+00:00
mit
1,851
daviddrysdale__python-phonenumbers-182
diff --git a/python/phonenumbers/phonenumberutil.py b/python/phonenumbers/phonenumberutil.py index 8ff04afd..0948934d 100644 --- a/python/phonenumbers/phonenumberutil.py +++ b/python/phonenumbers/phonenumberutil.py @@ -3223,6 +3223,9 @@ class NumberParseException(UnicodeMixin, Exception): self.error_type = error_type self._msg = msg + def __reduce__(self): + return (type(self), (self.error_type, self._msg)) + def __unicode__(self): return unicod("(%s) %s") % (self.error_type, self._msg)
daviddrysdale/python-phonenumbers
5bcfeb70b6ae8d4ebe525999910f3180f6870807
diff --git a/python/tests/phonenumberutiltest.py b/python/tests/phonenumberutiltest.py index 592fec80..c9d2cedf 100755 --- a/python/tests/phonenumberutiltest.py +++ b/python/tests/phonenumberutiltest.py @@ -17,6 +17,7 @@ # See the License for the specific language governing permissions and # limitations under the License. import sys +import pickle import phonenumbers from phonenumbers import PhoneNumber, PhoneMetadata @@ -26,6 +27,7 @@ from phonenumbers import ValidationResult, NumberFormat, CountryCodeSource from phonenumbers import region_code_for_country_code # Access internal functions of phonenumberutil.py from phonenumbers import phonenumberutil, shortnumberinfo +from phonenumbers.phonenumberutil import NumberParseException from phonenumbers.util import u, to_long from .testmetadatatest import TestMetadataTestCase @@ -3165,6 +3167,12 @@ class PhoneNumberUtilTest(TestMetadataTestCase): 'register': True}) self.assertTrue(phonenumbers.example_number_for_type('XY', PhoneNumberType.PERSONAL_NUMBER) is None) + def testPickledException(self): + err = NumberParseException(NumberParseException.TOO_SHORT_AFTER_IDD, 'hello world') + pickled = pickle.dumps(err) + recovered = pickle.loads(pickled) + self.assertEqual("%r" % err, "%r" % recovered) + def testCoverage(self): # Python version extra tests self.assertTrue(phonenumberutil._region_code_for_number_from_list(GB_NUMBER, ("XX",)) is None)
NumberParseException is not picklable Hi, I noticed that `NumberParseException` is not picklable. It deviates from the `__init__` signature of `Exception`, which itself implements `__reduce__` s.t. only the `msg` argument is pickled. This program: ```python import pickle from phonenumbers.phonenumberutil import NumberParseException error = NumberParseException(NumberParseException.TOO_SHORT_AFTER_IDD, 'hello world') s = pickle.dumps(error) again = pickle.loads(s) ``` produces the output: ``` Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: __init__() missing 1 required positional argument: 'msg' ``` Adding a `__reduce__` method to `NumberParseException` seems to fix it: ```python def __reduce__(self): return (type(self), (self.error_type, self._msg)) ```
0.0
5bcfeb70b6ae8d4ebe525999910f3180f6870807
[ "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testPickledException" ]
[ "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testCanBeInternationallyDialled", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testConvertAlphaCharactersInNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testCountryWithNoNumberDesc", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testCoverage", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testExtractPossibleNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFailedParseOnInvalidNumbers", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatARNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatAUNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatBSNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatByPattern", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatDENumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatE164Number", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatGBNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatITNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatInOriginalFormat", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatMXNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatNumberForMobileDialing", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatNumberWithExtension", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatOutOfCountryCallingNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatOutOfCountryKeepingAlphaChars", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatOutOfCountryWithInvalidRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatOutOfCountryWithPreferredIntlPrefix", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatUSNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatWithCarrierCode", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFormatWithPreferredCarrierCode", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testFrozenPhoneNumberImmutable", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetCountryCodeForRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetCountryMobileToken", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetExampleNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetExampleNumberForNonGeoEntity", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetExampleNumberWithoutRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetInstanceLoadARMetadata", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetInstanceLoadDEMetadata", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetInstanceLoadInternationalTollFreeMetadata", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetInstanceLoadUSMetadata", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetInvalidExampleNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetLengthOfGeographicalAreaCode", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetLengthOfNationalDestinationCode", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetNationalDiallingPrefixForRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetNationalSignificantNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetNationalSignificantNumber_ManyLeadingZeros", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetRegionCodeForCountryCode", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetRegionCodeForNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetRegionCodesForCountryCode", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetSupportedCallingCodes", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetSupportedGlobalNetworkCallingCodes", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetSupportedTypesForNonGeoEntity", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testGetSupportedTypesForRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsAlphaNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsFixedLine", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsFixedLineAndMobile", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsMobile", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsMobileNumberPortableRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNANPACountry", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNotPossibleNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNotValidNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberGeographical", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberMatchAcceptsProtoDefaultsAsMatch", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberMatchIgnoresSomeFields", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberMatchMatches", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberMatchMatchesDiffLeadingZerosIfItalianLeadingZeroFalse", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberMatchNonMatches", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberMatchNsnMatches", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberMatchShortMatchIfDiffNumLeadingZeros", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsNumberMatchShortNsnMatches", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPersonalNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForTypeWithReason_DataMissingForSizeReasons", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForTypeWithReason_DifferentTypeLengths", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForTypeWithReason_FixedLineOrMobile", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForTypeWithReason_LocalOnly", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForTypeWithReason_NumberTypeNotSupportedForRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForType_DataMissingForSizeReasons", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForType_DifferentTypeLengths", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForType_LocalOnly", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberForType_NumberTypeNotSupportedForRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPossibleNumberWithReason", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsPremiumRate", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsSharedCost", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsTollFree", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsUnknown", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsValidForRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsValidNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsViablePhoneNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsViablePhoneNumberNonAscii", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testIsVoip", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testMaybeExtractCountryCode", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testMaybeStripInternationalPrefix", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testMaybeStripNationalPrefix", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testMetadataAsString", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testMetadataEquality", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testMetadataEval", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testMetadataImmutable", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testNormaliseOtherDigits", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testNormaliseRemovePunctuation", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testNormaliseReplaceAlphaCharacters", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testNormaliseStripAlphaCharacters", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testNormaliseStripNonDiallableCharacters", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseAndKeepRaw", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseExtensions", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseHandlesLongExtensionsWithAutoDiallingLabels", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseHandlesLongExtensionsWithExplicitLabels", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseHandlesShortExtensionsWhenNotSureOfLabel", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseHandlesShortExtensionsWithAmbiguousChar", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseItalianLeadingZeros", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseMaliciousInput", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseNationalNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseNationalNumberArgentina", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseNonAscii", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseNumberTooShortIfNationalPrefixStripped", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseNumberWithAlphaCharacters", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseNumbersMexico", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseNumbersWithPlusWithNoRegion", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseWithInternationalPrefixes", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseWithLeadingZero", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testParseWithXInNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testSupportedRegions", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testTruncateTooLongNumber", "python/tests/phonenumberutiltest.py::PhoneNumberUtilTest::testUnknownCountryCallingCode" ]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2020-12-15 19:03:52+00:00
apache-2.0
1,852
davidesarra__jupyter_spaces-15
diff --git a/README.md b/README.md index 398cbb9..222a688 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Reloading the extension will remove all spaces. ```python %%space <space-name> alpha = 0.50 -print(alpha) +alpha ``` When you execute a cell within a space, all references are firstly searched in @@ -51,33 +51,6 @@ execution equivalent to not using such keyword. Mutable objects in the user namespace can be altered (e.g. appending an item to a list). -#### Console output - -Conversely to the standard usage of the Python console, you need to print -objects explicitly (e.g. by using `print`). - -- No output to console - ```python - %%space <space-name> - 100 - ``` -- Output to console - ```python - %%space <space-name> - print(100) - ``` - -If you want IPython to use more advanced representations, you can do so via -IPython's display library (e.g. display a Pandas dataframe as a HTML table). - -```python -%%space <space-name> -from IPython.display import display -from pandas import DataFrame -dataframe = DataFrame(data=[[1, 2]]) -display(dataframe) -``` - ### Remove a space ```python diff --git a/jupyter_spaces/space.py b/jupyter_spaces/space.py index 476a7a0..7c3b89e 100644 --- a/jupyter_spaces/space.py +++ b/jupyter_spaces/space.py @@ -1,3 +1,6 @@ +import ast +import sys + from jupyter_spaces.errors import RegistryError @@ -101,7 +104,16 @@ class Space: Args: source (str): Source code. """ - exec(source, self._execution_namespace) + tree = ast.parse(source=source) + + interactive_tree = ast.Interactive(body=tree.body) + if sys.version_info > (3, 8): + interactive_tree.type_ignores = tree.type_ignores + + compiled_interactive_tree = compile( + source=interactive_tree, filename="<string>", mode="single" + ) + exec(compiled_interactive_tree, self._execution_namespace) class ExecutionNamespace(dict):
davidesarra/jupyter_spaces
035e984dab3d6b29e46db982619a376c3c293b6a
diff --git a/tests/test_magics.py b/tests/test_magics.py index e24cc1b..22da064 100644 --- a/tests/test_magics.py +++ b/tests/test_magics.py @@ -152,6 +152,11 @@ def test_get_spaces_reflects_extension_reload(ip): assert not ip.user_global_ns["spaces"] +def test_space_outputs_to_console(ip, capsys): + ip.run_cell_magic(magic_name="space", line="tomato", cell="100") + assert capsys.readouterr().out == "100\n" + + def test_space_can_print_to_console(ip): with capture_output() as captured: ip.run_cell_magic(magic_name="space", line="tomato", cell="print(100)")
Automatic console output It would be great if space cells would automatically print their return result similar to a normal cell. Having to use the print statement for output is cumbersome.
0.0
035e984dab3d6b29e46db982619a376c3c293b6a
[ "tests/test_magics.py::test_space_outputs_to_console" ]
[ "tests/test_magics.py::test_space_can_access_user_namespace_references", "tests/test_magics.py::test_space_references_prioritized_over_user_namespace_references", "tests/test_magics.py::test_space_cannot_alter_user_namespace_immutable_references", "tests/test_magics.py::test_space_can_alter_user_namespace_mutable_references", "tests/test_magics.py::test_space_cannot_alter_user_namespace_references_using_global", "tests/test_magics.py::test_space_cannot_remove_user_namespace_references", "tests/test_magics.py::test_space_cannot_remove_user_namespace_references_using_global", "tests/test_magics.py::test_space_cannot_add_user_namespace_references", "tests/test_magics.py::test_space_cannot_add_user_namespace_references_using_global", "tests/test_magics.py::test_space_reference_assignments_persist_in_new_magic_call", "tests/test_magics.py::test_space_reference_deletions_persist_in_new_magic_call", "tests/test_magics.py::test_space_references_assignments_are_confined_in_one_space_only", "tests/test_magics.py::test_space_references_deletions_are_confined_in_one_space_only", "tests/test_magics.py::test_space_can_execute_newly_defined_lambda_functions", "tests/test_magics.py::test_space_can_execute_newly_defined_functions", "tests/test_magics.py::test_space_can_execute_top_level_non_closure_functions", "tests/test_magics.py::test_get_spaces_can_access_space_references", "tests/test_magics.py::test_get_spaces_can_alter_space_references", "tests/test_magics.py::test_get_spaces_can_remove_space_references", "tests/test_magics.py::test_get_spaces_reflects_space_references_changes", "tests/test_magics.py::test_get_spaces_reflects_space_removal", "tests/test_magics.py::test_get_spaces_reflects_extension_reload", "tests/test_magics.py::test_space_can_print_to_console" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2020-11-22 00:38:28+00:00
mit
1,853
dbcli__athenacli-42
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..4f20546 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,7 @@ +## Description +<!--- Describe your changes in detail. --> + +## Checklist +<!--- We appreciate your help and want to give you credit. Please take a moment to put an `x` in the boxes below as you complete them. --> +- [ ] I've added this contribution to the `changelog.md`. +- [ ] I've added my name to the `AUTHORS` file (or it's already there). diff --git a/AUTHORS.rst b/AUTHORS.rst index 93b5168..58ee8a4 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -14,6 +14,7 @@ Contributors: * Joe Block * Jash Gala * Hourann + * Paul Gross Creator: -------- diff --git a/athenacli/packages/completion_engine.py b/athenacli/packages/completion_engine.py index d4e7281..86b9abb 100644 --- a/athenacli/packages/completion_engine.py +++ b/athenacli/packages/completion_engine.py @@ -290,7 +290,7 @@ def suggest_based_on_last_token(token, text_before_cursor, full_text, identifier if parent: # "ON parent.<suggestion>" # parent can be either a schema name or table alias - tables = tuple(t for t in tables if identifies(parent, t)) + tables = tuple(t for t in tables if identifies(parent, *t)) return ( Column(tables=tables), Table(schema=parent), diff --git a/changelog.md b/changelog.md index b0eb065..fe2b505 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,10 @@ (Unreleased; add upcoming change notes here) ============================================== +Bugfix +---------- +* Fix bug when completing `ON parent.` clauses. (Thanks @pgr0ss) + 1.1.2 ======== diff --git a/docs/develop.rst b/docs/develop.rst index 6c5d66d..084a312 100644 --- a/docs/develop.rst +++ b/docs/develop.rst @@ -20,12 +20,22 @@ The installation instructions in the README file are intended for users of athen It is highly recommended to use virtualenv for development. If you don't know what a virtualenv is, `this guide <https://docs.python-guide.org/dev/virtualenvs/#virtual-environments>`_ will help you get started. -Create a virtualenv (let's call it athenacli-dev). Activate it: +Create a virtualenv (let's call it athenacli-dev): + +.. code-block:: bash + + $ virtualenv athenacli-dev + +Activate it: + +.. code-block:: bash $ source ./athenacli-dev/bin/activate + Once the virtualenv is activated, cd into the local clone of athenacli folder and install athenacli using pip as follows: .. code-block:: bash + $ pip install -e . This will install the necessary dependencies as well as install athenacli from the working folder into a virtualenv. Athenacli is installed in an editable way, so any changes made to the code is immediately available in the installed version of athenacli. This makes it easy to change something in the code, launch athenacli and check the effects of your change. @@ -38,6 +48,7 @@ Currently we don't have enough tests for athenacli, because we haven't found an First, install the requirements for testing: .. code-block:: bash + $ pip install -r requirements-dev.txt After that, tests can be run with:
dbcli/athenacli
f413a24662cca6923b13563dedb7565e1e2b31a9
diff --git a/test/test_completion_engine.py b/test/test_completion_engine.py index 587fa6b..3a3c24a 100644 --- a/test/test_completion_engine.py +++ b/test/test_completion_engine.py @@ -2,7 +2,7 @@ import os import pytest from athenacli.packages.completion_engine import ( - suggest_type, Column, Function, Alias, Keyword + suggest_type, Column, Function, Alias, Keyword, Table, View ) @@ -28,6 +28,15 @@ def test_select_suggests_cols_with_qualified_table_scope(): Alias(aliases=['tabl']), Keyword(last_token='SELECT')) +def test_join_suggests_cols_with_qualified_table_scope(): + expression = 'SELECT * FROM tabl a JOIN tabl b on a.' + suggestions = suggest_type(expression, expression) + + assert suggestions == ( + Column(tables=((None, 'tabl', 'a'),), drop_unique=None), + Table(schema='a'), + View(schema='a'), + Function(schema='a', filter=None)) @pytest.mark.parametrize('expression', [ 'SELECT * FROM tabl WHERE ',
Error when typing a query I started writing this query: ``` SELECT d.* FROM doodads d JOIN trinkets t on d. ``` ## `JOIN` doesn't appear `JOIN` did not auto-complete as an option (I only saw `JSON`) ## Unhandled Exception When I type the `.` at the end (I'm trying to join on `d.trinket_id = doodad.id`) I get the following output: ``` Unhandled exception in event loop: File "/home/admin/.local/lib/python3.7/site-packages/prompt_toolkit/eventloop/coroutine.py", line 92, in step_next new_f = coroutine.throw(exc) File "/home/admin/.local/lib/python3.7/site-packages/prompt_toolkit/buffer.py", line 1654, in new_coroutine yield From(coroutine(*a, **kw)) File "/home/admin/.local/lib/python3.7/site-packages/prompt_toolkit/eventloop/coroutine.py", line 92, in step_next new_f = coroutine.throw(exc) File "/home/admin/.local/lib/python3.7/site-packages/prompt_toolkit/buffer.py", line 1506, in async_completer cancel=lambda: not proceed())) File "/home/admin/.local/lib/python3.7/site-packages/prompt_toolkit/eventloop/coroutine.py", line 88, in step_next new_f = coroutine.send(None) File "/home/admin/.local/lib/python3.7/site-packages/prompt_toolkit/eventloop/async_generator.py", line 117, in consume_async_generator item = iterator.send(send) File "/home/admin/.local/lib/python3.7/site-packages/prompt_toolkit/completion/base.py", line 176, in get_completions_async for item in self.get_completions(document, complete_event): File "/home/admin/.local/lib/python3.7/site-packages/athenacli/completer.py", line 210, in get_completions suggestions = suggest_type(document.text, document.text_before_cursor) File "/home/admin/.local/lib/python3.7/site-packages/athenacli/packages/completion_engine.py", line 121, in suggest_type full_text, identifier) File "/home/admin/.local/lib/python3.7/site-packages/athenacli/packages/completion_engine.py", line 293, in suggest_based_on_last_token tables = tuple(t for t in tables if identifies(parent, t)) File "/home/admin/.local/lib/python3.7/site-packages/athenacli/packages/completion_engine.py", line 293, in <genexpr> tables = tuple(t for t in tables if identifies(parent, t)) Exception identifies() missing 2 required positional arguments: 'table' and 'alias' ``` I also tried this without the table aliases, e.g.: ``` SELECT doodads.* FROM doodads JOIN trinkets on doodads. ``` and got the same "unhandled exception" error when typing the `.` at the end.
0.0
f413a24662cca6923b13563dedb7565e1e2b31a9
[ "test/test_completion_engine.py::test_join_suggests_cols_with_qualified_table_scope" ]
[ "test/test_completion_engine.py::test_select_suggests_cols_with_visible_table_scope", "test/test_completion_engine.py::test_select_suggests_cols_with_qualified_table_scope", "test/test_completion_engine.py::test_where_suggests_columns_functions[SELECT" ]
{ "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2020-02-14 21:42:59+00:00
bsd-3-clause
1,854
dbcli__athenacli-50
diff --git a/athenacli/packages/format_utils.py b/athenacli/packages/format_utils.py new file mode 100644 index 0000000..8450913 --- /dev/null +++ b/athenacli/packages/format_utils.py @@ -0,0 +1,34 @@ +# -*- coding: utf-8 -*- + + +def format_status(rows_length=None, cursor=None): + return rows_status(rows_length) + statistics(cursor) + +def rows_status(rows_length): + if rows_length: + return '%d row%s in set' % (rows_length, '' if rows_length == 1 else 's') + else: + return 'Query OK' + +def statistics(cursor): + if cursor: + # Most regions are $5 per TB: https://aws.amazon.com/athena/pricing/ + approx_cost = cursor.data_scanned_in_bytes / (1024 ** 4) * 5 + + return '\nExecution time: %d ms, Data scanned: %s, Approximate cost: $%.2f' % ( + cursor.execution_time_in_millis, + humanize_size(cursor.data_scanned_in_bytes), + approx_cost) + else: + return '' + +def humanize_size(num_bytes): + suffixes = ['B', 'KB', 'MB', 'GB', 'TB'] + + suffix_index = 0 + while num_bytes >= 1024 and suffix_index < len(suffixes) - 1: + num_bytes /= 1024.0 + suffix_index += 1 + + num = ('%.2f' % num_bytes).rstrip('0').rstrip('.') + return '%s %s' % (num, suffixes[suffix_index]) diff --git a/athenacli/sqlexecute.py b/athenacli/sqlexecute.py index 3a0d8c5..d560ecd 100644 --- a/athenacli/sqlexecute.py +++ b/athenacli/sqlexecute.py @@ -5,6 +5,7 @@ import sqlparse import pyathena from athenacli.packages import special +from athenacli.packages.format_utils import format_status logger = logging.getLogger(__name__) @@ -92,11 +93,11 @@ class SQLExecute(object): if cursor.description is not None: headers = [x[0] for x in cursor.description] rows = cursor.fetchall() - status = '%d row%s in set' % (len(rows), '' if len(rows) == 1 else 's') + status = format_status(rows_length=len(rows), cursor=cursor) else: logger.debug('No rows in result.') rows = None - status = 'Query OK' + status = format_status(rows_length=None, cursor=cursor) return (title, rows, headers, status) def tables(self): diff --git a/changelog.md b/changelog.md index 22d8273..cafd121 100644 --- a/changelog.md +++ b/changelog.md @@ -1,6 +1,13 @@ (Unreleased; add upcoming change notes here) ============================================== +1.3.0 +======== + +Features +---------- +* Show query execution statistics, such as the amount of data scanned and the approximate cost. (Thanks: @pgr0ss) + 1.2.0 ========
dbcli/athenacli
c0e6869d7c023c3c2a2bda7f40f09286f5d0c0c0
diff --git a/test/test_format_utils.py b/test/test_format_utils.py new file mode 100644 index 0000000..abe8d75 --- /dev/null +++ b/test/test_format_utils.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- + + +from collections import namedtuple +from athenacli.packages.format_utils import format_status, humanize_size + + +def test_format_status_plural(): + assert format_status(rows_length=1) == "1 row in set" + assert format_status(rows_length=2) == "2 rows in set" + +def test_format_status_no_results(): + assert format_status(rows_length=None) == "Query OK" + +def test_format_status_with_stats(): + FakeCursor = namedtuple("FakeCursor", ["execution_time_in_millis", "data_scanned_in_bytes"]) + + assert format_status(rows_length=1, cursor=FakeCursor(10, 12345678900)) == "1 row in set\nExecution time: 10 ms, Data scanned: 11.5 GB, Approximate cost: $0.06" + assert format_status(rows_length=2, cursor=FakeCursor(1000, 1234)) == "2 rows in set\nExecution time: 1000 ms, Data scanned: 1.21 KB, Approximate cost: $0.00" + +def test_humanize_size(): + assert humanize_size(20) == "20 B" + assert humanize_size(2000) == "1.95 KB" + assert humanize_size(200000) == "195.31 KB" + assert humanize_size(20000000) == "19.07 MB" + assert humanize_size(200000000000) == "186.26 GB"
Feature request: output cost and size of query Something like: submission_date = stats['QueryExecution']['Status']['SubmissionDateTime'] completion_date = stats['QueryExecution']['Status']['CompletionDateTime'] execution_time = stats['QueryExecution']['Statistics']['EngineExecutionTimeInMillis'] data_scanned = stats['QueryExecution']['Statistics']['DataScannedInBytes'] query_cost = data_scanned / 1000000000000.0 * 5.0 print('Time: {}, CPU Time: {}ms total, Data Scanned: {}, Cost: ${:,.2f}\n'.format( str(completion_date - submission_date).split('.')[0], execution_time, human_readable(data_scanned), query_cost )) from https://github.com/guardian/athena-cli/blob/0d5cc98a1cac21094077ed29cf168686ca61f10d/athena_cli.py#L217-L228 (Currently we only print `Time`.)
0.0
c0e6869d7c023c3c2a2bda7f40f09286f5d0c0c0
[ "test/test_format_utils.py::test_format_status_plural", "test/test_format_utils.py::test_format_status_no_results", "test/test_format_utils.py::test_format_status_with_stats", "test/test_format_utils.py::test_humanize_size" ]
[]
{ "failed_lite_validators": [ "has_hyperlinks", "has_added_files", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2020-04-18 00:03:20+00:00
bsd-3-clause
1,855
dbcli__litecli-113
diff --git a/CHANGELOG.md b/CHANGELOG.md index b8c8122..0ccb53a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,5 @@ ## Unreleased - TBD -<!-- add upcoming change notes here --> - ### Features - Add verbose feature to `favorite_query` command. (Thanks: [Zhaolong Zhu]) @@ -12,6 +10,7 @@ ### Bug Fixes - Fix compatibility with sqlparse >= 0.4.0. (Thanks: [chocolateboy]) +- Fix invalid utf-8 exception. (Thanks: [Amjith]) ## 1.4.1 - 2020-07-27 diff --git a/litecli/sqlexecute.py b/litecli/sqlexecute.py index 7ef103c..93acd91 100644 --- a/litecli/sqlexecute.py +++ b/litecli/sqlexecute.py @@ -17,6 +17,13 @@ _logger = logging.getLogger(__name__) # }) +def utf8_resilient_decoder(s): + try: + return s.decode("utf-8") + except UnicodeDecodeError: + return s.decode("latin-1") + + class SQLExecute(object): databases_query = """ @@ -61,6 +68,7 @@ class SQLExecute(object): raise Exception("Path does not exist: {}".format(db_dir_name)) conn = sqlite3.connect(database=db_name, isolation_level=None) + conn.text_factory = utf8_resilient_decoder if self.conn: self.conn.close()
dbcli/litecli
a1a01c11d6154b6f841b81fbdeb6b8b887b697d3
diff --git a/tests/test_sqlexecute.py b/tests/test_sqlexecute.py index 03e7f19..0ddfb8f 100644 --- a/tests/test_sqlexecute.py +++ b/tests/test_sqlexecute.py @@ -101,6 +101,17 @@ def test_unicode_support_in_output(executor): assert_result_equal(results, headers=["t"], rows=[(u"é",)]) +@dbtest +def test_invalid_unicode_values_dont_choke(executor): + run(executor, "create table unicodechars(t text)") + # \xc3 is not a valid utf-8 char. But we can insert it into the database + # which can break querying if not handled correctly. + run(executor, u"insert into unicodechars (t) values (cast(x'c3' as text))") + + results = run(executor, u"select * from unicodechars") + assert_result_equal(results, headers=["t"], rows=[(u"Ã",)]) + + @dbtest def test_multiple_queries_same_line(executor): results = run(executor, "select 'foo'; select 'bar'") @@ -199,11 +210,7 @@ def test_verbose_feature_of_favorite_query(executor): results = run(executor, "\\f sh_param 1") assert_result_equal( - results, - title=None, - headers=["a", "id"], - rows=[("abc", 1)], - auto_status=False, + results, title=None, headers=["a", "id"], rows=[("abc", 1)], auto_status=False, ) results = run(executor, "\\f+ sh_param 1")
TabularOutputFormatter chokes on values that can't be converted to UTF-8 if it's a text column I don't know how to solve this. If there is a single record with a non-convertible column it won't print anything. `Could not decode to UTF-8 column 'verifier' with text '`'���U'` sqlite3 prints ``` 2bho15FMrSQhKAYnjBqRQ1x4LS3zcHANsRjKMJyiSwT9|GnyZktv2SaCehfNCGjoYdAgAirxpCjvBCUXH6MiEHEH7 `'ŜU|`'ŜU ``` Seeing this was actually helpful because it notified me that I had garbage data, but I still would've thought the other rows would print.
0.0
a1a01c11d6154b6f841b81fbdeb6b8b887b697d3
[ "tests/test_sqlexecute.py::test_invalid_unicode_values_dont_choke" ]
[ "tests/test_sqlexecute.py::test_conn", "tests/test_sqlexecute.py::test_bools", "tests/test_sqlexecute.py::test_binary", "tests/test_sqlexecute.py::test_database_list", "tests/test_sqlexecute.py::test_invalid_syntax", "tests/test_sqlexecute.py::test_invalid_column_name", "tests/test_sqlexecute.py::test_unicode_support_in_output", "tests/test_sqlexecute.py::test_multiple_queries_same_line", "tests/test_sqlexecute.py::test_multiple_queries_same_line_syntaxerror", "tests/test_sqlexecute.py::test_favorite_query", "tests/test_sqlexecute.py::test_bind_parameterized_favorite_query", "tests/test_sqlexecute.py::test_verbose_feature_of_favorite_query", "tests/test_sqlexecute.py::test_shell_parameterized_favorite_query", "tests/test_sqlexecute.py::test_favorite_query_multiple_statement", "tests/test_sqlexecute.py::test_favorite_query_expanded_output", "tests/test_sqlexecute.py::test_special_command", "tests/test_sqlexecute.py::test_cd_command_without_a_folder_name", "tests/test_sqlexecute.py::test_system_command_not_found", "tests/test_sqlexecute.py::test_system_command_output", "tests/test_sqlexecute.py::test_cd_command_current_dir", "tests/test_sqlexecute.py::test_unicode_support", "tests/test_sqlexecute.py::test_timestamp_null", "tests/test_sqlexecute.py::test_datetime_null", "tests/test_sqlexecute.py::test_date_null", "tests/test_sqlexecute.py::test_time_null" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2021-03-14 20:14:14+00:00
bsd-3-clause
1,856
dbcli__mssql-cli-396
diff --git a/build.py b/build.py index d8c7ce3..8a82eca 100644 --- a/build.py +++ b/build.py @@ -173,6 +173,7 @@ def get_active_test_filepaths(): 'tests/test_config.py ' 'tests/test_naive_completion.py ' 'tests/test_main.py ' + 'tests/test_multiline.py ' 'tests/test_fuzzy_completion.py ' 'tests/test_rowlimit.py ' 'tests/test_sqlcompletion.py ' diff --git a/mssqlcli/mssqlbuffer.py b/mssqlcli/mssqlbuffer.py index 581010c..d0fdced 100644 --- a/mssqlcli/mssqlbuffer.py +++ b/mssqlcli/mssqlbuffer.py @@ -1,5 +1,6 @@ from __future__ import unicode_literals - +import re +import sqlparse from prompt_toolkit.enums import DEFAULT_BUFFER from prompt_toolkit.filters import Condition from prompt_toolkit.application import get_app @@ -21,10 +22,31 @@ def mssql_is_multiline(mssql_cli): def _is_complete(sql): - # A complete command is an sql statement that ends with a semicolon, unless + # A complete command is an sql statement that ends with a 'GO', unless # there's an open quote surrounding it, as is common when writing a # CREATE FUNCTION command - return sql.endswith(';') and not is_open_quote(sql) + if sql is not None and sql != "": + # remove comments + sql = sqlparse.format(sql, strip_comments=True) + + # check for open comments + # remove all closed quotes to isolate instances of open comments + sql_no_quotes = re.sub(r'".*?"|\'.*?\'', '', sql) + is_open_comment = len(re.findall(r'\/\*', sql_no_quotes)) > 0 + + # check that 'go' is only token on newline + lines = sql.split('\n') + lastline = lines[len(lines) - 1].lower().strip() + is_valid_go_on_lastline = lastline == 'go' + + # check that 'go' is on last line, not in open quotes, and there's no open + # comment with closed comments and quotes removed. + # NOTE: this method fails when GO follows a closing '*/' block comment on the same line, + # we've taken a dependency with sqlparse + # (https://github.com/andialbrecht/sqlparse/issues/484) + return not is_open_quote(sql) and not is_open_comment and is_valid_go_on_lastline + + return False def _multiline_exception(text): diff --git a/mssqlcli/mssqlcliclient.py b/mssqlcli/mssqlcliclient.py index d7019cb..f4e26b0 100644 --- a/mssqlcli/mssqlcliclient.py +++ b/mssqlcli/mssqlcliclient.py @@ -230,7 +230,8 @@ class MssqlCliClient: query_has_exception = query_response.exception_message query_has_error_messages = query_messages[0].is_error if query_messages else False query_has_batch_error = query_response.batch_summaries[0].has_error \ - if hasattr(query_response, 'batch_summaries') else False + if hasattr(query_response, 'batch_summaries') \ + and len(query_response.batch_summaries) > 0 else False query_failed = query_has_exception or query_has_batch_error or query_has_error_messages @@ -277,7 +278,8 @@ class MssqlCliClient: @staticmethod def _no_results_found_in(query_response): - return not query_response.batch_summaries[0].result_set_summaries + return not query_response.batch_summaries \ + or not query_response.batch_summaries[0].result_set_summaries @staticmethod def _no_rows_found_in(query_response): diff --git a/mssqlcli/mssqlclirc b/mssqlcli/mssqlclirc index 75e8b38..fc8deeb 100644 --- a/mssqlcli/mssqlclirc +++ b/mssqlcli/mssqlclirc @@ -10,13 +10,13 @@ smart_completion = True wider_completion_menu = False # Multi-line mode allows breaking up the sql statements into multiple lines. If -# this is set to True, then the end of the statements must have a semi-colon. +# this is set to True, then the end of the statements must have 'GO'. # If this is set to False then sql statements can't be split into multiple # lines. End of line (return) is considered as the end of the statement. multi_line = False # If multi_line_mode is set to "tsql", in multi-line mode, [Enter] will execute -# the current input if the input ends in a semicolon. +# the current input if the input ends in 'GO'. # If multi_line_mode is set to "safe", in multi-line mode, [Enter] will always # insert a newline, and [Esc] [Enter] or [Alt]-[Enter] must be used to execute # a command. diff --git a/mssqlcli/mssqltoolbar.py b/mssqlcli/mssqltoolbar.py index 38cca71..7ee5e2d 100644 --- a/mssqlcli/mssqltoolbar.py +++ b/mssqlcli/mssqltoolbar.py @@ -39,7 +39,7 @@ def create_toolbar_tokens_func(mssql_cli): if mssql_cli.multiline_mode == 'safe': result.append((token, ' ([Esc] [Enter] to execute]) ')) else: - result.append((token, ' (Semi-colon [;] will end the line) ')) + result.append((token, ' ([GO] statement will end the line) ')) if mssql_cli.vi_mode: result.append( diff --git a/mssqlcli/packages/parseutils/utils.py b/mssqlcli/packages/parseutils/utils.py index 1376019..1f14772 100644 --- a/mssqlcli/packages/parseutils/utils.py +++ b/mssqlcli/packages/parseutils/utils.py @@ -113,7 +113,7 @@ def is_open_quote(sql): def _parsed_is_open_quote(parsed): # Look for unmatched single quotes, or unmatched dollar sign quotes - return any(tok.match(Token.Error, ("'", "$")) for tok in parsed.flatten()) + return any(tok.match(Token.Error, ("'", '"', "$")) for tok in parsed.flatten()) def parse_partial_identifier(word):
dbcli/mssql-cli
341fead174a009474af31fd2e7849ea07b66b251
diff --git a/tests/test_multiline.py b/tests/test_multiline.py new file mode 100644 index 0000000..81577d0 --- /dev/null +++ b/tests/test_multiline.py @@ -0,0 +1,37 @@ +import pytest +from mssqlcli.mssqlbuffer import _is_complete + + +class TestMssqlCliMultiline: + testdata = [ + (None, False), + ('', False), + ('select 1 /* open comment!\ngo', False), + ('select 1\ngo -- another comment', True), + ('select 1; select 2, "open quote: go', False), + ('select 1\n"go"', False), + ('select 1; GO', False), + ('SELECT 4;\nGO', True), + ('select 1\n select 2;\ngo', True), + ('select 1;', False), + ('select 1 go', False), + ('select 1\ngo go go', False), + ('GO select 1', False), + ('GO', True) + # tests below to be enabled when sqlparse supports retaining newlines + # when stripping comments (tracking here: + # https://github.com/andialbrecht/sqlparse/issues/484): + # ('select 3 /* another open comment\n*/ GO', True), + # ('select 1\n*/go', False), + # ('select 1 /*\nmultiple lines!\n*/go', True) + ] + + @staticmethod + @pytest.mark.parametrize("query_str, is_complete", testdata) + def test_multiline_completeness(query_str, is_complete): + """ + Tests the _is_complete helper method, which parses a T-SQL multiline + statement on each newline and determines whether the script should + execute. + """ + assert _is_complete(query_str) == is_complete
Do not use a semicolon to end a multi-line query Currently when editing a multiline query, we use use a semicolon+<enter> to delineate the query should be executed. Feedback from the MVP summit: in multiline query mode, users like to enter more that one statement, which are delineated by semicolons, so using a semicolon is a bad choice. We should consider using the 'GO' keyword to execute the query, which aligns with sqlcmd.
0.0
341fead174a009474af31fd2e7849ea07b66b251
[ "tests/test_multiline.py::TestMssqlCliMultiline::test_multiline_completeness[None-False]", "tests/test_multiline.py::TestMssqlCliMultiline::test_multiline_completeness[select", "tests/test_multiline.py::TestMssqlCliMultiline::test_multiline_completeness[SELECT", "tests/test_multiline.py::TestMssqlCliMultiline::test_multiline_completeness[GO-True]" ]
[ "tests/test_multiline.py::TestMssqlCliMultiline::test_multiline_completeness[-False]", "tests/test_multiline.py::TestMssqlCliMultiline::test_multiline_completeness[GO" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2019-12-17 18:17:23+00:00
bsd-3-clause
1,857
deardurham__ciprs-reader-21
diff --git a/ciprs/parsers.py b/ciprs/parsers.py index 9f2bfec..c648277 100644 --- a/ciprs/parsers.py +++ b/ciprs/parsers.py @@ -113,6 +113,25 @@ class OffenseRecordRow(Parser): report["Offense Record"]["Records"].append(record) +class OffenseRecordRowWithNumber(Parser): + """ + Extract offense row like: + 54 CHARGED SPEEDING INFRACTION G.S. 20-141(B) + """ + + # pylint: disable=line-too-long + pattern = r"(?:\d*)?\s*(?P<action>\w+)\s+(?P<desc>[\w \-\(\)]+)[ ]{2,}(?P<severity>\w+)[ ]{2,}(?P<law>[\w. \-\(\)]+)" + + def extract(self, matches, report): + record = { + "Action": matches["action"], + "Description": matches["desc"], + "Severity": matches["severity"], + "Law": matches["law"], + } + report["Offense Record"]["Records"].append(record) + + class OffenseDisposedDate(Parser): pattern = r".*Disposed on:\s*(?P<value>[\d/:]+)" diff --git a/ciprs/reader.py b/ciprs/reader.py index b084926..81f9faa 100644 --- a/ciprs/reader.py +++ b/ciprs/reader.py @@ -6,6 +6,7 @@ from ciprs.parsers import ( CaseDetails, CaseStatus, OffenseRecordRow, + OffenseRecordRowWithNumber, OffenseDateTime, OffenseDisposedDate, CaseWasServedOnDate, @@ -35,6 +36,7 @@ class PDFToTextReader: CaseDetails(self.report), CaseStatus(self.report), OffenseRecordRow(self.report), + OffenseRecordRowWithNumber(self.report), OffenseDateTime(self.report), OffenseDisposedDate(self.report), CaseWasServedOnDate(self.report),
deardurham/ciprs-reader
a052cb447ca15183f6fb0eb2ac0b7cbd3d699f25
diff --git a/tests/test_parsers.py b/tests/test_parsers.py index ca14731..efa4bb8 100644 --- a/tests/test_parsers.py +++ b/tests/test_parsers.py @@ -39,6 +39,16 @@ def test_offense_record_charged(): assert matches["code"] == "4450" +def test_offense_record_charged_with_number(): + string = "54 CHARGED SPEEDING(80 mph in a 65 mph zone) INFRACTION G.S. 20-141(B)" # noqa + matches = parsers.OffenseRecordRowWithNumber().match(string) + assert matches is not None, "Regex match failed" + assert matches["action"] == "CHARGED" + assert matches["desc"] == "SPEEDING(80 mph in a 65 mph zone)" + assert matches["severity"] == "INFRACTION" + assert matches["law"] == "G.S. 20-141(B)" + + def test_offense_record_arrainged(): string = "ARRAIGNED SPEEDING(80 mph in a 65 mph zone) INFRACTION G.S. 20-141(B) 4450" # noqa matches = parsers.OffenseRecordRow().match(string)
Parsers do not catch numbered offense rows The offense row parser is designed to capture data from offense rows that look like this: ACTION DESCRIPTION SEVERITY LAW CODE However, on some records they look like this: \# ACTION DESCRIPTION SEVERITY LAW With # being either a zero padded number or blank
0.0
a052cb447ca15183f6fb0eb2ac0b7cbd3d699f25
[ "tests/test_parsers.py::test_offense_record_charged_with_number" ]
[ "tests/test_parsers.py::test_case_details[expected0-", "tests/test_parsers.py::test_case_details[expected1-", "tests/test_parsers.py::test_case_status", "tests/test_parsers.py::test_offense_record_charged", "tests/test_parsers.py::test_offense_record_arrainged", "tests/test_parsers.py::test_offense_record_convicted", "tests/test_parsers.py::test_offense_date_time", "tests/test_parsers.py::test_defendent_name", "tests/test_parsers.py::test_defendent_name_no_middle", "tests/test_parsers.py::test_defendent_race", "tests/test_parsers.py::test_defendent_sex_male", "tests/test_parsers.py::test_defendent_sex_female", "tests/test_parsers.py::test_defendent_sex_bad", "tests/test_parsers.py::test_defendent_dob", "tests/test_parsers.py::test_offense_disposed_date[2000-01-01-", "tests/test_parsers.py::test_offense_disposed_date[2016-07-20-", "tests/test_parsers.py::test_case_was_served_on_date[2000-09-09-", "tests/test_parsers.py::test_case_was_served_on_date[2015-05-17-Case", "tests/test_parsers.py::test_known_offense_disposition_method", "tests/test_parsers.py::test_unknown_offense_disposition_method", "tests/test_parsers.py::test_court_type_other", "tests/test_parsers.py::test_court_type_cr", "tests/test_parsers.py::test_court_type_crs" ]
{ "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2020-02-19 01:01:30+00:00
bsd-3-clause
1,859
deardurham__ciprs-reader-38
diff --git a/ciprs_reader/parser/section/header.py b/ciprs_reader/parser/section/header.py index 1f18711..34edc94 100644 --- a/ciprs_reader/parser/section/header.py +++ b/ciprs_reader/parser/section/header.py @@ -13,7 +13,7 @@ class CaseDetails(HeaderParser): """Extract County and File No from header on top of first page""" pattern = ( - r"\s*Case (Details|Summary) for Court Case[\s:]+(?P<county>\w+) (?P<fileno>\w+)" + r"\s*Case (Details|Summary) for Court Case[\s:]+(?P<county>(\w\s*)+) (?P<fileno>\w+)" ) def extract(self, matches, report):
deardurham/ciprs-reader
a39ef64b3e2ee9c14b377262c64230cce9bc2681
diff --git a/tests/parsers/test_header.py b/tests/parsers/test_header.py index 3610ac9..5fb3138 100644 --- a/tests/parsers/test_header.py +++ b/tests/parsers/test_header.py @@ -12,6 +12,14 @@ CASE_DETAIL_DATA = [ {"county": "ORANGE", "fileno": "99FN9999999"}, " Case Summary for Court Case: ORANGE 99FN9999999", ), + ( + {"county": "NEW HANOVER", "fileno": "00GR000000"}, + " Case Details for Court Case NEW HANOVER 00GR000000 ", + ), + ( + {"county": "OLD HANOVER", "fileno": "99FN9999999"}, + " Case Summary for Court Case: OLD HANOVER 99FN9999999", + ), ]
County names with spaces are not parsed properly The [CaseDetails](https://github.com/deardurham/ciprs-reader/blob/master/ciprs_reader/parser/section/header.py#L12) parser doesn't expect county names to contain spaces, so a line like ``` Case Summary for Court Case: NEW HANOVER 20CR000000 ``` will result in a county name of ``NEW``. AC - [CaseDetails](https://github.com/deardurham/ciprs-reader/blob/master/ciprs_reader/parser/section/header.py#L12) parser updated to expect spaces - A test is added wi spaces in the county name
0.0
a39ef64b3e2ee9c14b377262c64230cce9bc2681
[ "tests/parsers/test_header.py::test_case_details[expected2-", "tests/parsers/test_header.py::test_case_details[expected3-" ]
[ "tests/parsers/test_header.py::test_case_details[expected0-", "tests/parsers/test_header.py::test_case_details[expected1-", "tests/parsers/test_header.py::test_defendent_name", "tests/parsers/test_header.py::test_defendent_name_no_middle", "tests/parsers/test_header.py::test_defendent_name_special_character" ]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2020-06-26 03:08:23+00:00
bsd-3-clause
1,860
decargroup__pykoop-132
diff --git a/LICENSE b/LICENSE index e8d5947..a4df98f 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 DECAR Systems Group +Copyright (c) 2022 DECAR Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/pykoop/koopman_pipeline.py b/pykoop/koopman_pipeline.py index 18f1d8b..80ad541 100644 --- a/pykoop/koopman_pipeline.py +++ b/pykoop/koopman_pipeline.py @@ -2821,7 +2821,9 @@ class KoopmanPipeline(metaestimators._BaseComposition, KoopmanLiftingFn): an error has occured in estimator fitting. If set to ``'raise'``, a :class:`ValueError` is raised. If a numerical value is given, a :class:`sklearn.exceptions.FitFailedWarning` warning is raised and - the specified score is returned. + the specified score is returned. The error score defines the worst + possible score. If a score is finite but lower than the error + score, the error score will be returned instead. multistep : bool If true, predict using :func:`predict_trajectory`. Otherwise, @@ -3204,7 +3206,9 @@ def score_trajectory( error has occured in estimator fitting. If set to ``'raise'``, a :class:`ValueError` is raised. If a numerical value is given, a :class:`sklearn.exceptions.FitFailedWarning` warning is raised and the - specified score is returned. + specified score is returned. The error score defines the worst possible + score. If a score is finite but lower than the error score, the error + score will be returned instead. min_samples : int Number of samples in initial condition. @@ -3298,6 +3302,13 @@ def score_trajectory( # Invert losses if regression_metric not in greater_is_better: score *= -1 + # If score is worse than error score, return that. + if np.isfinite(error_score) and (score < error_score): + warnings.warn( + f'Score `score={score}` is finite, but is lower than error ' + f'score `error_score={error_score}`. Returning error score.', + sklearn.exceptions.FitFailedWarning) + return error_score return score
decargroup/pykoop
a9f1f516ca6dc273f96d2165d195c648417067c1
diff --git a/tests/test_koopman_pipeline.py b/tests/test_koopman_pipeline.py index 2762359..9d8c34a 100644 --- a/tests/test_koopman_pipeline.py +++ b/tests/test_koopman_pipeline.py @@ -560,6 +560,22 @@ class TestKoopmanPipelineScore: False, None, ), + # Finite score worse than error score should return error score. + ( + np.array([ + [1e-2, 1e-3], + ]).T, + np.array([ + [1e5, 1e6], + ]).T, + None, + 1, + 'neg_mean_squared_error', + -100, + 1, + False, + -100, + ), ], ) def test_score_trajectory(
Change name in license file DECAR Systems Group -> DECAR Group or just DECAR
0.0
a9f1f516ca6dc273f96d2165d195c648417067c1
[ "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted16-X_expected16-None-1-neg_mean_squared_error--100-1-False--100]" ]
[ "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_koopman_pipeline_attrs[lf0-names_in0-X0-names_out0-Xt_exp0-1-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_koopman_pipeline_attrs[lf1-names_in1-X1-names_out1-Xt_exp1-1-False-attr_exp1]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_koopman_pipeline_attrs[lf2-names_in2-X2-names_out2-Xt_exp2-1-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_koopman_pipeline_attrs[lf3-names_in3-X3-names_out3-Xt_exp3-1-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_transform[lf0-names_in0-X0-names_out0-Xt_exp0-1-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_transform[lf1-names_in1-X1-names_out1-Xt_exp1-1-False-attr_exp1]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_transform[lf2-names_in2-X2-names_out2-Xt_exp2-1-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_transform[lf3-names_in3-X3-names_out3-Xt_exp3-1-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_inverse_transform[lf0-names_in0-X0-names_out0-Xt_exp0-1-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_inverse_transform[lf1-names_in1-X1-names_out1-Xt_exp1-1-False-attr_exp1]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_inverse_transform[lf2-names_in2-X2-names_out2-Xt_exp2-1-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_inverse_transform[lf3-names_in3-X3-names_out3-Xt_exp3-1-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_feature_names_in[lf0-names_in0-X0-names_out0-Xt_exp0-1-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_feature_names_in[lf1-names_in1-X1-names_out1-Xt_exp1-1-False-attr_exp1]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_feature_names_in[lf2-names_in2-X2-names_out2-Xt_exp2-1-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_feature_names_in[lf3-names_in3-X3-names_out3-Xt_exp3-1-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_feature_names_out[lf0-names_in0-X0-names_out0-Xt_exp0-1-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_feature_names_out[lf1-names_in1-X1-names_out1-Xt_exp1-1-False-attr_exp1]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_feature_names_out[lf2-names_in2-X2-names_out2-Xt_exp2-1-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineTransform::test_feature_names_out[lf3-names_in3-X3-names_out3-Xt_exp3-1-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineFit::test_fit", "tests/test_koopman_pipeline.py::TestKoopmanPipelineFit::test_fit_feature_names", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted0-X_expected0-None-1-neg_mean_squared_error-nan-1-False-0]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted1-X_expected1-None-1-neg_mean_squared_error-nan-1-False--2.5]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted2-X_expected2-None-1-neg_mean_squared_error-nan-1-False--1.3333333333333333]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted3-X_expected3-None-1-neg_mean_absolute_error-nan-1-False--0.6666666666666666]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted4-X_expected4-None-1-neg_mean_squared_error-nan-2-False--0.5]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted5-X_expected5-2-1-neg_mean_squared_error-nan-1-False-0]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted6-X_expected6-None-0.5-neg_mean_squared_error-nan-1-False--0.14285714285714285]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted7-X_expected7-None-1-neg_mean_squared_error-nan-1-True--0.5]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted8-X_expected8-1-1-neg_mean_squared_error-nan-1-True--0.5]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted9-X_expected9-None-0.5-neg_mean_squared_error-nan-1-True--0.5]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted10-X_expected10-1-0.5-neg_mean_squared_error-nan-1-True--0.5]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted11-X_expected11-None-1-neg_mean_squared_error-nan-1-False-nan]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted12-X_expected12-None-1-neg_mean_squared_error--100-1-False--100]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted13-X_expected13-None-1-neg_mean_squared_error-raise-1-False-None]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted14-X_expected14-None-1-neg_mean_squared_error--100-1-False--100]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_score_trajectory[X_predicted15-X_expected15-None-1-neg_mean_squared_error-raise-1-False-None]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_weights_from_data_matrix[X0-w_exp0-2-1-False]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_weights_from_data_matrix[X1-w_exp1-3-0.5-False]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_weights_from_data_matrix[X2-w_exp2-2-0.5-True]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_weights_from_data_matrix[X3-w_exp3-10-1-True]", "tests/test_koopman_pipeline.py::TestKoopmanPipelineScore::test_weights_from_data_matrix[X4-w_exp4-10-0.1-True]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_shift_episodes[X0-X_unsh_exp0-X_sh_exp0-0-False]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_shift_episodes[X1-X_unsh_exp1-X_sh_exp1-1-False]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_shift_episodes[X2-X_unsh_exp2-X_sh_exp2-0-True]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_shift_episodes[X3-X_unsh_exp3-X_sh_exp3-1-True]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_initial_conditions[X0-ic_exp0-1-0-False]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_initial_conditions[X1-ic_exp1-2-0-False]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_initial_conditions[X2-ic_exp2-1-1-False]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_initial_conditions[X3-ic_exp3-1-0-True]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_initial_conditions[X4-ic_exp4-1-1-True]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_initial_conditions[X5-ic_exp5-2-1-True]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_input[X0-u_exp0-1-False]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_input[X1-u_exp1-0-False]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_extract_input[X2-u_exp2-1-True]", "tests/test_koopman_pipeline.py::TestEpisodeManipulation::test_strip_initial_conditons", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory[kp0]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory[kp1]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory[kp2]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory[kp3]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory[kp4]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory_no_U[kp0]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory_no_U[kp1]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory_no_U[kp2]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory_no_U[kp3]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_trajectory_no_U[kp4]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_multistep[kp0]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_multistep[kp1]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_multistep[kp2]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_multistep[kp3]", "tests/test_koopman_pipeline.py::TestPrediction::test_predict_multistep[kp4]", "tests/test_koopman_pipeline.py::TestSplitCombineEpisodes::test_split_episodes[X0-episodes0-True]", "tests/test_koopman_pipeline.py::TestSplitCombineEpisodes::test_split_episodes[X1-episodes1-True]", "tests/test_koopman_pipeline.py::TestSplitCombineEpisodes::test_split_episodes[X2-episodes2-False]", "tests/test_koopman_pipeline.py::TestSplitCombineEpisodes::test_split_episodes[X3-episodes3-True]", "tests/test_koopman_pipeline.py::TestSplitCombineEpisodes::test_combine_episodes[X0-episodes0-True]", "tests/test_koopman_pipeline.py::TestSplitCombineEpisodes::test_combine_episodes[X1-episodes1-True]", "tests/test_koopman_pipeline.py::TestSplitCombineEpisodes::test_combine_episodes[X2-episodes2-False]", "tests/test_koopman_pipeline.py::TestSplitCombineEpisodes::test_combine_episodes[X3-episodes3-True]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_attrs[lf0-names_in0-X0-names_out0-Xt_exp0-2-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_attrs[lf1-names_in1-X1-names_out1-Xt_exp1-2-True-attr_exp1]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_attrs[lf2-names_in2-X2-names_out2-Xt_exp2-2-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_attrs[lf3-names_in3-X3-names_out3-Xt_exp3-2-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_attrs[lf4-names_in4-X4-names_out4-Xt_exp4-2-False-attr_exp4]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_transform[lf0-names_in0-X0-names_out0-Xt_exp0-2-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_transform[lf1-names_in1-X1-names_out1-Xt_exp1-2-True-attr_exp1]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_transform[lf2-names_in2-X2-names_out2-Xt_exp2-2-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_transform[lf3-names_in3-X3-names_out3-Xt_exp3-2-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_transform[lf4-names_in4-X4-names_out4-Xt_exp4-2-False-attr_exp4]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_inverse_transform[lf0-names_in0-X0-names_out0-Xt_exp0-2-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_inverse_transform[lf1-names_in1-X1-names_out1-Xt_exp1-2-True-attr_exp1]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_inverse_transform[lf2-names_in2-X2-names_out2-Xt_exp2-2-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_inverse_transform[lf3-names_in3-X3-names_out3-Xt_exp3-2-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_split_lifting_fn_inverse_transform[lf4-names_in4-X4-names_out4-Xt_exp4-2-False-attr_exp4]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_in[lf0-names_in0-X0-names_out0-Xt_exp0-2-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_in[lf1-names_in1-X1-names_out1-Xt_exp1-2-True-attr_exp1]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_in[lf2-names_in2-X2-names_out2-Xt_exp2-2-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_in[lf3-names_in3-X3-names_out3-Xt_exp3-2-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_in[lf4-names_in4-X4-names_out4-Xt_exp4-2-False-attr_exp4]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_out[lf0-names_in0-X0-names_out0-Xt_exp0-2-False-attr_exp0]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_out[lf1-names_in1-X1-names_out1-Xt_exp1-2-True-attr_exp1]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_out[lf2-names_in2-X2-names_out2-Xt_exp2-2-False-attr_exp2]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_out[lf3-names_in3-X3-names_out3-Xt_exp3-2-False-attr_exp3]", "tests/test_koopman_pipeline.py::TestSplitPipeline::test_feature_names_out[lf4-names_in4-X4-names_out4-Xt_exp4-2-False-attr_exp4]", "tests/test_koopman_pipeline.py::TestLiftRetract::test_lift_retract_ff[lf0]", "tests/test_koopman_pipeline.py::TestLiftRetract::test_lift_retract_ff[lf1]", "tests/test_koopman_pipeline.py::TestLiftRetract::test_lift_retract_tt[lf0]", "tests/test_koopman_pipeline.py::TestLiftRetract::test_lift_retract_tt[lf1]", "tests/test_koopman_pipeline.py::TestLiftRetract::test_lift_retract_ft[lf0]", "tests/test_koopman_pipeline.py::TestLiftRetract::test_lift_retract_ft[lf1]", "tests/test_koopman_pipeline.py::TestLiftRetract::test_lift_retract_tf[lf0]", "tests/test_koopman_pipeline.py::TestLiftRetract::test_lift_retract_tf[lf1]", "tests/test_koopman_pipeline.py::TestFeatureNames::test_valid_names", "tests/test_koopman_pipeline.py::TestFeatureNames::test_invalid_names", "tests/test_koopman_pipeline.py::TestFeatureNames::test_numerical_names", "tests/test_koopman_pipeline.py::TestFeatureNames::test_different_fit_transform[X_fit0-X_transform0]", "tests/test_koopman_pipeline.py::TestFeatureNames::test_different_fit_transform[X_fit1-X_transform1]", "tests/test_koopman_pipeline.py::TestFeatureNames::test_different_fit_transform[X_fit2-X_transform2]", "tests/test_koopman_pipeline.py::TestSplitStateInputEpisodes::test_X_initial_onearg[kp0-X0-1-True]", "tests/test_koopman_pipeline.py::TestSplitStateInputEpisodes::test_U_onearg[kp0-X0-1-True]", "tests/test_koopman_pipeline.py::TestSplitStateInputEpisodes::test_X_initial_twoarg[kp0-X0-1-True]", "tests/test_koopman_pipeline.py::TestSplitStateInputEpisodes::test_U_twoarg[kp0-X0-1-True]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_no_attributes_set_in_init]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimators_dtypes]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_fit_score_takes_y]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimators_fit_returns_self]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimators_fit_returns_self(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_complex_data]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_dtype_object]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimators_empty_data_messages]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_pipeline_consistency]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimators_nan_inf]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimators_overwrite_params]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimator_sparse_array]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimator_sparse_matrix]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimators_pickle]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimators_pickle(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_estimator_get_tags_default_keys]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_transformer_data_not_an_array]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_transformer_general]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_transformer_preserve_dtypes]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_transformer_general(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_transformers_unfitted]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_transformer_n_iter]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_parameters_default_constructible]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_methods_sample_order_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_methods_subset_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_fit2d_1sample]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_fit2d_1feature]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_get_params_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_set_params]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_dict_unchanged]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_dont_overwrite_parameters]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_fit_idempotent]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_fit_check_is_fitted]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_n_features_in]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_fit1d]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(regressor=Edmd())-check_fit2d_predict1d]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_no_attributes_set_in_init]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimators_dtypes]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_fit_score_takes_y]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimators_fit_returns_self]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimators_fit_returns_self(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_complex_data]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_dtype_object]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimators_empty_data_messages]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_pipeline_consistency]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimators_nan_inf]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimators_overwrite_params]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimator_sparse_array]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimator_sparse_matrix]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimators_pickle]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimators_pickle(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_estimator_get_tags_default_keys]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_transformer_data_not_an_array]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_transformer_general]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_transformer_preserve_dtypes]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_transformer_general(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_transformers_unfitted]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_transformer_n_iter]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_parameters_default_constructible]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_methods_sample_order_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_methods_subset_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_fit2d_1sample]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_fit2d_1feature]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_get_params_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_set_params]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_dict_unchanged]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_dont_overwrite_parameters]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_fit_idempotent]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_fit_check_is_fitted]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_n_features_in]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_fit1d]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[KoopmanPipeline(lifting_functions=[('pl',PolynomialLiftingFn())],regressor=Edmd())-check_fit2d_predict1d]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_no_attributes_set_in_init]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimators_dtypes]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_fit_score_takes_y]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimators_fit_returns_self]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimators_fit_returns_self(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_complex_data]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_dtype_object]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimators_empty_data_messages]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_pipeline_consistency]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimators_nan_inf]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimators_overwrite_params]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimator_sparse_array]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimator_sparse_matrix]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimators_pickle]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimators_pickle(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_estimator_get_tags_default_keys]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_transformer_data_not_an_array]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_transformer_general]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_transformer_preserve_dtypes]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_transformer_general(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_transformers_unfitted]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_transformer_n_iter]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_parameters_default_constructible]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_methods_sample_order_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_methods_subset_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_fit2d_1sample]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_fit2d_1feature]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_get_params_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_set_params]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_dict_unchanged]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_dont_overwrite_parameters]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_fit_idempotent]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_fit_check_is_fitted]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_n_features_in]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_fit1d]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline()-check_fit2d_predict1d]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_no_attributes_set_in_init]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimators_dtypes]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_fit_score_takes_y]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimators_fit_returns_self]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimators_fit_returns_self(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_complex_data]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_dtype_object]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimators_empty_data_messages]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_pipeline_consistency]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimators_nan_inf]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimators_overwrite_params]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimator_sparse_array]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimator_sparse_matrix]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimators_pickle]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimators_pickle(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_estimator_get_tags_default_keys]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_transformer_data_not_an_array]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_transformer_general]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_transformer_preserve_dtypes]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_transformer_general(readonly_memmap=True)]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_transformers_unfitted]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_transformer_n_iter]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_parameters_default_constructible]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_methods_sample_order_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_methods_subset_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_fit2d_1sample]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_fit2d_1feature]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_get_params_invariance]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_set_params]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_dict_unchanged]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_dont_overwrite_parameters]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_fit_idempotent]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_fit_check_is_fitted]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_n_features_in]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_fit1d]", "tests/test_koopman_pipeline.py::TestSkLearn::test_compatible_estimator[SplitPipeline(lifting_functions_state=[('pl',PolynomialLiftingFn())])-check_fit2d_predict1d]", "tests/test_koopman_pipeline.py::TestDeepParams::test_get_set", "tests/test_koopman_pipeline.py::TestDeepParams::test_nested_get_set", "tests/test_koopman_pipeline.py::TestDeepParams::test_invalid_set" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-01-18 16:51:15+00:00
mit
1,861
dedupeio__dedupe-837
diff --git a/dedupe/predicates.py b/dedupe/predicates.py index 1934811..e796a6d 100644 --- a/dedupe/predicates.py +++ b/dedupe/predicates.py @@ -329,9 +329,14 @@ class CompoundPredicate(tuple): def __call__(self, record, **kwargs): predicate_keys = [predicate(record, **kwargs) for predicate in self] - return [u':'.join(block_key) - for block_key - in itertools.product(*predicate_keys)] + return [ + u':'.join( + # must escape : to avoid confusion with : join separator + b.replace(u':', u'\\:') for b in block_key + ) + for block_key + in itertools.product(*predicate_keys) + ] def wholeFieldPredicate(field: Any) -> Tuple[str]:
dedupeio/dedupe
5092f2598f1f2bcb4f3b1f0ec85f88b95ce7454b
diff --git a/tests/test_predicates.py b/tests/test_predicates.py index deca290..714ac31 100644 --- a/tests/test_predicates.py +++ b/tests/test_predicates.py @@ -80,5 +80,47 @@ class TestNumericPredicates(unittest.TestCase): assert predicates.roundTo1(-22315) == (u'-20000',) +class TestCompoundPredicate(unittest.TestCase): + def test_escapes_colon(self): + ''' + Regression test for issue #836 + ''' + predicate_1 = predicates.SimplePredicate( + predicates.commonSetElementPredicate, 'col_1') + predicate_2 = predicates.SimplePredicate( + predicates.commonSetElementPredicate, 'col_2') + record = { + 'col_1': ['foo:', 'foo'], + 'col_2': [':bar', 'bar'] + } + + block_val = predicates.CompoundPredicate([ + predicate_1, + predicate_2 + ])(record) + assert len(set(block_val)) == 4 + assert block_val == ['foo\\::\\:bar', 'foo\\::bar', 'foo:\\:bar', 'foo:bar'] + + def test_escapes_escaped_colon(self): + ''' + Regression test for issue #836 + ''' + predicate_1 = predicates.SimplePredicate( + predicates.commonSetElementPredicate, 'col_1') + predicate_2 = predicates.SimplePredicate( + predicates.commonSetElementPredicate, 'col_2') + record = { + 'col_1': ['foo\\:', 'foo'], + 'col_2': ['\\:bar', 'bar'] + } + + block_val = predicates.CompoundPredicate([ + predicate_1, + predicate_2 + ])(record) + assert len(set(block_val)) == 4 + assert block_val == ['foo\\\\::\\\\:bar', 'foo\\\\::bar', 'foo:\\\\:bar', 'foo:bar'] + + if __name__ == '__main__': unittest.main()
CompoundPredicate should escape `:` to avoid wrong block_keys I've found an issue on `CompoundPredicate` caused by the lack of escaping `:` chars inside fields. This causes two problems. First, it can generate duplicate `block_key`s for the same `id`. Here's the example: ``` (SimplePredicate: (commonSetElementPredicate, name), SimplePredicate: (commonSetElementPredicate, address)) ``` ``` id | name | address --------------------------------------- 1 | {'foo:', 'foo'} | {':bar', 'bar'} ``` ``` id | block_key --------------- 1 | foo::bar:0 1 | foo::bar:0 ``` That's probably not problematic for Dedupe 2, but that breaks [this line](https://github.com/dedupeio/dedupe-examples/blob/83dbf872674a5c3f6a209c367f46c7e6ef78e9a3/pgsql_big_dedupe_example/pgsql_big_dedupe_example.py#L246-L247) of the old `smaller_id`-based big Dedupe I still use. Second, it can group together under the same `block_key` records that shouldn't be blocked together. See: ``` (SimplePredicate: (wholeFieldPredicate, name), SimplePredicate: (wholeFieldPredicate, address)) ``` ``` id | name | address --------------------------- 1 | flavio: | one street 2 | flavio | :one street ``` ``` id | blocking_key ------------------------- 1 | flavio::one street:0 2 | flavio::one street:0 ``` The solution is to escape `:` right before performing the `join` at this line: https://github.com/dedupeio/dedupe/blob/5092f2598f1f2bcb4f3b1f0ec85f88b95ce7454b/dedupe/predicates.py#L332 Something like `u':'.join(block_key.replace(u':', u'\\:'))` would work, because the examples above would become this: ``` id | block_key --------------- 1 | foo\::bar:0 1 | foo:\:bar:0 ``` ``` id | blocking_key ------------------------- 1 | flavio\::one street:0 2 | flavio:\:one street:0 ``` I'll open a PR for this.
0.0
5092f2598f1f2bcb4f3b1f0ec85f88b95ce7454b
[ "tests/test_predicates.py::TestCompoundPredicate::test_escapes_colon", "tests/test_predicates.py::TestCompoundPredicate::test_escapes_escaped_colon" ]
[ "tests/test_predicates.py::TestPuncStrip::test_set", "tests/test_predicates.py::TestPuncStrip::test_sevenchar", "tests/test_predicates.py::TestMetaphone::test_metaphone_token", "tests/test_predicates.py::TestWholeSet::test_full_set", "tests/test_predicates.py::TestSetElement::test_empty_set", "tests/test_predicates.py::TestSetElement::test_first_last", "tests/test_predicates.py::TestSetElement::test_long_set", "tests/test_predicates.py::TestSetElement::test_magnitude", "tests/test_predicates.py::TestLatLongGrid::test_precise_latlong", "tests/test_predicates.py::TestNumericPredicates::test_order_of_magnitude", "tests/test_predicates.py::TestNumericPredicates::test_round_to_1" ]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2020-07-13 17:49:49+00:00
mit
1,862
deepchem__deepchem-2664
diff --git a/README.md b/README.md index fec472dbe..54d1c06d7 100644 --- a/README.md +++ b/README.md @@ -109,6 +109,10 @@ If GPU support is required, then make sure CUDA is installed and then install th 2. pytorch - https://pytorch.org/get-started/locally/#start-locally 3. jax - https://github.com/google/jax#pip-installation-gpu-cuda +In `zsh` square brackets are used for globbing/pattern matching. This means you +need to escape the square brackets in the above installation. You can do so +by including the dependencies in quotes like `pip install --pre 'deepchem[jax]'` + ### Docker If you want to install deepchem using a docker, you can pull two kinds of images. diff --git a/deepchem/data/datasets.py b/deepchem/data/datasets.py index 1abdde3e7..27427927a 100644 --- a/deepchem/data/datasets.py +++ b/deepchem/data/datasets.py @@ -1500,10 +1500,10 @@ class DiskDataset(Dataset): """Gets size of shards on disk.""" if not len(self.metadata_df): raise ValueError("No data in dataset.") - sample_y = load_from_disk( + sample_ids = load_from_disk( os.path.join(self.data_dir, - next(self.metadata_df.iterrows())[1]['y'])) - return len(sample_y) + next(self.metadata_df.iterrows())[1]['ids'])) + return len(sample_ids) def _get_metadata_filename(self) -> Tuple[str, str]: """Get standard location for metadata file.""" @@ -2369,11 +2369,11 @@ class DiskDataset(Dataset): if y is not None: y_sel = y[shard_inds] else: - y_sel = None + y_sel = np.array([]) if w is not None: w_sel = w[shard_inds] else: - w_sel = None + w_sel = np.array([]) ids_sel = ids[shard_inds] Xs.append(X_sel) ys.append(y_sel) @@ -2399,9 +2399,16 @@ class DiskDataset(Dataset): np.where(sorted_indices == orig_index)[0][0] for orig_index in select_shard_indices ]) - X, y, w, ids = X[reverted_indices], y[reverted_indices], w[ - reverted_indices], ids[reverted_indices] - yield (X, y, w, ids) + if y.size == 0: + tup_y = y + else: + tup_y = y[reverted_indices] + if w.size == 0: + tup_w = w + else: + tup_w = w[reverted_indices] + X, ids = X[reverted_indices], ids[reverted_indices] + yield (X, tup_y, tup_w, ids) start = end select_shard_num += 1 diff --git a/docs/source/get_started/installation.rst b/docs/source/get_started/installation.rst index 198d1020c..1c9a0cd68 100644 --- a/docs/source/get_started/installation.rst +++ b/docs/source/get_started/installation.rst @@ -66,6 +66,9 @@ If GPU support is required, then make sure CUDA is installed and then install th 2. pytorch - https://pytorch.org/get-started/locally/#start-locally 3. jax - https://github.com/google/jax#pip-installation-gpu-cuda +In :code:`zsh` square brackets are used for globbing/pattern matching. This means +you need to escape the square brackets in the above installation. You can do so by +including the dependencies in quotes like :code:`pip install --pre 'deepchem[jax]'` Google Colab ------------
deepchem/deepchem
22a8fbd7350540d6e0410223c0c75d744c241495
diff --git a/deepchem/data/tests/reaction_smiles.csv b/deepchem/data/tests/reaction_smiles.csv new file mode 100644 index 000000000..ce90ba563 --- /dev/null +++ b/deepchem/data/tests/reaction_smiles.csv @@ -0,0 +1,5 @@ +reactions +CCS(=O)(=O)Cl.OCCBr>CCN(CC)CC.CCOCC>CCS(=O)(=O)OCCBr +CC(C)CS(=O)(=O)Cl.OCCCl>CCN(CC)CC.CCOCC>CC(C)CS(=O)(=O)OCCCl +O=[N+]([O-])c1cccc2cnc(Cl)cc12>CC(=O)O.O.[Fe].[Na+].[OH-]>Nc1cccc2cnc(Cl)cc12 +Cc1cc2c([N+](=O)[O-])cccc2c[n+]1[O-].O=P(Cl)(Cl)Cl>>Cc1cc2c([N+](=O)[O-])cccc2c(Cl)n1 \ No newline at end of file diff --git a/deepchem/data/tests/test_shape.py b/deepchem/data/tests/test_shape.py index 346c7da31..aca120dbe 100644 --- a/deepchem/data/tests/test_shape.py +++ b/deepchem/data/tests/test_shape.py @@ -106,3 +106,29 @@ def test_disk_dataset_get_legacy_shape_multishard(): assert y_shape == (num_datapoints, num_tasks) assert w_shape == (num_datapoints, num_tasks) assert ids_shape == (num_datapoints,) + + +def test_get_shard_size(): + """ + Test that using ids for getting the shard size does not break the method. + The issue arises when attempting to load a dataset that does not have a labels + column. The create_dataset method of the DataLoader class sets the y to None + in this case, which causes the existing implementation of the get_shard_size() + method to fail, as it relies on the dataset having a not None y column. This + consequently breaks all methods depending on this, like the splitters for + example. + + Note + ---- + DiskDatasets without labels cannot be resharded! + """ + + current_dir = os.path.dirname(os.path.abspath(__file__)) + file_path = os.path.join(current_dir, "reaction_smiles.csv") + + featurizer = dc.feat.DummyFeaturizer() + loader = dc.data.CSVLoader( + tasks=[], feature_field="reactions", featurizer=featurizer) + + dataset = loader.create_dataset(file_path) + assert dataset.get_shard_size() == 4
Clarification for installation issues I was working with a new source install for deepchem following the new lightweight guide and tried ``` pip install -e .[jax] ``` And got the following error ``` zsh: no matches found: [jax] ``` I googled this and found https://stackoverflow.com/questions/30539798/zsh-no-matches-found-requestssecurity. The basic issue is we need to do something like ``` noglob pip install -e .[jax] ``` We should modify the install directions to clarify.
0.0
22a8fbd7350540d6e0410223c0c75d744c241495
[ "deepchem/data/tests/test_shape.py::test_get_shard_size" ]
[ "deepchem/data/tests/test_shape.py::test_numpy_dataset_get_shape", "deepchem/data/tests/test_shape.py::test_disk_dataset_get_shape_single_shard", "deepchem/data/tests/test_shape.py::test_disk_dataset_get_shape_multishard", "deepchem/data/tests/test_shape.py::test_disk_dataset_get_legacy_shape_single_shard", "deepchem/data/tests/test_shape.py::test_disk_dataset_get_legacy_shape_multishard" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2021-08-18 09:54:21+00:00
mit
1,863
deepchem__deepchem-2741
diff --git a/deepchem/dock/pose_generation.py b/deepchem/dock/pose_generation.py index 97af3f929..59af72747 100644 --- a/deepchem/dock/pose_generation.py +++ b/deepchem/dock/pose_generation.py @@ -5,10 +5,8 @@ import platform import logging import os import tempfile -import tarfile import numpy as np -from subprocess import call, Popen, PIPE -from subprocess import check_output +from subprocess import Popen, PIPE from typing import List, Optional, Tuple, Union from deepchem.dock.binding_pocket import BindingPocketFinder @@ -244,87 +242,50 @@ class VinaPoseGenerator(PoseGenerator): """Uses Autodock Vina to generate binding poses. This class uses Autodock Vina to make make predictions of - binding poses. It downloads the Autodock Vina executable for - your system to your specified DEEPCHEM_DATA_DIR (remember this - is an environment variable you set) and invokes the executable - to perform pose generation for you. + binding poses. + + Example + ------- + >> import deepchem as dc + >> vpg = dc.dock.VinaPoseGenerator(pocket_finder=None) + >> protein_file = '1jld_protein.pdb' + >> ligand_file = '1jld_ligand.sdf' + >> poses, scores = vpg.generate_poses( + .. (protein_file, ligand_file), + .. exhaustiveness=1, + .. num_modes=1, + .. out_dir=tmp, + .. generate_scores=True) Note ---- - This class requires RDKit to be installed. + This class requires RDKit and vina to be installed. """ - def __init__(self, - sixty_four_bits: bool = True, - pocket_finder: Optional[BindingPocketFinder] = None): + def __init__(self, pocket_finder: Optional[BindingPocketFinder] = None): """Initializes Vina Pose Generator Parameters ---------- - sixty_four_bits: bool, optional (default True) - Specifies whether this is a 64-bit machine. Needed to download - the correct executable. pocket_finder: BindingPocketFinder, optional (default None) If specified should be an instance of `dc.dock.BindingPocketFinder`. """ - data_dir = get_data_dir() - if platform.system() == 'Linux': - url = "http://vina.scripps.edu/download/autodock_vina_1_1_2_linux_x86.tgz" - filename = "autodock_vina_1_1_2_linux_x86.tgz" - dirname = "autodock_vina_1_1_2_linux_x86" - self.vina_dir = os.path.join(data_dir, dirname) - self.vina_cmd = os.path.join(self.vina_dir, "bin/vina") - elif platform.system() == 'Darwin': - if sixty_four_bits: - url = "http://vina.scripps.edu/download/autodock_vina_1_1_2_mac_64bit.tar.gz" - filename = "autodock_vina_1_1_2_mac_64bit.tar.gz" - dirname = "autodock_vina_1_1_2_mac_catalina_64bit" - else: - url = "http://vina.scripps.edu/download/autodock_vina_1_1_2_mac.tgz" - filename = "autodock_vina_1_1_2_mac.tgz" - dirname = "autodock_vina_1_1_2_mac" - self.vina_dir = os.path.join(data_dir, dirname) - self.vina_cmd = os.path.join(self.vina_dir, "bin/vina") - elif platform.system() == 'Windows': - url = "http://vina.scripps.edu/download/autodock_vina_1_1_2_win32.msi" - filename = "autodock_vina_1_1_2_win32.msi" - self.vina_dir = "\\Program Files (x86)\\The Scripps Research Institute\\Vina" - self.vina_cmd = os.path.join(self.vina_dir, "vina.exe") - else: - raise ValueError( - "Unknown operating system. Try using a cloud platform to run this code instead." - ) self.pocket_finder = pocket_finder - if not os.path.exists(self.vina_dir): - logger.info("Vina not available. Downloading") - download_url(url, data_dir) - downloaded_file = os.path.join(data_dir, filename) - logger.info("Downloaded Vina. Extracting") - if platform.system() == 'Windows': - msi_cmd = "msiexec /i %s" % downloaded_file - check_output(msi_cmd.split()) - else: - with tarfile.open(downloaded_file) as tar: - tar.extractall(data_dir) - logger.info("Cleanup: removing downloaded vina tar.gz") - os.remove(downloaded_file) - def generate_poses(self, - molecular_complex: Tuple[str, str], - centroid: Optional[np.ndarray] = None, - box_dims: Optional[np.ndarray] = None, - exhaustiveness: int = 10, - num_modes: int = 9, - num_pockets: Optional[int] = None, - out_dir: Optional[str] = None, - generate_scores: Optional[bool] = False - ) -> Union[Tuple[DOCKED_POSES, List[float]], DOCKED_POSES]: + def generate_poses( + self, + molecular_complex: Tuple[str, str], + centroid: Optional[np.ndarray] = None, + box_dims: Optional[np.ndarray] = None, + exhaustiveness: int = 10, + num_modes: int = 9, + num_pockets: Optional[int] = None, + out_dir: Optional[str] = None, + generate_scores: Optional[bool] = False, + **kwargs) -> Union[Tuple[DOCKED_POSES, List[float]], DOCKED_POSES]: """Generates the docked complex and outputs files for docked complex. - TODO: How can this work on Windows? We need to install a .msi file and - invoke it correctly from Python for this to work. - Parameters ---------- molecular_complexes: Tuple[str, str] @@ -337,8 +298,9 @@ class VinaPoseGenerator(PoseGenerator): A numpy array of shape `(3,)` holding the size of the box to dock. If not specified is set to size of molecular complex plus 5 angstroms. exhaustiveness: int, optional (default 10) - Tells Autodock Vina how exhaustive it should be with pose - generation. + Tells Autodock Vina how exhaustive it should be with pose generation. A + higher value of exhaustiveness implies more computation effort for the + docking experiment. num_modes: int, optional (default 9) Tells Autodock Vina how many binding modes it should generate at each invocation. @@ -352,6 +314,9 @@ class VinaPoseGenerator(PoseGenerator): If `True`, the pose generator will return scores for complexes. This is used typically when invoking external docking programs that compute scores. + kwargs: + Any args supported by VINA as documented in + https://autodock-vina.readthedocs.io/en/latest/vina.html Returns ------- @@ -365,6 +330,28 @@ class VinaPoseGenerator(PoseGenerator): ------ `ValueError` if `num_pockets` is set but `self.pocket_finder is None`. """ + if "cpu" in kwargs: + cpu = kwargs["cpu"] + else: + cpu = 0 + if "min_rmsd" in kwargs: + min_rmsd = kwargs["min_rmsd"] + else: + min_rmsd = 1.0 + if "max_evals" in kwargs: + max_evals = kwargs["max_evals"] + else: + max_evals = 0 + if "energy_range" in kwargs: + energy_range = kwargs["energy_range"] + else: + energy_range = 3.0 + + try: + from vina import Vina + except ModuleNotFoundError: + raise ImportError("This function requires vina to be installed") + if out_dir is None: out_dir = tempfile.mkdtemp() @@ -435,6 +422,7 @@ class VinaPoseGenerator(PoseGenerator): docked_complexes = [] all_scores = [] + vpg = Vina(sf_name='vina', cpu=cpu, seed=0, no_refine=False, verbosity=1) for i, (protein_centroid, box_dims) in enumerate( zip(centroids, dimensions)): logger.info("Docking in pocket %d/%d" % (i + 1, len(centroids))) @@ -451,23 +439,25 @@ class VinaPoseGenerator(PoseGenerator): num_modes=num_modes, exhaustiveness=exhaustiveness) - # Define locations of log and output files - log_file = os.path.join(out_dir, "%s_log.txt" % ligand_name) + # Define locations of output files out_pdbqt = os.path.join(out_dir, "%s_docked.pdbqt" % ligand_name) logger.info("About to call Vina") - if platform.system() == 'Windows': - args = [ - self.vina_cmd, "--config", conf_file, "--log", log_file, "--out", - out_pdbqt - ] - else: - # I'm not sure why specifying the args as a list fails on other platforms, - # but for some reason it only works if I pass it as a string. - # FIXME: Incompatible types in assignment - args = "%s --config %s --log %s --out %s" % ( # type: ignore - self.vina_cmd, conf_file, log_file, out_pdbqt) - # FIXME: We should use `subprocess.run` instead of `call` - call(args, shell=True) + + vpg.set_receptor(protein_pdbqt) + vpg.set_ligand_from_file(ligand_pdbqt) + + vpg.compute_vina_maps(center=protein_centroid, box_size=box_dims) + vpg.dock( + exhaustiveness=exhaustiveness, + n_poses=num_modes, + min_rmsd=min_rmsd, + max_evals=max_evals) + vpg.write_poses( + out_pdbqt, + n_poses=num_modes, + energy_range=energy_range, + overwrite=True) + ligands, scores = load_docked_ligands(out_pdbqt) docked_complexes += [(protein_mol[1], ligand) for ligand in ligands] all_scores += scores diff --git a/env.common.yml b/env.common.yml index 46417eeb3..c94d13b49 100644 --- a/env.common.yml +++ b/env.common.yml @@ -30,3 +30,4 @@ dependencies: - transformers==4.6.* - xgboost==1.* - git+https://github.com/samoturk/mol2vec + - vina diff --git a/requirements/env_common.yml b/requirements/env_common.yml index b1c6868df..45f78aac5 100644 --- a/requirements/env_common.yml +++ b/requirements/env_common.yml @@ -1,6 +1,5 @@ name: deepchem channels: - - omnia - conda-forge - defaults dependencies: @@ -24,3 +23,4 @@ dependencies: - transformers==4.6.* - xgboost==1.* - git+https://github.com/samoturk/mol2vec + - vina
deepchem/deepchem
7740d91e185b411c65b06c5d3aea647b0b6dee66
diff --git a/deepchem/dock/tests/test_pose_generation.py b/deepchem/dock/tests/test_pose_generation.py index 79b21d667..66387f367 100644 --- a/deepchem/dock/tests/test_pose_generation.py +++ b/deepchem/dock/tests/test_pose_generation.py @@ -19,7 +19,6 @@ class TestPoseGeneration(unittest.TestCase): Does sanity checks on pose generation. """ - @unittest.skipIf(IS_WINDOWS, 'Skip the test on Windows') def test_vina_initialization(self): """Test that VinaPoseGenerator can be initialized.""" dc.dock.VinaPoseGenerator() @@ -29,7 +28,6 @@ class TestPoseGeneration(unittest.TestCase): """Test that GninaPoseGenerator can be initialized.""" dc.dock.GninaPoseGenerator() - @unittest.skipIf(IS_WINDOWS, 'Skip the test on Windows') def test_pocket_vina_initialization(self): """Test that VinaPoseGenerator can be initialized.""" pocket_finder = dc.dock.ConvexHullPocketFinder()
Error in intializing VinaPoseGenerator ## 🐛 Bug ## To Reproduce Steps to reproduce the behavior: 1. Install deepchem latest version in colab `pip install --pre deepchem` 2. Run the following code sample: ``` import deepchem as dc vpg = dc.dock.VinaPoseGenerator() ``` The above raises a`SSLCertVerificationError` but it is expected to initialize `vpg`. There are two points regarding this: - The download location of autodock vina executables was updated from the side of Vina team. Previously, DeepChem referenced them from [here](http://vina.scripps.edu/download/autodock_vina_1_1_2_mac_64bit.tar.gz) but now it is referenced from [here](https://vina.scripps.edu/wp-content/uploads/sites/55/2020/12/autodock_vina_1_1_2_mac_64bit.tar.gz) - There is some problem in the server side which is causing `SSLCertVerificationError`, probably an expired SSL Certificate. Some possible fixes: - Move the executables to DeepChem's infrastructure - Upgrade to the latest version of Autodock vina - 1.2.2
0.0
7740d91e185b411c65b06c5d3aea647b0b6dee66
[ "deepchem/dock/tests/test_pose_generation.py::TestPoseGeneration::test_gnina_initialization", "deepchem/dock/tests/test_pose_generation.py::TestPoseGeneration::test_pocket_vina_initialization", "deepchem/dock/tests/test_pose_generation.py::TestPoseGeneration::test_vina_initialization" ]
[]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2021-11-04 16:57:48+00:00
mit
1,864
deepchem__deepchem-2802
diff --git a/deepchem/data/datasets.py b/deepchem/data/datasets.py index f80a399ca..dd5ba637f 100644 --- a/deepchem/data/datasets.py +++ b/deepchem/data/datasets.py @@ -2286,6 +2286,7 @@ class DiskDataset(Dataset): basename = "shard-%d" % shard_num DiskDataset.write_data_to_disk(self.data_dir, basename, X, y, w, ids) self._cached_shards = None + self.legacy_metadata = True def select(self, indices: Sequence[int],
deepchem/deepchem
9ef6c58eefd4e5f9bee40743ca14defa6f764f80
diff --git a/deepchem/data/tests/test_setshard.py b/deepchem/data/tests/test_setshard.py new file mode 100644 index 000000000..0fcf4b03e --- /dev/null +++ b/deepchem/data/tests/test_setshard.py @@ -0,0 +1,21 @@ +import deepchem as dc +import numpy as np + + +def test_setshard_with_X_y(): + """Test setsharding on a simple example""" + X = np.random.rand(10, 3) + y = np.random.rand(10,) + dataset = dc.data.DiskDataset.from_numpy(X, y) + X_shape, y_shape, _, _ = dataset.get_shape() + assert X_shape[0] == 10 + assert y_shape[0] == 10 + for i, (X, y, w, ids) in enumerate(dataset.itershards()): + X = X[1:] + y = y[1:] + w = w[1:] + ids = ids[1:] + dataset.set_shard(i, X, y, w, ids) + X_shape, y_shape, _, _ = dataset.get_shape() + assert X_shape[0] == 9 + assert y_shape[0] == 9
Bug in dataset.get_shape() when used after dataset.set_shard() ## 🐛 Bug ## To Reproduce <!-- If you have a code sample, error messages, stack traces, please provide it here as well. --> ## Expected behavior ``` import deepchem as dc import numpy as np X = np.random.randn(10, 3) y = np.random.randn(10) dataset = dc.data.DiskDataset.from_numpy(X, y) dataset.get_shape() # Output: ((10, 3), (10,), (10,), (10,)) for i, (X, y, w, ids) in enumerate(dataset.itershards()): X = X[1:] y = y[1:] w = w[1:] ids = ids[1:] dataset.set_shard(i, X, y, w, ids) dataset.get_shape() # Output: ((10, 3), (10,), (10,), (10,)) # Expected output: ((9, 3), (9, ), (9, ), (9,)) ``` Edit 1: This prints correctly: ``` for i, (X, y, w, ids) in enumerate(dataset.itershards()): print (X.shape) # Output: (9, 3) ``` ## Environment * DeepChem version: 2.6.0.dev ## Additional context The fix is probably a simple one.
0.0
9ef6c58eefd4e5f9bee40743ca14defa6f764f80
[ "deepchem/data/tests/test_setshard.py::test_setshard_with_X_y" ]
[]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2022-01-01 16:38:29+00:00
mit
1,865
deepchem__deepchem-2979
diff --git a/deepchem/feat/graph_data.py b/deepchem/feat/graph_data.py index b9d037e95..000b4d750 100644 --- a/deepchem/feat/graph_data.py +++ b/deepchem/feat/graph_data.py @@ -69,7 +69,9 @@ class GraphData: raise ValueError('edge_index.dtype must contains integers.') elif edge_index.shape[0] != 2: raise ValueError('The shape of edge_index is [2, num_edges].') - elif np.max(edge_index) >= len(node_features): + + # np.max() method works only for a non-empty array, so size of the array should be non-zero + elif (edge_index.size != 0) and (np.max(edge_index) >= len(node_features)): raise ValueError('edge_index contains the invalid node number.') if edge_features is not None:
deepchem/deepchem
ba780d3d21013b2924fd3301913ff530939a2ccb
diff --git a/deepchem/feat/tests/test_graph_data.py b/deepchem/feat/tests/test_graph_data.py index 4f28809c0..1d13cc76b 100644 --- a/deepchem/feat/tests/test_graph_data.py +++ b/deepchem/feat/tests/test_graph_data.py @@ -20,12 +20,11 @@ class TestGraph(unittest.TestCase): # z is kwargs z = np.random.random(5) - graph = GraphData( - node_features=node_features, - edge_index=edge_index, - edge_features=edge_features, - node_pos_features=node_pos_features, - z=z) + graph = GraphData(node_features=node_features, + edge_index=edge_index, + edge_features=edge_features, + node_pos_features=node_pos_features, + z=z) assert graph.num_nodes == num_nodes assert graph.num_node_features == num_node_features @@ -97,13 +96,12 @@ class TestGraph(unittest.TestCase): ] graph_list = [ - GraphData( - node_features=np.random.random_sample((num_nodes_list[i], - num_node_features)), - edge_index=edge_index_list[i], - edge_features=np.random.random_sample((num_edge_list[i], - num_edge_features)), - node_pos_features=None) for i in range(len(num_edge_list)) + GraphData(node_features=np.random.random_sample( + (num_nodes_list[i], num_node_features)), + edge_index=edge_index_list[i], + edge_features=np.random.random_sample( + (num_edge_list[i], num_edge_features)), + node_pos_features=None) for i in range(len(num_edge_list)) ] batch = BatchGraphData(graph_list) @@ -112,3 +110,22 @@ class TestGraph(unittest.TestCase): assert batch.num_edges == sum(num_edge_list) assert batch.num_edge_features == num_edge_features assert batch.graph_index.shape == (sum(num_nodes_list),) + + @pytest.mark.torch + def test_graph_data_single_atom_mol(self): + """ + Test for graph data when no edges in the graph (example: single atom mol) + """ + num_nodes, num_node_features = 1, 32 + num_edges = 0 + node_features = np.random.random_sample((num_nodes, num_node_features)) + edge_index = np.empty((2, 0), dtype=int) + + graph = GraphData(node_features=node_features, edge_index=edge_index) + + assert graph.num_nodes == num_nodes + assert graph.num_node_features == num_node_features + assert graph.num_edges == num_edges + assert str( + graph + ) == 'GraphData(node_features=[1, 32], edge_index=[2, 0], edge_features=None)'
GraphData class not working for single atom mols ## 🐛 Bug `GraphData` class checks if the `edge_index` contains the invalid node number, using the condition `np.max(edge_index) >= len(node_features)`. In case of single atom mols, `edge_index` in an empty array of `shape = (2, 0)` and np.max() method raises error for empty array : `Error: zero-size array to reduction operation maximum which has no identity`. ## To Reproduce Steps to reproduce the behaviour: code to check the error: ``` num_nodes, num_node_features = 1, 32 num_edges = 0 node_features = np.random.random_sample((num_nodes, num_node_features)) edge_index = np.empty((2, 0), dtype=int) graph = GraphData(node_features=node_features, edge_index=edge_index) assert graph.num_nodes == num_nodes assert graph.num_edges == num_edges assert str(graph) == 'GraphData(node_features=[1, 32], edge_index=[2, 0], edge_features=None)' ``` error message: `py::TestGraph::test_graph_data_single_atom_mol Failed with Error: zero-size array to reduction operation maximum which has no identity` ## Expected behaviour No error should have raised and `str(graph)` should return `'GraphData(node_features=[1, 32], edge_index=[2, 0], edge_features=None)'` ## Environment * OS: Ubuntu 20.04.3 LTS * Python version: Python 3.8.8 * DeepChem version: 2.6.1 * RDKit version (optional): * TensorFlow version (optional): * PyTorch version (optional): * Any other relevant information: NA ## Additional context This is how Deepchem generally computes edge index: ``` # construct edge (bond) index src, dest = [], [] for bond in datapoint.GetBonds(): # add edge list considering a directed graph start, end = bond.GetBeginAtomIdx(), bond.GetEndAtomIdx() src += [start, end] dest += [end, start] ```
0.0
ba780d3d21013b2924fd3301913ff530939a2ccb
[ "deepchem/feat/tests/test_graph_data.py::TestGraph::test_graph_data_single_atom_mol" ]
[ "deepchem/feat/tests/test_graph_data.py::TestGraph::test_batch_graph_data", "deepchem/feat/tests/test_graph_data.py::TestGraph::test_invalid_graph_data" ]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2022-07-06 08:15:57+00:00
mit
1,866
deepset-ai__haystack-6594
diff --git a/haystack/components/writers/document_writer.py b/haystack/components/writers/document_writer.py index f4debb17..170ee24d 100644 --- a/haystack/components/writers/document_writer.py +++ b/haystack/components/writers/document_writer.py @@ -15,11 +15,15 @@ class DocumentWriter: A component for writing documents to a DocumentStore. """ - def __init__(self, document_store: DocumentStore, policy: DuplicatePolicy = DuplicatePolicy.FAIL): + def __init__(self, document_store: DocumentStore, policy: DuplicatePolicy = DuplicatePolicy.NONE): """ Create a DocumentWriter component. - :param policy: The policy to use when encountering duplicate documents (default is DuplicatePolicy.FAIL). + :param policy: the policy to apply when a Document with the same id already exists in the DocumentStore. + - `DuplicatePolicy.NONE`: Default policy, behaviour depends on the Document Store. + - `DuplicatePolicy.SKIP`: If a Document with the same id already exists, it is skipped and not written. + - `DuplicatePolicy.OVERWRITE`: If a Document with the same id already exists, it is overwritten. + - `DuplicatePolicy.FAIL`: If a Document with the same id already exists, an error is raised. """ self.document_store = document_store self.policy = policy diff --git a/haystack/core/component/connection.py b/haystack/core/component/connection.py index c84c9b5b..c3118aa4 100644 --- a/haystack/core/component/connection.py +++ b/haystack/core/component/connection.py @@ -116,21 +116,24 @@ class Connection: name_matches = [ (out_sock, in_sock) for out_sock, in_sock in possible_connections if in_sock.name == out_sock.name ] - if len(name_matches) != 1: - # TODO allow for multiple connections at once if there is no ambiguity? - # TODO give priority to sockets that have no default values? - connections_status_str = _connections_status( - sender_node=sender_node, - sender_sockets=sender_sockets, - receiver_node=receiver_node, - receiver_sockets=receiver_sockets, - ) - raise PipelineConnectError( - f"Cannot connect '{sender_node}' with '{receiver_node}': more than one connection is possible " - "between these components. Please specify the connection name, like: " - f"pipeline.connect('{sender_node}.{possible_connections[0][0].name}', " - f"'{receiver_node}.{possible_connections[0][1].name}').\n{connections_status_str}" - ) + if len(name_matches) == 1: + # Sockets match by type and name, let's use this + return Connection(sender_node, name_matches[0][0], receiver_node, name_matches[0][1]) + + # TODO allow for multiple connections at once if there is no ambiguity? + # TODO give priority to sockets that have no default values? + connections_status_str = _connections_status( + sender_node=sender_node, + sender_sockets=sender_sockets, + receiver_node=receiver_node, + receiver_sockets=receiver_sockets, + ) + raise PipelineConnectError( + f"Cannot connect '{sender_node}' with '{receiver_node}': more than one connection is possible " + "between these components. Please specify the connection name, like: " + f"pipeline.connect('{sender_node}.{possible_connections[0][0].name}', " + f"'{receiver_node}.{possible_connections[0][1].name}').\n{connections_status_str}" + ) match = possible_connections[0] return Connection(sender_node, match[0], receiver_node, match[1]) diff --git a/releasenotes/notes/document-writer-default-policy-693027781629fc73.yaml b/releasenotes/notes/document-writer-default-policy-693027781629fc73.yaml new file mode 100644 index 00000000..b90629fe --- /dev/null +++ b/releasenotes/notes/document-writer-default-policy-693027781629fc73.yaml @@ -0,0 +1,6 @@ +--- +enhancements: + - | + Change `DocumentWriter` default `policy` from `DuplicatePolicy.FAIL` to `DuplicatePolicy.NONE`. + The `DocumentStore` protocol uses the same default so that different Document Stores can choose + the default policy that better fit. diff --git a/releasenotes/notes/fix-connect-with-same-name-5ce470f7f0451362.yaml b/releasenotes/notes/fix-connect-with-same-name-5ce470f7f0451362.yaml new file mode 100644 index 00000000..529cd69a --- /dev/null +++ b/releasenotes/notes/fix-connect-with-same-name-5ce470f7f0451362.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fix `Pipeline.connect()` so it connects sockets with same name if multiple sockets with compatible types are found.
deepset-ai/haystack
f877704839dc585cf47305d97fd5011be367b907
diff --git a/test/components/writers/test_document_writer.py b/test/components/writers/test_document_writer.py index 9858538f..623d5ee5 100644 --- a/test/components/writers/test_document_writer.py +++ b/test/components/writers/test_document_writer.py @@ -16,7 +16,7 @@ class TestDocumentWriter: "type": "haystack.components.writers.document_writer.DocumentWriter", "init_parameters": { "document_store": {"type": "haystack.testing.factory.MockedDocumentStore", "init_parameters": {}}, - "policy": "FAIL", + "policy": "NONE", }, } diff --git a/test/core/pipeline/test_connections.py b/test/core/pipeline/test_connections.py index ba4d70ca..a28a038a 100644 --- a/test/core/pipeline/test_connections.py +++ b/test/core/pipeline/test_connections.py @@ -386,3 +386,18 @@ def test_parse_connection(): assert parse_connect_string("foobar") == ("foobar", None) assert parse_connect_string("foo.bar") == ("foo", "bar") assert parse_connect_string("foo.bar.baz") == ("foo", "bar.baz") + + +def test_connect_with_same_socket_names(): + SimpleComponent = factory.component_class("SimpleComponent", output_types={"documents": List}) + ComponentWithMultipleInputs = factory.component_class( + "ComponentWithMultipleInputs", input_types={"question": Any, "documents": Any} + ) + + pipe = Pipeline() + pipe.add_component("simple", SimpleComponent()) + pipe.add_component("multiple", ComponentWithMultipleInputs()) + + pipe.connect("simple", "multiple") + + assert list(pipe.graph.edges) == [("simple", "multiple", "documents/documents")]
Auto-connect between pipeline components intermittently failing **Describe the bug** The connections between components when using the `.connect()` method of a pipeline are non-deterministic. We did find that *explicitly* defining the connection (as showcased in the documentation found [here](https://docs.haystack.deepset.ai/v2.0/docs/transformerssimilarityranker)) worked to resolve this issue, however it seems like it might be possible to ensure that if there *are* default connections that share a name, they be preferentially connected during graph construction. Hopefully all this makes sense - if not, I'm happy to follow-up! **Error message** There is no specific error. **Expected behavior** The logic should not connect two components by incompatible IDs or should not default to a random selection/decision. **Additional context** Creating connections like this will lead to a semi-random incidence of the pipeline graph being constructed incorrectly: ```python pipeline.connect("tgi_fetcher", "tgi_converter") pipeline.connect("tgi_converter", "tgi_splitter") pipeline.connect("tgi_splitter", "tgi_ranker") pipeline.connect("tgi_ranker", "tgi_prompt_builder") pipeline.connect("tgi_prompt_builder", "tgi_llm") ``` ![image](https://i.imgur.com/zUBwJaB.png) As you can hopefully see, the output of `ranker` (documents) is being connected to the `question` input of the `prompt_builder`. This is despite the fact that the `prompt_builder` has a `documents` input. You can get around the error by keying `documents` in your input - and swapping any potential prompt-templates, but this seems like undesirable behaviour. ```python pipeline.connect("tgi_fetcher", "tgi_converter") pipeline.connect("tgi_converter", "tgi_splitter") pipeline.connect("tgi_splitter", "tgi_ranker") pipeline.connect("tgi_ranker.documents", "tgi_prompt_builder.documents") pipeline.connect("tgi_prompt_builder", "tgi_llm") ``` **To Reproduce** ```python prompt_template = """ According to these documents: {% for doc in documents %} {{ doc.content }} {% endfor %} Answer the given question: {{question}} Answer: """ prompt_builder = PromptBuilder(template=prompt_template) fetcher = LinkContentFetcher() converter = HTMLToDocument() splitter = DocumentSplitter(split_length=100, split_overlap=5) llm = GPTGenerator(api_key = openai_api_key, model_name = "gpt-4") ranker = TransformersSimilarityRanker() pipeline = Pipeline() pipeline.add_component(name="fetcher", instance=fetcher) pipeline.add_component(name="converter", instance=converter) pipeline.add_component(name="splitter", instance=splitter) pipeline.add_component(name="ranker", instance=ranker) pipeline.add_component(name="prompt_builder", instance=prompt_builder) pipeline.add_component(name="llm", instance=llm) pipeline.connect("fetcher", "converter") pipeline.connect("converter", "splitter") pipeline.connect("splitter", "ranker") pipeline.connect("ranker", "prompt_builder") pipeline.connect("prompt_builder", "llm") question = "What is our favorite animal?" result = pipeline.run({"prompt_builder": {"question": question}, "ranker": {"query": question}, "fetcher": {"urls": ["https://haystack.deepset.ai/advent-of-haystack/day-1#challenge"]}}) print(result['llm']['replies'][0]) ``` **FAQ Check** - [x ] Have you had a look at [our new FAQ page](https://docs.haystack.deepset.ai/docs/faq)? **System:** - OS: Linux - GPU/CPU: CPU - Haystack version (commit or version number): 2.0.0b2 - DocumentStore: N/A - Reader: N/A - Retriever: N/A
0.0
f877704839dc585cf47305d97fd5011be367b907
[ "test/components/writers/test_document_writer.py::TestDocumentWriter::test_to_dict", "test/core/pipeline/test_connections.py::test_connect_with_same_socket_names" ]
[ "[", "test/components/writers/test_document_writer.py::TestDocumentWriter::test_to_dict_with_custom_init_parameters", "test/components/writers/test_document_writer.py::TestDocumentWriter::test_from_dict", "test/components/writers/test_document_writer.py::TestDocumentWriter::test_from_dict_without_docstore", "test/components/writers/test_document_writer.py::TestDocumentWriter::test_from_dict_without_docstore_type", "test/components/writers/test_document_writer.py::TestDocumentWriter::test_from_dict_nonexisting_docstore", "test/components/writers/test_document_writer.py::TestDocumentWriter::test_run", "test/components/writers/test_document_writer.py::TestDocumentWriter::test_run_skip_policy", "test/core/pipeline/test_connections.py::test_connect_compatible_types[same-primitives]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-primitive-is-optional]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-type-is-union-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[identical-unions]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-union-is-superset-of-sender]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[primitive-to-any]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[same-class]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-class-is-optional]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[class-to-any]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[subclass-to-class]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-type-is-union-of-classes]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-type-is-union-of-superclasses]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[same-lists]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[receiving-list-is-optional]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[list-of-primitive-to-list-of-any]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[list-of-same-classes]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[list-of-subclass-to-list-of-class]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[list-of-classes-to-list-of-any]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-same-primitives]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-primitives-to-nested-sequences-of-any]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-same-classes]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-subclasses-to-nested-sequences-of-classes]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-sequences-of-classes-to-nested-sequences-of-any]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[same-dicts-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-primitives-to-dict-of-any-keys]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-primitives-to-dict-of-any-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-primitives-to-dict-of-any-key-and-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[same-dicts-of-classes-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-subclasses-to-dict-of-classes]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-classes-to-dict-of-any-keys]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-classes-to-dict-of-any-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[dict-of-classes-to-dict-of-any-key-and-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mappings-of-same-primitives]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-primitives-to-nested-mapping-of-any-keys]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-primitives-to-nested-mapping-of-higher-level-any-keys]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-primitives-to-nested-mapping-of-any-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-primitives-to-nested-mapping-of-any-keys-and-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mappings-of-same-classes]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-subclasses-to-nested-mapping-of-classes]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-classes-to-nested-mapping-of-any-keys]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-classes-to-nested-mapping-of-higher-level-any-keys]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-classes-to-nested-mapping-of-any-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[nested-mapping-of-classes-to-nested-mapping-of-any-keys-and-values]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[same-primitive-literal]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[same-enum-literal]", "test/core/pipeline/test_connections.py::test_connect_compatible_types[identical-deeply-nested-complex-type]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[class-to-subclass]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[any-to-primitive]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[any-to-class]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-primitive-is-optional]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-class-is-optional]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-list-is-optional]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-type-is-union]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[sending-union-is-superset-of-receiver]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[partially-overlapping-unions-with-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[partially-overlapping-unions-with-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-lists-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[list-of-primitive-to-bare-list]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[list-of-primitive-to-list-object]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-lists-of-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[lists-of-classes-to-subclasses]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[list-of-any-to-list-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[list-of-any-to-list-of-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-sequences-of-different-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-nested-sequences-of-same-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-sequences-of-different-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-sequences-of-classes-to-subclasses]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-nested-sequences-of-same-class]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-list-of-Any-to-nested-list-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-list-of-Any-to-nested-list-of-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-dict-of-primitive-keys]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-dict-of-primitive-values]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-dict-of-class-values]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-dict-of-class-to-subclass-values]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-keys-to-dict-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-values-to-dict-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-values-to-dict-of-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-keys-and-values-to-dict-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[dict-of-Any-keys-and-values-to-dict-of-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-nested-mappings-of-same-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-different-primitive-keys]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-different-higer-level-primitive-keys]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-different-primitive-values]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-different-class-values]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[same-nested-mappings-of-class-to-subclass-values]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-keys-to-nested-mapping-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-higher-level-Any-keys-to-nested-mapping-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-values-to-nested-mapping-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-values-to-nested-mapping-of-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-keys-and-values-to-nested-mapping-of-primitives]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[nested-mapping-of-Any-keys-and-values-to-nested-mapping-of-classes]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-literal-of-same-primitive]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[subset-literal]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[different-literal-of-same-enum]", "test/core/pipeline/test_connections.py::test_connect_non_compatible_types[deeply-nested-complex-type-is-compatible-but-cannot-be-checked]", "test/core/pipeline/test_connections.py::test_connect_sender_component_does_not_exist", "test/core/pipeline/test_connections.py::test_connect_receiver_component_does_not_exist", "test/core/pipeline/test_connections.py::test_connect_sender_socket_does_not_exist", "test/core/pipeline/test_connections.py::test_connect_receiver_socket_does_not_exist", "test/core/pipeline/test_connections.py::test_connect_many_outputs_to_the_same_input", "test/core/pipeline/test_connections.py::test_connect_many_connections_possible_name_matches", "test/core/pipeline/test_connections.py::test_connect_many_connections_possible_no_name_matches", "test/core/pipeline/test_connections.py::test_parse_connection" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_media", "has_added_files", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2023-12-19 15:44:45+00:00
apache-2.0
1,867
deepset-ai__haystack-6717
diff --git a/haystack/core/component/component.py b/haystack/core/component/component.py index 4a082873..7d5eb00d 100644 --- a/haystack/core/component/component.py +++ b/haystack/core/component/component.py @@ -139,7 +139,10 @@ class ComponentMeta(type): instance.__canals_input__ = {} run_signature = inspect.signature(getattr(cls, "run")) for param in list(run_signature.parameters)[1:]: # First is 'self' and it doesn't matter. - if run_signature.parameters[param].kind == inspect.Parameter.POSITIONAL_OR_KEYWORD: # ignore `**kwargs` + if run_signature.parameters[param].kind not in ( + inspect.Parameter.VAR_POSITIONAL, + inspect.Parameter.VAR_KEYWORD, + ): # ignore variable args socket_kwargs = {"name": param, "type": run_signature.parameters[param].annotation} if run_signature.parameters[param].default != inspect.Parameter.empty: socket_kwargs["default_value"] = run_signature.parameters[param].default diff --git a/haystack/document_stores/in_memory/document_store.py b/haystack/document_stores/in_memory/document_store.py index 027e9c4b..44b2f6d5 100644 --- a/haystack/document_stores/in_memory/document_store.py +++ b/haystack/document_stores/in_memory/document_store.py @@ -212,8 +212,11 @@ class InMemoryDocumentStore: return_documents = [] for i in top_docs_positions: doc = all_documents[i] + score = docs_scores[i] + if score <= 0.0: + continue doc_fields = doc.to_dict() - doc_fields["score"] = docs_scores[i] + doc_fields["score"] = score return_document = Document.from_dict(doc_fields) return_documents.append(return_document) return return_documents diff --git a/releasenotes/notes/component-kw-only-run-args-eedee8907232d2d4.yaml b/releasenotes/notes/component-kw-only-run-args-eedee8907232d2d4.yaml new file mode 100644 index 00000000..68ef50fb --- /dev/null +++ b/releasenotes/notes/component-kw-only-run-args-eedee8907232d2d4.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fix ComponentMeta ignoring keyword-only parameters in the `run` method. ComponentMeta.__call__ handles the creation of InputSockets for the component's inputs when the latter has not explicitly called _Component.set_input_types(). This logic was not correctly handling keyword-only parameters. diff --git a/releasenotes/notes/inmemorybm25retriever-zero-score-docs-67406062a76aa7f4.yaml b/releasenotes/notes/inmemorybm25retriever-zero-score-docs-67406062a76aa7f4.yaml new file mode 100644 index 00000000..3ae44016 --- /dev/null +++ b/releasenotes/notes/inmemorybm25retriever-zero-score-docs-67406062a76aa7f4.yaml @@ -0,0 +1,3 @@ +--- +fixes: + - Prevent InMemoryBM25Retriever from returning documents with a score of 0.0.
deepset-ai/haystack
0616197b44ae95da03aad7e5ac3997b243bd735d
diff --git a/test/components/retrievers/test_in_memory_bm25_retriever.py b/test/components/retrievers/test_in_memory_bm25_retriever.py index db5e82a3..4c1df2f2 100644 --- a/test/components/retrievers/test_in_memory_bm25_retriever.py +++ b/test/components/retrievers/test_in_memory_bm25_retriever.py @@ -113,15 +113,14 @@ class TestMemoryBM25Retriever: InMemoryBM25Retriever.from_dict(data) def test_retriever_valid_run(self, mock_docs): - top_k = 5 ds = InMemoryDocumentStore() ds.write_documents(mock_docs) - retriever = InMemoryBM25Retriever(ds, top_k=top_k) + retriever = InMemoryBM25Retriever(ds, top_k=5) result = retriever.run(query="PHP") assert "documents" in result - assert len(result["documents"]) == top_k + assert len(result["documents"]) == 1 assert result["documents"][0].content == "PHP is a popular programming language" def test_invalid_run_wrong_store_type(self): @@ -174,5 +173,5 @@ class TestMemoryBM25Retriever: assert "retriever" in result results_docs = result["retriever"]["documents"] assert results_docs - assert len(results_docs) == top_k + assert len(results_docs) == 1 assert results_docs[0].content == query_result diff --git a/test/core/component/test_component.py b/test/core/component/test_component.py index cba6fc42..f2835e62 100644 --- a/test/core/component/test_component.py +++ b/test/core/component/test_component.py @@ -176,3 +176,17 @@ def test_input_has_default_value(): comp = MockComponent() assert comp.__canals_input__["value"].default_value == 42 assert not comp.__canals_input__["value"].is_mandatory + + +def test_keyword_only_args(): + @component + class MockComponent: + def __init__(self): + component.set_output_types(self, value=int) + + def run(self, *, arg: int): + return {"value": arg} + + comp = MockComponent() + component_inputs = {name: {"type": socket.type} for name, socket in comp.__canals_input__.items()} + assert component_inputs == {"arg": {"type": int}} diff --git a/test/document_stores/test_in_memory.py b/test/document_stores/test_in_memory.py index 1d3a3613..9ebcae41 100644 --- a/test/document_stores/test_in_memory.py +++ b/test/document_stores/test_in_memory.py @@ -5,8 +5,8 @@ import pandas as pd import pytest from haystack import Document -from haystack.document_stores.in_memory import InMemoryDocumentStore from haystack.document_stores.errors import DocumentStoreError, DuplicateDocumentError +from haystack.document_stores.in_memory import InMemoryDocumentStore from haystack.testing.document_store import DocumentStoreBaseTests @@ -17,7 +17,7 @@ class TestMemoryDocumentStore(DocumentStoreBaseTests): # pylint: disable=R0904 @pytest.fixture def document_store(self) -> InMemoryDocumentStore: - return InMemoryDocumentStore() + return InMemoryDocumentStore(bm25_algorithm="BM25L") def test_to_dict(self): store = InMemoryDocumentStore() @@ -73,7 +73,6 @@ class TestMemoryDocumentStore(DocumentStoreBaseTests): # pylint: disable=R0904 document_store.write_documents(docs) def test_bm25_retrieval(self, document_store: InMemoryDocumentStore): - document_store = InMemoryDocumentStore() # Tests if the bm25_retrieval method returns the correct document based on the input query. docs = [Document(content="Hello world"), Document(content="Haystack supports multiple languages")] document_store.write_documents(docs) @@ -106,7 +105,7 @@ class TestMemoryDocumentStore(DocumentStoreBaseTests): # pylint: disable=R0904 document_store.write_documents(docs) # top_k = 2 - results = document_store.bm25_retrieval(query="languages", top_k=2) + results = document_store.bm25_retrieval(query="language", top_k=2) assert len(results) == 2 # top_k = 3 @@ -141,7 +140,7 @@ class TestMemoryDocumentStore(DocumentStoreBaseTests): # pylint: disable=R0904 document_store.write_documents(docs) results = document_store.bm25_retrieval(query="Python", top_k=1) - assert len(results) == 1 + assert len(results) == 0 document_store.write_documents([Document(content="Python is a popular programming language")]) results = document_store.bm25_retrieval(query="Python", top_k=1) @@ -199,10 +198,10 @@ class TestMemoryDocumentStore(DocumentStoreBaseTests): # pylint: disable=R0904 docs = [Document(), Document(content="Gardening"), Document(content="Bird watching")] document_store.write_documents(docs) results = document_store.bm25_retrieval(query="doesn't matter, top_k is 10", top_k=10) - assert len(results) == 2 + assert len(results) == 0 def test_bm25_retrieval_with_filters(self, document_store: InMemoryDocumentStore): - selected_document = Document(content="Gardening", meta={"selected": True}) + selected_document = Document(content="Java is, well...", meta={"selected": True}) docs = [Document(), selected_document, Document(content="Bird watching")] document_store.write_documents(docs) results = document_store.bm25_retrieval(query="Java", top_k=10, filters={"selected": True}) @@ -224,10 +223,10 @@ class TestMemoryDocumentStore(DocumentStoreBaseTests): # pylint: disable=R0904 assert results[0].id == document.id def test_bm25_retrieval_with_documents_with_mixed_content(self, document_store: InMemoryDocumentStore): - double_document = Document(content="Gardening", embedding=[1.0, 2.0, 3.0]) + double_document = Document(content="Gardening is a hobby", embedding=[1.0, 2.0, 3.0]) docs = [Document(embedding=[1.0, 2.0, 3.0]), double_document, Document(content="Bird watching")] document_store.write_documents(docs) - results = document_store.bm25_retrieval(query="Java", top_k=10, filters={"embedding": {"$not": None}}) + results = document_store.bm25_retrieval(query="Gardening", top_k=10, filters={"embedding": {"$not": None}}) assert len(results) == 1 assert results[0].id == double_document.id
MemoryBM25Retriever returns non relevant documents **Describe the bug** `MemoryBM25Retriever` currently always returns `top_k` number of `Document` even if they're not relevant. The [`test_retriever_valid_run`](https://github.com/deepset-ai/haystack/blob/ccc9f010bbdc75e1c5f1d269a43a5f06f36acba1/test/preview/components/retrievers/test_memory_bm25_retriever.py#L119-L129) is a good example of the current behavior. A simple fix would be to filter out `Document`s with `score==0.0` before scaling the score. **Expected behavior** Non relevant `Document`, those with score `0.0`, are not returned. **Additional context** @tstadel confirmed that it's unexpected we're returning `Document`s with a score of `0.0`. **To Reproduce** ``` from haystack.preview.document_stores import MemoryDocumentStore from haystack.preview.dataclasses import Document from haystack.preview.components.retrievers import MemoryBM25Retriever docs = [ Document(text="Javascript is a popular programming language"), Document(text="Java is a popular programming language"), Document(text="Python is a popular programming language"), Document(text="Ruby is a popular programming language"), Document(text="PHP is a popular programming language"), ] ds = MemoryDocumentStore() ds.write_documents(docs) retriever = MemoryBM25Retriever(ds, top_k=5, scale_score=False) result = retriever.run(query="PHP") # This is wrong assert len(result["documents"]) == 5 assert result["documents"][0].text == "PHP is a popular programming language" assert result["documents"][1].score == 0.0 assert result["documents"][2].score == 0.0 assert result["documents"][3].score == 0.0 assert result["documents"][4].score == 0.0 # This is the expected behaviour assert len(result["documents"]) == 1 assert result["documents"][0].text == "PHP is a popular programming language" assert result["documents"][0].score > 0.0 ```
0.0
0616197b44ae95da03aad7e5ac3997b243bd735d
[ "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_retriever_valid_run", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_run_with_pipeline_and_top_k[Java-Java", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_run_with_pipeline_and_top_k[Ruby-Ruby", "test/core/component/test_component.py::test_keyword_only_args", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_updated_docs", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_default_filter_for_text_and_dataframes" ]
[ "[", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_init_default", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_init_with_parameters", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_init_with_invalid_top_k_parameter", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_to_dict", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_to_dict_with_custom_init_parameters", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_from_dict", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_from_dict_without_docstore", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_from_dict_without_docstore_type", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_from_dict_nonexisting_docstore", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_invalid_run_wrong_store_type", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_run_with_pipeline[Javascript-Javascript", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_run_with_pipeline[Java-Java", "test/components/retrievers/test_in_memory_bm25_retriever.py::TestMemoryBM25Retriever::test_run_with_pipeline_and_top_k[Javascript-Javascript", "test/core/component/test_component.py::test_correct_declaration", "test/core/component/test_component.py::test_correct_declaration_with_additional_readonly_property", "test/core/component/test_component.py::test_correct_declaration_with_additional_writable_property", "test/core/component/test_component.py::test_missing_run", "test/core/component/test_component.py::test_set_input_types", "test/core/component/test_component.py::test_set_output_types", "test/core/component/test_component.py::test_output_types_decorator_with_compatible_type", "test/core/component/test_component.py::test_component_decorator_set_it_as_component", "test/core/component/test_component.py::test_input_has_default_value", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_no_filters", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_equal", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_equal_with_dataframe", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_equal_with_none", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_not_equal", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_not_equal_with_dataframe", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_not_equal_with_none", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_with_iso_date", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_with_string", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_with_dataframe", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_with_list", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_with_none", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_equal", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_equal_with_iso_date", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_equal_with_string", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_equal_with_dataframe", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_equal_with_list", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_greater_than_equal_with_none", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_with_iso_date", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_with_string", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_with_dataframe", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_with_list", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_with_none", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_equal", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_equal_with_iso_date", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_equal_with_string", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_equal_with_dataframe", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_equal_with_list", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_less_than_equal_with_none", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_in", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_in_with_with_non_list", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_in_with_with_non_list_iterable", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_not_in", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_not_in_with_with_non_list", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_comparison_not_in_with_with_non_list_iterable", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_and_operator", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_or_operator", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_not_operator", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_missing_top_level_operator_key", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_missing_top_level_conditions_key", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_missing_condition_field_key", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_missing_condition_operator_key", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_missing_condition_value_key", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_delete_documents", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_delete_documents_empty_document_store", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_delete_documents_non_existing_document", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_write_documents_duplicate_fail", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_write_documents_duplicate_skip", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_write_documents_duplicate_overwrite", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_write_documents_invalid_input", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_count_empty", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_count_not_empty", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_to_dict", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_to_dict_with_custom_init_parameters", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_from_dict", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_write_documents", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_empty_document_store", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_empty_query", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_different_top_k", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_two_queries", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_scale_score", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_table_content", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_text_and_table_content", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_filters", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_filters_keeps_default_filters", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_filters_on_text_or_dataframe", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_bm25_retrieval_with_documents_with_mixed_content", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval_invalid_query", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval_no_embeddings", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval_some_documents_wo_embeddings", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval_documents_different_embedding_sizes", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval_query_documents_different_embedding_sizes", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval_with_different_top_k", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval_with_scale_score", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_embedding_retrieval_return_embedding", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_compute_cosine_similarity_scores", "test/document_stores/test_in_memory.py::TestMemoryDocumentStore::test_compute_dot_product_similarity_scores" ]
{ "failed_lite_validators": [ "has_added_files", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2024-01-10 10:15:54+00:00
apache-2.0
1,868
deepset-ai__haystack-6941
diff --git a/haystack/components/extractors/named_entity_extractor.py b/haystack/components/extractors/named_entity_extractor.py index 6ca988fa..f8d8d717 100644 --- a/haystack/components/extractors/named_entity_extractor.py +++ b/haystack/components/extractors/named_entity_extractor.py @@ -126,6 +126,9 @@ class NamedEntityExtractor: raise ComponentError(f"Unknown NER backend '{type(backend).__name__}' for extractor") def warm_up(self): + """ + Initialize the named entity extractor backend. + """ try: self._backend.initialize() except Exception as e: @@ -135,6 +138,16 @@ class NamedEntityExtractor: @component.output_types(documents=List[Document]) def run(self, documents: List[Document], batch_size: int = 1) -> Dict[str, Any]: + """ + Run the named-entity extractor. + + :param documents: + Documents to process. + :param batch_size: + Batch size used for processing the documents. + :returns: + The processed documents. + """ texts = [doc.content if doc.content is not None else "" for doc in documents] annotations = self._backend.annotate(texts, batch_size=batch_size) @@ -150,6 +163,9 @@ class NamedEntityExtractor: return {"documents": documents} def to_dict(self) -> Dict[str, Any]: + """ + Serialize this component to a dictionary. + """ return default_to_dict( self, backend=self._backend.type, @@ -160,6 +176,12 @@ class NamedEntityExtractor: @classmethod def from_dict(cls, data: Dict[str, Any]) -> "NamedEntityExtractor": + """ + Deserialize the component from a dictionary. + + :param data: + The dictionary to deserialize from. + """ try: init_params = data["init_parameters"] init_params["device"] = ComponentDevice.from_dict(init_params["device"]) diff --git a/haystack/core/component/component.py b/haystack/core/component/component.py index 95ae87d7..c231e41d 100644 --- a/haystack/core/component/component.py +++ b/haystack/core/component/component.py @@ -160,6 +160,21 @@ class ComponentMeta(type): return instance +def _component_repr(component: Component) -> str: + """ + All Components override their __repr__ method with this one. + It prints the component name and the input/output sockets. + """ + result = object.__repr__(component) + if pipeline := getattr(component, "__haystack_added_to_pipeline__"): + # This Component has been added in a Pipeline, let's get the name from there. + result += f"\n{pipeline.get_component_name(component)}" + + # We're explicitly ignoring the type here because we're sure that the component + # has the __haystack_input__ and __haystack_output__ attributes at this point + return f"{result}\n{component.__haystack_input__}\n{component.__haystack_output__}" # type: ignore[attr-defined] + + class _Component: """ See module's docstring. @@ -332,6 +347,9 @@ class _Component: self.registry[class_path] = class_ logger.debug("Registered Component %s", class_) + # Override the __repr__ method with a default one + class_.__repr__ = _component_repr + return class_ def __call__(self, class_): diff --git a/haystack/core/component/sockets.py b/haystack/core/component/sockets.py index 25bf4fdc..374ae630 100644 --- a/haystack/core/component/sockets.py +++ b/haystack/core/component/sockets.py @@ -82,8 +82,9 @@ class Sockets: return pipeline.get_component_name(self._component) # This Component has not been added to a Pipeline yet, so we can't know its name. - # Let's use the class name instead. - return str(self._component) + # Let's use default __repr__. We don't call repr() directly as Components have a custom + # __repr__ method and that would lead to infinite recursion since we call Sockets.__repr__ in it. + return object.__repr__(self._component) def __getattribute__(self, name): try: @@ -96,12 +97,10 @@ class Sockets: return object.__getattribute__(self, name) def __repr__(self) -> str: - result = self._component_name() + result = "" if self._sockets_io_type == InputSocket: - result += " inputs:\n" + result = "Inputs:\n" elif self._sockets_io_type == OutputSocket: - result += " outputs:\n" + result = "Outputs:\n" - result += "\n".join([f" - {n}: {_type_name(s.type)}" for n, s in self._sockets_dict.items()]) - - return result + return result + "\n".join([f" - {n}: {_type_name(s.type)}" for n, s in self._sockets_dict.items()]) diff --git a/releasenotes/notes/component-repr-a6486af81530bc3b.yaml b/releasenotes/notes/component-repr-a6486af81530bc3b.yaml new file mode 100644 index 00000000..3a7439e9 --- /dev/null +++ b/releasenotes/notes/component-repr-a6486af81530bc3b.yaml @@ -0,0 +1,6 @@ +--- +enhancements: + - | + Add `__repr__` to all Components to print their I/O. + This can also be useful in Jupyter notebooks as this will be shown as a cell output + if the it's the last expression in a cell.
deepset-ai/haystack
74683fe74d400820a442cca03bb69473824e841a
diff --git a/e2e/pipelines/test_rag_pipelines_e2e.py b/e2e/pipelines/test_rag_pipelines_e2e.py index fa3aeb8c..d38053c9 100644 --- a/e2e/pipelines/test_rag_pipelines_e2e.py +++ b/e2e/pipelines/test_rag_pipelines_e2e.py @@ -30,7 +30,7 @@ def test_bm25_rag_pipeline(tmp_path): rag_pipeline = Pipeline() rag_pipeline.add_component(instance=InMemoryBM25Retriever(document_store=InMemoryDocumentStore()), name="retriever") rag_pipeline.add_component(instance=PromptBuilder(template=prompt_template), name="prompt_builder") - rag_pipeline.add_component(instance=OpenAIGenerator(api_key=os.environ.get("OPENAI_API_KEY")), name="llm") + rag_pipeline.add_component(instance=OpenAIGenerator(), name="llm") rag_pipeline.add_component(instance=AnswerBuilder(), name="answer_builder") rag_pipeline.connect("retriever", "prompt_builder.documents") rag_pipeline.connect("prompt_builder", "llm") @@ -101,7 +101,7 @@ def test_embedding_retrieval_rag_pipeline(tmp_path): instance=InMemoryEmbeddingRetriever(document_store=InMemoryDocumentStore()), name="retriever" ) rag_pipeline.add_component(instance=PromptBuilder(template=prompt_template), name="prompt_builder") - rag_pipeline.add_component(instance=OpenAIGenerator(api_key=os.environ.get("OPENAI_API_KEY")), name="llm") + rag_pipeline.add_component(instance=OpenAIGenerator(), name="llm") rag_pipeline.add_component(instance=AnswerBuilder(), name="answer_builder") rag_pipeline.connect("text_embedder", "retriever") rag_pipeline.connect("retriever", "prompt_builder.documents") diff --git a/test/core/component/test_component.py b/test/core/component/test_component.py index bbe2605f..b093c32b 100644 --- a/test/core/component/test_component.py +++ b/test/core/component/test_component.py @@ -4,6 +4,7 @@ import pytest from haystack.core.component import Component, InputSocket, OutputSocket, component from haystack.core.errors import ComponentError +from haystack.core.pipeline import Pipeline def test_correct_declaration(): @@ -189,3 +190,31 @@ def test_keyword_only_args(): comp = MockComponent() component_inputs = {name: {"type": socket.type} for name, socket in comp.__haystack_input__._sockets_dict.items()} assert component_inputs == {"arg": {"type": int}} + + +def test_repr(): + @component + class MockComponent: + def __init__(self): + component.set_output_types(self, value=int) + + def run(self, value: int): + return {"value": value} + + comp = MockComponent() + assert repr(comp) == f"{object.__repr__(comp)}\nInputs:\n - value: int\nOutputs:\n - value: int" + + +def test_repr_added_to_pipeline(): + @component + class MockComponent: + def __init__(self): + component.set_output_types(self, value=int) + + def run(self, value: int): + return {"value": value} + + pipe = Pipeline() + comp = MockComponent() + pipe.add_component("my_component", comp) + assert repr(comp) == f"{object.__repr__(comp)}\nmy_component\nInputs:\n - value: int\nOutputs:\n - value: int" diff --git a/test/core/component/test_sockets.py b/test/core/component/test_sockets.py index ac3b01bd..6e942b84 100644 --- a/test/core/component/test_sockets.py +++ b/test/core/component/test_sockets.py @@ -23,19 +23,6 @@ class TestSockets: assert io._component == comp assert io._sockets_dict == {} - def test_component_name(self): - comp = component_class("SomeComponent")() - io = Sockets(component=comp, sockets_dict={}, sockets_io_type=InputSocket) - assert io._component_name() == str(comp) - - def test_component_name_added_to_pipeline(self): - comp = component_class("SomeComponent")() - pipeline = Pipeline() - pipeline.add_component("my_component", comp) - - io = Sockets(component=comp, sockets_dict={}, sockets_io_type=InputSocket) - assert io._component_name() == "my_component" - def test_getattribute(self): comp = component_class("SomeComponent", input_types={"input_1": int, "input_2": int})() io = Sockets(component=comp, sockets_dict=comp.__haystack_input__._sockets_dict, sockets_io_type=InputSocket) @@ -54,4 +41,4 @@ class TestSockets: comp = component_class("SomeComponent", input_types={"input_1": int, "input_2": int})() io = Sockets(component=comp, sockets_dict=comp.__haystack_input__._sockets_dict, sockets_io_type=InputSocket) res = repr(io) - assert res == f"{comp} inputs:\n - input_1: int\n - input_2: int" + assert res == "Inputs:\n - input_1: int\n - input_2: int"
RAG pipeline e2e test fails to resolve api key **Describe the bug** `e2e/pipelines/test_rag_pipelines_e2e.py` fails resolving the OpenAI api key after the PR that changed the secret management. https://github.com/deepset-ai/haystack/pull/6887 Here is the failing test run: https://github.com/deepset-ai/haystack/actions/runs/7792596449/job/21250892136 **Error message** ```python self.client = OpenAI(api_key=api_key.resolve_value(), organization=organization, base_url=api_base_url) E AttributeError: 'str' object has no attribute 'resolve_value' ```
0.0
74683fe74d400820a442cca03bb69473824e841a
[ "test/core/component/test_component.py::test_repr", "test/core/component/test_component.py::test_repr_added_to_pipeline", "test/core/component/test_sockets.py::TestSockets::test_repr" ]
[ "test/core/component/test_component.py::test_correct_declaration", "test/core/component/test_component.py::test_correct_declaration_with_additional_readonly_property", "test/core/component/test_component.py::test_correct_declaration_with_additional_writable_property", "test/core/component/test_component.py::test_missing_run", "test/core/component/test_component.py::test_set_input_types", "test/core/component/test_component.py::test_set_output_types", "test/core/component/test_component.py::test_output_types_decorator_with_compatible_type", "test/core/component/test_component.py::test_component_decorator_set_it_as_component", "test/core/component/test_component.py::test_input_has_default_value", "test/core/component/test_component.py::test_keyword_only_args", "test/core/component/test_sockets.py::TestSockets::test_init", "test/core/component/test_sockets.py::TestSockets::test_init_with_empty_sockets", "test/core/component/test_sockets.py::TestSockets::test_getattribute", "test/core/component/test_sockets.py::TestSockets::test_getattribute_non_existing_socket" ]
{ "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2024-02-08 09:38:11+00:00
apache-2.0
1,869
deepset-ai__haystack-6963
diff --git a/haystack/core/pipeline/pipeline.py b/haystack/core/pipeline/pipeline.py index 632cc73e..98ba8df8 100644 --- a/haystack/core/pipeline/pipeline.py +++ b/haystack/core/pipeline/pipeline.py @@ -71,6 +71,34 @@ class Pipeline: return False return self.to_dict() == other.to_dict() + def __repr__(self) -> str: + """ + Returns a text representation of the Pipeline. + If this runs in a Jupyter notebook, it will instead display the Pipeline image. + """ + if is_in_jupyter(): + # If we're in a Jupyter notebook we want to display the image instead of the text repr. + self.show() + return "" + + res = f"{object.__repr__(self)}\n" + if self.metadata: + res += "🧱 Metadata\n" + for k, v in self.metadata.items(): + res += f" - {k}: {v}\n" + + res += "🚅 Components\n" + for name, instance in self.graph.nodes(data="instance"): + res += f" - {name}: {instance.__class__.__name__}\n" + + res += "🛤️ Connections\n" + for sender, receiver, edge_data in self.graph.edges(data=True): + sender_socket = edge_data["from_socket"].name + receiver_socket = edge_data["to_socket"].name + res += f" - {sender}.{sender_socket} -> {receiver}.{receiver_socket} ({edge_data['conn_type']})\n" + + return res + def to_dict(self) -> Dict[str, Any]: """ Returns this Pipeline instance as a dictionary. diff --git a/releasenotes/notes/enhance-repr-0c5efa1e2ca6bafa.yaml b/releasenotes/notes/enhance-repr-0c5efa1e2ca6bafa.yaml new file mode 100644 index 00000000..a9f1914e --- /dev/null +++ b/releasenotes/notes/enhance-repr-0c5efa1e2ca6bafa.yaml @@ -0,0 +1,5 @@ +--- +enhancements: + - | + Customize `Pipeline.__repr__()` to return a nice text representation of it. + If run on a Jupyter notebook it will instead have the same behaviour as `Pipeline.show()`.
deepset-ai/haystack
a7f36fdd3226cd822c600c724c2b72005180269a
diff --git a/test/core/pipeline/test_pipeline.py b/test/core/pipeline/test_pipeline.py index c6dec132..4e66f38f 100644 --- a/test/core/pipeline/test_pipeline.py +++ b/test/core/pipeline/test_pipeline.py @@ -79,6 +79,49 @@ def test_get_component_name_not_added_to_pipeline(): assert pipe.get_component_name(some_component) == "" +@patch("haystack.core.pipeline.pipeline.is_in_jupyter") +def test_repr(mock_is_in_jupyter): + pipe = Pipeline(metadata={"test": "test"}, max_loops_allowed=42) + pipe.add_component("add_two", AddFixedValue(add=2)) + pipe.add_component("add_default", AddFixedValue()) + pipe.add_component("double", Double()) + pipe.connect("add_two", "double") + pipe.connect("double", "add_default") + + expected_repr = ( + f"{object.__repr__(pipe)}\n" + "🧱 Metadata\n" + " - test: test\n" + "🚅 Components\n" + " - add_two: AddFixedValue\n" + " - add_default: AddFixedValue\n" + " - double: Double\n" + "🛤️ Connections\n" + " - add_two.result -> double.value (int)\n" + " - double.value -> add_default.value (int)\n" + ) + # Simulate not being in a notebook + mock_is_in_jupyter.return_value = False + assert repr(pipe) == expected_repr + + +@patch("haystack.core.pipeline.pipeline.is_in_jupyter") +def test_repr_in_notebook(mock_is_in_jupyter): + pipe = Pipeline(metadata={"test": "test"}, max_loops_allowed=42) + pipe.add_component("add_two", AddFixedValue(add=2)) + pipe.add_component("add_default", AddFixedValue()) + pipe.add_component("double", Double()) + pipe.connect("add_two", "double") + pipe.connect("double", "add_default") + + # Simulate being in a notebook + mock_is_in_jupyter.return_value = True + + with patch.object(Pipeline, "show") as mock_show: + assert repr(pipe) == "" + mock_show.assert_called_once_with() + + def test_run_with_component_that_does_not_return_dict(): BrokenComponent = component_class( "BrokenComponent", input_types={"a": int}, output_types={"b": int}, output=1 # type:ignore
`Pipeline.__repr__` should display an easy to understand representation of the Pipeline When working and creating a `Pipeline` it's useful to quickly get an easy to understand text representation of it. This should display connections between components, the I/O of the Pipeline, missing mandatory connections and other useful information. This is also useful when working in a Jupyter notebook, if the `Pipeline` is the last statement in a cell the user will get a nice representation of the `Pipeline` for free. Some examples: Pandas' DataFrame ![Pandas' DataFrame](https://github.com/deepset-ai/haystack/assets/3314350/0703ecdb-2e4c-4db0-92da-27709c1a3d80) DocArray document ![DocArray document](https://github.com/deepset-ai/haystack/assets/3314350/1e8054d0-06f6-4a20-82ee-74fecada8000)
0.0
a7f36fdd3226cd822c600c724c2b72005180269a
[ "test/core/pipeline/test_pipeline.py::test_repr", "test/core/pipeline/test_pipeline.py::test_repr_in_notebook" ]
[ "test/core/pipeline/test_pipeline.py::test_show_in_notebook", "test/core/pipeline/test_pipeline.py::test_show_not_in_notebook", "test/core/pipeline/test_pipeline.py::test_draw", "test/core/pipeline/test_pipeline.py::test_add_component_to_different_pipelines", "test/core/pipeline/test_pipeline.py::test_get_component_name", "test/core/pipeline/test_pipeline.py::test_get_component_name_not_added_to_pipeline", "test/core/pipeline/test_pipeline.py::test_run_with_component_that_does_not_return_dict", "test/core/pipeline/test_pipeline.py::test_to_dict", "test/core/pipeline/test_pipeline.py::test_from_dict", "test/core/pipeline/test_pipeline.py::test_from_dict_with_empty_dict", "test/core/pipeline/test_pipeline.py::test_from_dict_with_components_instances", "test/core/pipeline/test_pipeline.py::test_from_dict_without_component_type", "test/core/pipeline/test_pipeline.py::test_from_dict_without_registered_component_type", "test/core/pipeline/test_pipeline.py::test_from_dict_without_connection_sender", "test/core/pipeline/test_pipeline.py::test_from_dict_without_connection_receiver", "test/core/pipeline/test_pipeline.py::test_falsy_connection", "test/core/pipeline/test_pipeline.py::test_describe_input_only_no_inputs_components", "test/core/pipeline/test_pipeline.py::test_describe_input_some_components_with_no_inputs", "test/core/pipeline/test_pipeline.py::test_describe_input_all_components_have_inputs", "test/core/pipeline/test_pipeline.py::test_describe_output_multiple_possible", "test/core/pipeline/test_pipeline.py::test_describe_output_single", "test/core/pipeline/test_pipeline.py::test_describe_no_outputs" ]
{ "failed_lite_validators": [ "has_added_files" ], "has_test_patch": true, "is_lite": false }
2024-02-08 17:34:44+00:00
apache-2.0
1,870
deepset-ai__haystack-7038
diff --git a/haystack/components/evaluators/statistical_evaluator.py b/haystack/components/evaluators/statistical_evaluator.py index 6f65fc10..a6c00964 100644 --- a/haystack/components/evaluators/statistical_evaluator.py +++ b/haystack/components/evaluators/statistical_evaluator.py @@ -1,4 +1,5 @@ import collections +import itertools from enum import Enum from typing import Any, Dict, List, Union @@ -16,6 +17,8 @@ class StatisticalMetric(Enum): F1 = "f1" EM = "exact_match" + RECALL_SINGLE_HIT = "recall_single_hit" + RECALL_MULTI_HIT = "recall_multi_hit" @classmethod def from_str(cls, metric: str) -> "StatisticalMetric": @@ -47,7 +50,12 @@ class StatisticalEvaluator: metric = StatisticalMetric.from_str(metric) self._metric = metric - self._metric_function = {StatisticalMetric.F1: self._f1, StatisticalMetric.EM: self._exact_match}[self._metric] + self._metric_function = { + StatisticalMetric.F1: self._f1, + StatisticalMetric.EM: self._exact_match, + StatisticalMetric.RECALL_SINGLE_HIT: self._recall_single_hit, + StatisticalMetric.RECALL_MULTI_HIT: self._recall_multi_hit, + }[self._metric] def to_dict(self) -> Dict[str, Any]: return default_to_dict(self, metric=self._metric.value) @@ -68,9 +76,6 @@ class StatisticalEvaluator: :returns: A dictionary with the following outputs: * `result` - Calculated result of the chosen metric. """ - if len(labels) != len(predictions): - raise ValueError("The number of predictions and labels must be the same.") - return {"result": self._metric_function(labels, predictions)} @staticmethod @@ -78,6 +83,9 @@ class StatisticalEvaluator: """ Measure word overlap between predictions and labels. """ + if len(labels) != len(predictions): + raise ValueError("The number of predictions and labels must be the same.") + if len(predictions) == 0: # We expect callers of this function already checked if predictions and labels are equal length return 0.0 @@ -105,8 +113,40 @@ class StatisticalEvaluator: """ Measure the proportion of cases where predictiond is identical to the the expected label. """ + if len(labels) != len(predictions): + raise ValueError("The number of predictions and labels must be the same.") + if len(predictions) == 0: # We expect callers of this function already checked if predictions and labels are equal length return 0.0 score_list = np_array(predictions) == np_array(labels) return np_mean(score_list) + + @staticmethod + def _recall_single_hit(labels: List[str], predictions: List[str]) -> float: + """ + Measures how many times a label is present in at least one prediction. + If the same label is found in multiple predictions it is only counted once. + """ + if len(labels) == 0: + return 0.0 + + # In Recall Single Hit we only consider if a label is present in at least one prediction. + # No need to count multiple occurrences of the same label in different predictions + retrieved_labels = {l for l, p in itertools.product(labels, predictions) if l in p} + return len(retrieved_labels) / len(labels) + + @staticmethod + def _recall_multi_hit(labels: List[str], predictions: List[str]) -> float: + """ + Measures how many times a label is present in at least one or more predictions. + """ + if len(labels) == 0: + return 0.0 + + correct_retrievals = 0 + for label, prediction in itertools.product(labels, predictions): + if label in prediction: + correct_retrievals += 1 + + return correct_retrievals / len(labels)
deepset-ai/haystack
5910b4adc9b2688155abb8d2290e5cf56833eb0b
diff --git a/test/components/evaluators/test_statistical_evaluator.py b/test/components/evaluators/test_statistical_evaluator.py index e98899cb..619b2584 100644 --- a/test/components/evaluators/test_statistical_evaluator.py +++ b/test/components/evaluators/test_statistical_evaluator.py @@ -121,3 +121,71 @@ class TestStatisticalEvaluatorExactMatch: result = evaluator.run(labels=labels, predictions=predictions) assert len(result) == 1 assert result["result"] == 2 / 3 + + +class TestStatisticalEvaluatorRecallSingleHit: + def test_run(self): + evaluator = StatisticalEvaluator(metric=StatisticalMetric.RECALL_SINGLE_HIT) + labels = ["Eiffel Tower", "Louvre Museum", "Colosseum", "Trajan's Column"] + predictions = [ + "The Eiffel Tower, completed in 1889, symbolizes Paris's cultural magnificence.", + "The Eiffel Tower max height is 330 meters.", + "Louvre Museum is the world's largest art museum and a historic monument in Paris, France.", + "The Leaning Tower of Pisa is the campanile, or freestanding bell tower, of Pisa Cathedral.", + ] + result = evaluator.run(labels=labels, predictions=predictions) + assert len(result) == 1 + assert result["result"] == 2 / 4 + + def test_run_with_empty_labels(self): + evaluator = StatisticalEvaluator(metric=StatisticalMetric.RECALL_SINGLE_HIT) + predictions = [ + "The Eiffel Tower, completed in 1889, symbolizes Paris's cultural magnificence.", + "The Eiffel Tower max height is 330 meters.", + "Louvre Museum is the world's largest art museum and a historic monument in Paris, France.", + "The Leaning Tower of Pisa is the campanile, or freestanding bell tower, of Pisa Cathedral.", + ] + result = evaluator.run(labels=[], predictions=predictions) + assert len(result) == 1 + assert result["result"] == 0.0 + + def test_run_with_empty_predictions(self): + evaluator = StatisticalEvaluator(metric=StatisticalMetric.RECALL_SINGLE_HIT) + labels = ["Eiffel Tower", "Louvre Museum", "Colosseum", "Trajan's Column"] + result = evaluator.run(labels=labels, predictions=[]) + assert len(result) == 1 + assert result["result"] == 0.0 + + +class TestStatisticalEvaluatorRecallMultiHit: + def test_run(self): + evaluator = StatisticalEvaluator(metric=StatisticalMetric.RECALL_MULTI_HIT) + labels = ["Eiffel Tower", "Louvre Museum", "Colosseum", "Trajan's Column"] + predictions = [ + "The Eiffel Tower, completed in 1889, symbolizes Paris's cultural magnificence.", + "The Eiffel Tower max height is 330 meters.", + "Louvre Museum is the world's largest art museum and a historic monument in Paris, France.", + "The Leaning Tower of Pisa is the campanile, or freestanding bell tower, of Pisa Cathedral.", + ] + result = evaluator.run(labels=labels, predictions=predictions) + assert len(result) == 1 + assert result["result"] == 0.75 + + def test_run_with_empty_labels(self): + evaluator = StatisticalEvaluator(metric=StatisticalMetric.RECALL_MULTI_HIT) + predictions = [ + "The Eiffel Tower, completed in 1889, symbolizes Paris's cultural magnificence.", + "The Eiffel Tower max height is 330 meters.", + "Louvre Museum is the world's largest art museum and a historic monument in Paris, France.", + "The Leaning Tower of Pisa is the campanile, or freestanding bell tower, of Pisa Cathedral.", + ] + result = evaluator.run(labels=[], predictions=predictions) + assert len(result) == 1 + assert result["result"] == 0.0 + + def test_run_with_empty_predictions(self): + evaluator = StatisticalEvaluator(metric=StatisticalMetric.RECALL_MULTI_HIT) + labels = ["Eiffel Tower", "Louvre Museum", "Colosseum", "Trajan's Column"] + result = evaluator.run(labels=labels, predictions=[]) + assert len(result) == 1 + assert result["result"] == 0.0
Implement function to calculate Recall metric As specified in proposal #5794 we need to implement a function to calculate the Recall metric. Ideally the function should be part of the private interface and called only through the `calculate_metrics` function (see #6063). `_calculate_recall()` could be a nice name. For more detailed information check out the original proposal.
0.0
5910b4adc9b2688155abb8d2290e5cf56833eb0b
[ "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorRecallSingleHit::test_run", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorRecallSingleHit::test_run_with_empty_labels", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorRecallSingleHit::test_run_with_empty_predictions", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorRecallMultiHit::test_run", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorRecallMultiHit::test_run_with_empty_labels", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorRecallMultiHit::test_run_with_empty_predictions" ]
[ "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluator::test_init_default", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluator::test_init_with_string", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluator::test_to_dict", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluator::test_from_dict", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorF1::test_run_with_empty_inputs", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorF1::test_run_with_different_lengths", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorF1::test_run_with_matching_predictions", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorF1::test_run_with_single_prediction", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorF1::test_run_with_mismatched_predictions", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorExactMatch::test_run_with_empty_inputs", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorExactMatch::test_run_with_different_lengths", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorExactMatch::test_run_with_matching_predictions", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorExactMatch::test_run_with_single_prediction", "test/components/evaluators/test_statistical_evaluator.py::TestStatisticalEvaluatorExactMatch::test_run_with_mismatched_predictions" ]
{ "failed_lite_validators": [ "has_issue_reference", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2024-02-19 15:37:23+00:00
apache-2.0
1,871
deepset-ai__haystack-7381
diff --git a/haystack/components/evaluators/__init__.py b/haystack/components/evaluators/__init__.py new file mode 100644 index 00000000..9550a5f4 --- /dev/null +++ b/haystack/components/evaluators/__init__.py @@ -0,0 +1,3 @@ +from .answer_exact_match import AnswerExactMatchEvaluator + +__all__ = ["AnswerExactMatchEvaluator"] diff --git a/haystack/components/evaluators/answer_exact_match.py b/haystack/components/evaluators/answer_exact_match.py new file mode 100644 index 00000000..4927f4e1 --- /dev/null +++ b/haystack/components/evaluators/answer_exact_match.py @@ -0,0 +1,59 @@ +from typing import Dict, List + +from haystack.core.component import component + + +@component +class AnswerExactMatchEvaluator: + """ + Evaluator that checks if the predicted answers matches any of the ground truth answers exactly. + The result is a number from 0.0 to 1.0, it represents the proportion of questions where any predicted answer + matched one of the ground truth answers. + Each question can have multiple ground truth answers and multiple predicted answers. + + Usage example: + ```python + from haystack.components.evaluators import AnswerExactMatchEvaluator + + evaluator = AnswerExactMatchEvaluator() + result = evaluator.run( + questions=["What is the capital of Germany?", "What is the capital of France?"], + ground_truth_answers=[["Berlin"], ["Paris"]], + predicted_answers=[["Berlin"], ["Paris"]], + ) + print(result["result"]) + # 1.0 + ``` + """ + + @component.output_types(result=float) + def run( + self, questions: List[str], ground_truth_answers: List[List[str]], predicted_answers: List[List[str]] + ) -> Dict[str, float]: + """ + Run the AnswerExactMatchEvaluator on the given inputs. + All lists must have the same length. + + :param questions: + A list of questions. + :param ground_truth_answers: + A list of expected answers for each question. + :param predicted_answers: + A list of predicted answers for each question. + :returns: + A dictionary with the following outputs: + - `result` - A number from 0.0 to 1.0 that represents the proportion of questions where any predicted + answer matched one of the ground truth answers. + """ + if not len(questions) == len(ground_truth_answers) == len(predicted_answers): + raise ValueError("The length of questions, ground_truth_answers, and predicted_answers must be the same.") + + matches = 0 + for truths, extracted in zip(ground_truth_answers, predicted_answers): + if set(truths) & set(extracted): + matches += 1 + + # The proportion of questions where any predicted answer matched one of the ground truth answers + result = matches / len(questions) + + return {"result": result} diff --git a/releasenotes/notes/exact-match-evaluator-197bb87b65e19d0c.yaml b/releasenotes/notes/exact-match-evaluator-197bb87b65e19d0c.yaml new file mode 100644 index 00000000..ad380617 --- /dev/null +++ b/releasenotes/notes/exact-match-evaluator-197bb87b65e19d0c.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Add `AnswerExactMatchEvaluator`, a Component that can be used to calculate the Exact Match metric + given a list of questions, a list of expected answers for each question and the list of predicted + answers for each question.
deepset-ai/haystack
f69c3e5cd26046b826927a39cad02af93b2ccbbf
diff --git a/test/components/evaluators/test_answer_exact_match.py b/test/components/evaluators/test_answer_exact_match.py new file mode 100644 index 00000000..c179c74a --- /dev/null +++ b/test/components/evaluators/test_answer_exact_match.py @@ -0,0 +1,61 @@ +import pytest + +from haystack.components.evaluators import AnswerExactMatchEvaluator + + +def test_run_with_all_matching(): + evaluator = AnswerExactMatchEvaluator() + result = evaluator.run( + questions=["What is the capital of Germany?", "What is the capital of France?"], + ground_truth_answers=[["Berlin"], ["Paris"]], + predicted_answers=[["Berlin"], ["Paris"]], + ) + + assert result["result"] == 1.0 + + +def test_run_with_no_matching(): + evaluator = AnswerExactMatchEvaluator() + result = evaluator.run( + questions=["What is the capital of Germany?", "What is the capital of France?"], + ground_truth_answers=[["Berlin"], ["Paris"]], + predicted_answers=[["Paris"], ["London"]], + ) + + assert result["result"] == 0.0 + + +def test_run_with_partial_matching(): + evaluator = AnswerExactMatchEvaluator() + result = evaluator.run( + questions=["What is the capital of Germany?", "What is the capital of France?"], + ground_truth_answers=[["Berlin"], ["Paris"]], + predicted_answers=[["Berlin"], ["London"]], + ) + + assert result["result"] == 0.5 + + +def test_run_with_different_lengths(): + evaluator = AnswerExactMatchEvaluator() + + with pytest.raises(ValueError): + evaluator.run( + questions=["What is the capital of Germany?"], + ground_truth_answers=[["Berlin"], ["Paris"]], + predicted_answers=[["Berlin"], ["London"]], + ) + + with pytest.raises(ValueError): + evaluator.run( + questions=["What is the capital of Germany?", "What is the capital of France?"], + ground_truth_answers=[["Berlin"]], + predicted_answers=[["Berlin"], ["London"]], + ) + + with pytest.raises(ValueError): + evaluator.run( + questions=["What is the capital of Germany?", "What is the capital of France?"], + ground_truth_answers=[["Berlin"], ["Paris"]], + predicted_answers=[["Berlin"]], + )
Implement function to calculate Exact Match metric As specified in proposal #5794 we need to implement a function to calculate the Exact Match metric. Ideally the function should be part of the private interface and called only through the `calculate_metrics` function (see #6063). `_calculate_em()` could be a nice name. For more detailed information check out the original proposal.
0.0
f69c3e5cd26046b826927a39cad02af93b2ccbbf
[ "test/components/evaluators/test_answer_exact_match.py::test_run_with_all_matching", "test/components/evaluators/test_answer_exact_match.py::test_run_with_no_matching", "test/components/evaluators/test_answer_exact_match.py::test_run_with_partial_matching", "test/components/evaluators/test_answer_exact_match.py::test_run_with_different_lengths" ]
[]
{ "failed_lite_validators": [ "has_issue_reference", "has_added_files", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false }
2024-03-19 14:33:17+00:00
apache-2.0
1,872
deepset-ai__haystack-7424
diff --git a/haystack/components/evaluators/__init__.py b/haystack/components/evaluators/__init__.py index 479cd500..0da03f91 100644 --- a/haystack/components/evaluators/__init__.py +++ b/haystack/components/evaluators/__init__.py @@ -2,6 +2,7 @@ from .answer_exact_match import AnswerExactMatchEvaluator from .document_map import DocumentMAPEvaluator from .document_mrr import DocumentMRREvaluator from .document_recall import DocumentRecallEvaluator +from .faithfulness import FaithfulnessEvaluator from .llm_evaluator import LLMEvaluator from .sas_evaluator import SASEvaluator @@ -10,6 +11,7 @@ __all__ = [ "DocumentMAPEvaluator", "DocumentMRREvaluator", "DocumentRecallEvaluator", + "FaithfulnessEvaluator", "LLMEvaluator", "SASEvaluator", ] diff --git a/haystack/components/evaluators/faithfulness.py b/haystack/components/evaluators/faithfulness.py new file mode 100644 index 00000000..9ceb9973 --- /dev/null +++ b/haystack/components/evaluators/faithfulness.py @@ -0,0 +1,161 @@ +from typing import Any, Dict, List, Optional + +from numpy import mean as np_mean + +from haystack import default_from_dict +from haystack.components.evaluators.llm_evaluator import LLMEvaluator +from haystack.core.component import component +from haystack.utils import Secret, deserialize_secrets_inplace + + +class FaithfulnessEvaluator(LLMEvaluator): + """ + Evaluator that checks if a generated answer can be inferred from the provided contexts. + + An LLM separates the answer into multiple statements and checks whether the statement can be inferred from the + context or not. The final score for the full answer is a number from 0.0 to 1.0. It represents the proportion of + statements that can be inferred from the provided contexts. + + Usage example: + ```python + from haystack.components.evaluators import FaithfulnessEvaluator + + questions = ["Who created the Python language?"] + contexts = [ + [ + "Python, created by Guido van Rossum in the late 1980s, is a high-level general-purpose programming language. Its design philosophy emphasizes code readability, and its language constructs aim to help programmers write clear, logical code for both small and large-scale software projects." + ], + ] + responses = ["Python is a high-level general-purpose programming language that was created by George Lucas."] + evaluator = FaithfulnessEvaluator() + result = evaluator.run(questions=questions, contexts=contexts, responses=responses) + print(results["evaluator"]) + # {'results': [{'statements': ['Python is a high-level general-purpose programming language.', + # 'Python was created by George Lucas.'], 'statement_scores': + # [1, 0], 'score': 0.5}], 'score': 0.5, 'individual_scores': [0.5]} + + ``` + """ + + def __init__( + self, + examples: Optional[List[Dict[str, Any]]] = None, + api: str = "openai", + api_key: Secret = Secret.from_env_var("OPENAI_API_KEY"), + ): + """ + Creates an instance of LLMEvaluator. + + :param examples: + Few-shot examples conforming to the expected input and output format of FaithfulnessEvaluator. + Each example must be a dictionary with keys "inputs" and "outputs". + "inputs" must be a dictionary with keys "questions", "contexts", and "responses". + "outputs" must be a dictionary with "statements" and "statement_scores". + Expected format: + [{ + "inputs": { + "questions": "What is the capital of Italy?", "contexts": ["Rome is the capital of Italy."], + "responses": "Rome is the capital of Italy with more than 4 million inhabitants.", + }, + "outputs": { + "statements": ["Rome is the capital of Italy.", "Rome has more than 4 million inhabitants."], + "statement_scores": [1, 0], + }, + }] + :param api: + The API to use for calling an LLM through a Generator. + Supported APIs: "openai". + :param api_key: + The API key. + + """ + self.instructions = ( + "Your task is to judge the faithfulness or groundedness of statements based " + "on context information. First, please extract statements from a provided " + "response to a question. Second, calculate a faithfulness score for each " + "statement made in the response. The score is 1 if the statement can be " + "inferred from the provided context or 0 if it cannot be inferred." + ) + self.inputs = [("questions", List[str]), ("contexts", List[List[str]]), ("responses", List[str])] + self.outputs = ["statements", "statement_scores"] + self.examples = examples or [ + { + "inputs": { + "questions": "What is the capital of Germany and when was it founded?", + "contexts": ["Berlin is the capital of Germany and was founded in 1244."], + "responses": "The capital of Germany, Berlin, was founded in the 13th century.", + }, + "outputs": { + "statements": ["Berlin is the capital of Germany.", "Berlin was founded in 1244."], + "statement_scores": [1, 1], + }, + }, + { + "inputs": { + "questions": "What is the capital of France?", + "contexts": ["Berlin is the capital of Germany."], + "responses": "Paris", + }, + "outputs": {"statements": ["Paris is the capital of France."], "statement_scores": [0]}, + }, + { + "inputs": { + "questions": "What is the capital of Italy?", + "contexts": ["Rome is the capital of Italy."], + "responses": "Rome is the capital of Italy with more than 4 million inhabitants.", + }, + "outputs": { + "statements": ["Rome is the capital of Italy.", "Rome has more than 4 million inhabitants."], + "statement_scores": [1, 0], + }, + }, + ] + self.api = api + self.api_key = api_key + + super().__init__( + instructions=self.instructions, + inputs=self.inputs, + outputs=self.outputs, + examples=self.examples, + api=self.api, + api_key=self.api_key, + ) + + @component.output_types(results=List[Dict[str, Any]]) + def run(self, **inputs) -> Dict[str, Any]: + """ + Run the LLM evaluator. + + :param inputs: + The input values to evaluate. The keys are the input names and the values are lists of input values. + :returns: + A dictionary with the following outputs: + - `score`: Mean faithfulness score over all the provided input answers. + - `individual_scores`: A list of faithfulness scores for each input answer. + - `results`: A list of dictionaries with `statements` and `statement_scores` for each input answer. + """ + result = super().run(**inputs) + + # calculate average statement faithfulness score per query + for res in result["results"]: + res["score"] = np_mean(res["statement_scores"]) + + # calculate average answer faithfulness score over all queries + result["score"] = np_mean([res["score"] for res in result["results"]]) + result["individual_scores"] = [res["score"] for res in result["results"]] + + return result + + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> "FaithfulnessEvaluator": + """ + Deserialize this component from a dictionary. + + :param data: + The dictionary representation of this component. + :returns: + The deserialized component instance. + """ + deserialize_secrets_inplace(data["init_parameters"], keys=["api_key"]) + return default_from_dict(cls, data) diff --git a/releasenotes/notes/faithfulness-evaluator-2e039a697c847d1c.yaml b/releasenotes/notes/faithfulness-evaluator-2e039a697c847d1c.yaml new file mode 100644 index 00000000..5279d0d9 --- /dev/null +++ b/releasenotes/notes/faithfulness-evaluator-2e039a697c847d1c.yaml @@ -0,0 +1,6 @@ +--- +features: + - | + Add a new FaithfulnessEvaluator component that can be used to evaluate faithfulness / groundedness / hallucinations of LLMs in a RAG pipeline. + Given a question, a list of retrieved document contents (contexts), and a predicted answer, FaithfulnessEvaluator returns a score ranging from 0 (poor faithfulness) to 1 (perfect faithfulness). + The score is the proportion of statements in the predicted answer that could by inferred from the documents.
deepset-ai/haystack
189dfaf640caf7993d4ba367d6ea3bcb1b4eca11
diff --git a/test/components/evaluators/test_faithfulness_evaluator.py b/test/components/evaluators/test_faithfulness_evaluator.py new file mode 100644 index 00000000..57764373 --- /dev/null +++ b/test/components/evaluators/test_faithfulness_evaluator.py @@ -0,0 +1,129 @@ +from typing import List + +import pytest + +from haystack.components.evaluators import FaithfulnessEvaluator +from haystack.utils.auth import Secret + + +class TestFaithfulnessEvaluator: + def test_init_default(self, monkeypatch): + monkeypatch.setenv("OPENAI_API_KEY", "test-api-key") + component = FaithfulnessEvaluator() + assert component.api == "openai" + assert component.generator.client.api_key == "test-api-key" + assert component.instructions == ( + "Your task is to judge the faithfulness or groundedness of statements based " + "on context information. First, please extract statements from a provided " + "response to a question. Second, calculate a faithfulness score for each " + "statement made in the response. The score is 1 if the statement can be " + "inferred from the provided context or 0 if it cannot be inferred." + ) + assert component.inputs == [("questions", List[str]), ("contexts", List[List[str]]), ("responses", List[str])] + assert component.outputs == ["statements", "statement_scores"] + assert component.examples == [ + { + "inputs": { + "questions": "What is the capital of Germany and when was it founded?", + "contexts": ["Berlin is the capital of Germany and was founded in 1244."], + "responses": "The capital of Germany, Berlin, was founded in the 13th century.", + }, + "outputs": { + "statements": ["Berlin is the capital of Germany.", "Berlin was founded in 1244."], + "statement_scores": [1, 1], + }, + }, + { + "inputs": { + "questions": "What is the capital of France?", + "contexts": ["Berlin is the capital of Germany."], + "responses": "Paris", + }, + "outputs": {"statements": ["Paris is the capital of France."], "statement_scores": [0]}, + }, + { + "inputs": { + "questions": "What is the capital of Italy?", + "contexts": ["Rome is the capital of Italy."], + "responses": "Rome is the capital of Italy with more than 4 million inhabitants.", + }, + "outputs": { + "statements": ["Rome is the capital of Italy.", "Rome has more than 4 million inhabitants."], + "statement_scores": [1, 0], + }, + }, + ] + + def test_init_fail_wo_openai_api_key(self, monkeypatch): + monkeypatch.delenv("OPENAI_API_KEY", raising=False) + with pytest.raises(ValueError, match="None of the .* environment variables are set"): + FaithfulnessEvaluator() + + def test_init_with_parameters(self): + component = FaithfulnessEvaluator( + api_key=Secret.from_token("test-api-key"), + api="openai", + examples=[ + {"inputs": {"responses": "Damn, this is straight outta hell!!!"}, "outputs": {"custom_score": 1}}, + {"inputs": {"responses": "Football is the most popular sport."}, "outputs": {"custom_score": 0}}, + ], + ) + assert component.generator.client.api_key == "test-api-key" + assert component.api == "openai" + assert component.examples == [ + {"inputs": {"responses": "Damn, this is straight outta hell!!!"}, "outputs": {"custom_score": 1}}, + {"inputs": {"responses": "Football is the most popular sport."}, "outputs": {"custom_score": 0}}, + ] + + def test_from_dict(self, monkeypatch): + monkeypatch.setenv("OPENAI_API_KEY", "test-api-key") + + data = { + "type": "haystack.components.evaluators.faithfulness.FaithfulnessEvaluator", + "init_parameters": { + "api_key": {"env_vars": ["OPENAI_API_KEY"], "strict": True, "type": "env_var"}, + "api": "openai", + "examples": [{"inputs": {"responses": "Football is the most popular sport."}, "outputs": {"score": 0}}], + }, + } + component = FaithfulnessEvaluator.from_dict(data) + assert component.api == "openai" + assert component.generator.client.api_key == "test-api-key" + assert component.examples == [ + {"inputs": {"responses": "Football is the most popular sport."}, "outputs": {"score": 0}} + ] + + def test_run_calculates_mean_score(self, monkeypatch): + monkeypatch.setenv("OPENAI_API_KEY", "test-api-key") + component = FaithfulnessEvaluator() + + def generator_run(self, *args, **kwargs): + if "Football" in kwargs["prompt"]: + return {"replies": ['{"statements": ["a", "b"], "statement_scores": [1, 0]}']} + else: + return {"replies": ['{"statements": ["c", "d"], "statement_scores": [1, 1]}']} + + monkeypatch.setattr("haystack.components.generators.openai.OpenAIGenerator.run", generator_run) + + questions = ["Which is the most popular global sport?", "Who created the Python language?"] + contexts = [ + [ + "The popularity of sports can be measured in various ways, including TV viewership, social media presence, number of participants, and economic impact. Football is undoubtedly the world's most popular sport with major events like the FIFA World Cup and sports personalities like Ronaldo and Messi, drawing a followership of more than 4 billion people." + ], + [ + "Python, created by Guido van Rossum in the late 1980s, is a high-level general-purpose programming language. Its design philosophy emphasizes code readability, and its language constructs aim to help programmers write clear, logical code for both small and large-scale software projects." + ], + ] + responses = [ + "Football is the most popular sport with around 4 billion followers worldwide.", + "Python is a high-level general-purpose programming language that was created by George Lucas.", + ] + results = component.run(questions=questions, contexts=contexts, responses=responses) + assert results == { + "individual_scores": [0.5, 1], + "results": [ + {"score": 0.5, "statement_scores": [1, 0], "statements": ["a", "b"]}, + {"score": 1, "statement_scores": [1, 1], "statements": ["c", "d"]}, + ], + "score": 0.75, + }
LLM Eval - Implement Faithfulness/Factual Accuracy metric Depends on https://github.com/deepset-ai/haystack/issues/7022. Wrap `LLMEvaluator` to provide a component that calculates the "Faithfulness" or "Factual accuracy" based on the following inputs: - Questions - Contexts - Responses This component is meant to be plug-n-play, meaning it will provide a good enough starting prompt and examples. These should also be customizable by the user. A requirement for this component is that the LLM is expected to return a binary value for each input tuple. This will let us calculate a final score for the dataset ourselves.
0.0
189dfaf640caf7993d4ba367d6ea3bcb1b4eca11
[ "test/components/evaluators/test_faithfulness_evaluator.py::TestFaithfulnessEvaluator::test_init_default", "test/components/evaluators/test_faithfulness_evaluator.py::TestFaithfulnessEvaluator::test_init_fail_wo_openai_api_key", "test/components/evaluators/test_faithfulness_evaluator.py::TestFaithfulnessEvaluator::test_init_with_parameters", "test/components/evaluators/test_faithfulness_evaluator.py::TestFaithfulnessEvaluator::test_from_dict", "test/components/evaluators/test_faithfulness_evaluator.py::TestFaithfulnessEvaluator::test_run_calculates_mean_score" ]
[]
{ "failed_lite_validators": [ "has_added_files", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false }
2024-03-26 10:10:20+00:00
apache-2.0
1,873
deepset-ai__haystack-7519
diff --git a/docs/pydoc/config/evaluators_api.yml b/docs/pydoc/config/evaluators_api.yml index 9acd64ef..b24b3003 100644 --- a/docs/pydoc/config/evaluators_api.yml +++ b/docs/pydoc/config/evaluators_api.yml @@ -4,6 +4,7 @@ loaders: modules: [ "answer_exact_match", + "context_relevance", "document_map", "document_mrr", "document_recall", diff --git a/haystack/components/evaluators/__init__.py b/haystack/components/evaluators/__init__.py index f69c8257..631691c5 100644 --- a/haystack/components/evaluators/__init__.py +++ b/haystack/components/evaluators/__init__.py @@ -1,4 +1,5 @@ from .answer_exact_match import AnswerExactMatchEvaluator +from .context_relevance import ContextRelevanceEvaluator from .document_map import DocumentMAPEvaluator from .document_mrr import DocumentMRREvaluator from .document_recall import DocumentRecallEvaluator @@ -9,6 +10,7 @@ from .sas_evaluator import SASEvaluator __all__ = [ "AnswerExactMatchEvaluator", + "ContextRelevanceEvaluator", "DocumentMAPEvaluator", "DocumentMRREvaluator", "DocumentRecallEvaluator", diff --git a/haystack/components/evaluators/context_relevance.py b/haystack/components/evaluators/context_relevance.py new file mode 100644 index 00000000..d78ccfc7 --- /dev/null +++ b/haystack/components/evaluators/context_relevance.py @@ -0,0 +1,154 @@ +from typing import Any, Dict, List, Optional + +from numpy import mean as np_mean + +from haystack import default_from_dict +from haystack.components.evaluators.llm_evaluator import LLMEvaluator +from haystack.core.component import component +from haystack.utils import Secret, deserialize_secrets_inplace + +# Private global variable for default examples to include in the prompt if the user does not provide any examples +_DEFAULT_EXAMPLES = [ + { + "inputs": { + "questions": "What is the capital of Germany?", + "contexts": ["Berlin is the capital of Germany and was founded in 1244."], + }, + "outputs": { + "statements": ["Berlin is the capital of Germany.", "Berlin was founded in 1244."], + "statement_scores": [1, 0], + }, + }, + { + "inputs": {"questions": "What is the capital of France?", "contexts": ["Berlin is the capital of Germany."]}, + "outputs": {"statements": ["Berlin is the capital of Germany."], "statement_scores": [0]}, + }, + { + "inputs": {"questions": "What is the capital of Italy?", "contexts": ["Rome is the capital of Italy."]}, + "outputs": {"statements": ["Rome is the capital of Italy."], "statement_scores": [1]}, + }, +] + + +class ContextRelevanceEvaluator(LLMEvaluator): + """ + Evaluator that checks if a provided context is relevant to the question. + + An LLM separates the answer into multiple statements and checks whether the statement can be inferred from the + context or not. The final score for the full answer is a number from 0.0 to 1.0. It represents the proportion of + statements that can be inferred from the provided contexts. + + Usage example: + ```python + from haystack.components.evaluators import ContextRelevanceEvaluator + + questions = ["Who created the Python language?"] + contexts = [ + [ + "Python, created by Guido van Rossum in the late 1980s, is a high-level general-purpose programming language. Its design philosophy emphasizes code readability, and its language constructs aim to help programmers write clear, logical code for both small and large-scale software projects." + ], + ] + + evaluator = ContextRelevanceEvaluator() + result = evaluator.run(questions=questions, contexts=contexts) + print(result["score"]) + # 1.0 + print(result["individual_scores"]) + # [1.0] + print(result["results"]) + # [{'statements': ['Python, created by Guido van Rossum in the late 1980s.'], 'statement_scores': [1], 'score': 1.0}] + ``` + """ + + def __init__( + self, + examples: Optional[List[Dict[str, Any]]] = None, + api: str = "openai", + api_key: Secret = Secret.from_env_var("OPENAI_API_KEY"), + ): + """ + Creates an instance of ContextRelevanceEvaluator. + + :param examples: + Optional few-shot examples conforming to the expected input and output format of ContextRelevanceEvaluator. + Default examples will be used if none are provided. + Each example must be a dictionary with keys "inputs" and "outputs". + "inputs" must be a dictionary with keys "questions" and "contexts". + "outputs" must be a dictionary with "statements" and "statement_scores". + Expected format: + [{ + "inputs": { + "questions": "What is the capital of Italy?", "contexts": ["Rome is the capital of Italy."], + }, + "outputs": { + "statements": ["Rome is the capital of Italy."], + "statement_scores": [1], + }, + }] + :param api: + The API to use for calling an LLM through a Generator. + Supported APIs: "openai". + :param api_key: + The API key. + + """ + self.instructions = ( + "Your task is to judge how relevant the provided context is for answering a question. " + "First, please extract statements from the provided context. " + "Second, calculate a relevance score for each statement in the context. " + "The score is 1 if the statement is relevant to answer the question or 0 if it is not relevant." + ) + self.inputs = [("questions", List[str]), ("contexts", List[List[str]])] + self.outputs = ["statements", "statement_scores"] + self.examples = examples or _DEFAULT_EXAMPLES + self.api = api + self.api_key = api_key + + super().__init__( + instructions=self.instructions, + inputs=self.inputs, + outputs=self.outputs, + examples=self.examples, + api=self.api, + api_key=self.api_key, + ) + + @component.output_types(results=List[Dict[str, Any]]) + def run(self, questions: List[str], contexts: List[List[str]]) -> Dict[str, Any]: + """ + Run the LLM evaluator. + + :param questions: + A list of questions. + :param contexts: + A list of lists of contexts. Each list of contexts corresponds to one question. + :returns: + A dictionary with the following outputs: + - `score`: Mean context relevance score over all the provided input questions. + - `individual_scores`: A list of context relevance scores for each input question. + - `results`: A list of dictionaries with `statements` and `statement_scores` for each input context. + """ + result = super().run(questions=questions, contexts=contexts) + + # calculate average statement relevance score per query + for res in result["results"]: + res["score"] = np_mean(res["statement_scores"]) + + # calculate average context relevance score over all queries + result["score"] = np_mean([res["score"] for res in result["results"]]) + result["individual_scores"] = [res["score"] for res in result["results"]] + + return result + + @classmethod + def from_dict(cls, data: Dict[str, Any]) -> "ContextRelevanceEvaluator": + """ + Deserialize this component from a dictionary. + + :param data: + The dictionary representation of this component. + :returns: + The deserialized component instance. + """ + deserialize_secrets_inplace(data["init_parameters"], keys=["api_key"]) + return default_from_dict(cls, data) diff --git a/pyproject.toml b/pyproject.toml index b2e9202f..3c3833c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -139,18 +139,18 @@ extra-dependencies = [ [tool.hatch.envs.test.scripts] e2e = "pytest e2e" -unit = 'pytest --cov-report xml:coverage.xml --cov="haystack" -m "not integration" test {args:test}' -integration = 'pytest --maxfail=5 -m "integration" test' -integration-mac = 'pytest --maxfail=5 -m "integration" test -k "not tika"' -integration-windows = 'pytest --maxfail=5 -m "integration" test -k "not tika"' +unit = 'pytest --cov-report xml:coverage.xml --cov="haystack" -m "not integration" {args:test}' +integration = 'pytest --maxfail=5 -m "integration" {args:test}' +integration-mac = 'pytest --maxfail=5 -m "integration" -k "not tika" {args:test}' +integration-windows = 'pytest --maxfail=5 -m "integration" -k "not tika" {args:test}' types = "mypy --install-types --non-interactive --cache-dir=.mypy_cache/ {args:haystack}" lint = [ - "ruff {args:haystack}", + "ruff check {args:haystack}", "pylint -ry -j 0 {args:haystack}" ] lint-fix = [ "black .", - "ruff {args:haystack} --fix", + "ruff check {args:haystack} --fix", ] [tool.hatch.envs.readme] @@ -303,12 +303,10 @@ select = [ "ASYNC", # flake8-async "C4", # flake8-comprehensions "C90", # McCabe cyclomatic complexity - "CPY", # flake8-copyright "DJ", # flake8-django "E501", # Long lines "EXE", # flake8-executable "F", # Pyflakes - "FURB", # refurb "INT", # flake8-gettext "PERF", # Perflint "PL", # Pylint diff --git a/releasenotes/notes/context-relevance-04063b9dc9fe7379.yaml b/releasenotes/notes/context-relevance-04063b9dc9fe7379.yaml new file mode 100644 index 00000000..2ab79f87 --- /dev/null +++ b/releasenotes/notes/context-relevance-04063b9dc9fe7379.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + Add a new ContextRelevanceEvaluator component that can be used to evaluate whether retrieved documents are relevant to answer a question with a RAG pipeline. + Given a question and a list of retrieved document contents (contexts), an LLM is used to score to what extent the provided context is relevant. The score ranges from 0 to 1.
deepset-ai/haystack
3d0f7affed7b192d32d295a6c92bdff5e8f97de4
diff --git a/test/components/evaluators/test_context_relevance_evaluator.py b/test/components/evaluators/test_context_relevance_evaluator.py new file mode 100644 index 00000000..8bd1a3cf --- /dev/null +++ b/test/components/evaluators/test_context_relevance_evaluator.py @@ -0,0 +1,142 @@ +import os +from typing import List + +import pytest + +from haystack.components.evaluators import ContextRelevanceEvaluator +from haystack.utils.auth import Secret + + +class TestContextRelevanceEvaluator: + def test_init_default(self, monkeypatch): + monkeypatch.setenv("OPENAI_API_KEY", "test-api-key") + component = ContextRelevanceEvaluator() + assert component.api == "openai" + assert component.generator.client.api_key == "test-api-key" + assert component.instructions == ( + "Your task is to judge how relevant the provided context is for answering a question. " + "First, please extract statements from the provided context. " + "Second, calculate a relevance score for each statement in the context. " + "The score is 1 if the statement is relevant to answer the question or 0 if it is not relevant." + ) + assert component.inputs == [("questions", List[str]), ("contexts", List[List[str]])] + assert component.outputs == ["statements", "statement_scores"] + assert component.examples == [ + { + "inputs": { + "questions": "What is the capital of Germany?", + "contexts": ["Berlin is the capital of Germany and was founded in 1244."], + }, + "outputs": { + "statements": ["Berlin is the capital of Germany.", "Berlin was founded in 1244."], + "statement_scores": [1, 0], + }, + }, + { + "inputs": { + "questions": "What is the capital of France?", + "contexts": ["Berlin is the capital of Germany."], + }, + "outputs": {"statements": ["Berlin is the capital of Germany."], "statement_scores": [0]}, + }, + { + "inputs": {"questions": "What is the capital of Italy?", "contexts": ["Rome is the capital of Italy."]}, + "outputs": {"statements": ["Rome is the capital of Italy."], "statement_scores": [1]}, + }, + ] + + def test_init_fail_wo_openai_api_key(self, monkeypatch): + monkeypatch.delenv("OPENAI_API_KEY", raising=False) + with pytest.raises(ValueError, match="None of the .* environment variables are set"): + ContextRelevanceEvaluator() + + def test_init_with_parameters(self): + component = ContextRelevanceEvaluator( + api_key=Secret.from_token("test-api-key"), + api="openai", + examples=[ + {"inputs": {"questions": "Damn, this is straight outta hell!!!"}, "outputs": {"custom_score": 1}}, + {"inputs": {"questions": "Football is the most popular sport."}, "outputs": {"custom_score": 0}}, + ], + ) + assert component.generator.client.api_key == "test-api-key" + assert component.api == "openai" + assert component.examples == [ + {"inputs": {"questions": "Damn, this is straight outta hell!!!"}, "outputs": {"custom_score": 1}}, + {"inputs": {"questions": "Football is the most popular sport."}, "outputs": {"custom_score": 0}}, + ] + + def test_from_dict(self, monkeypatch): + monkeypatch.setenv("OPENAI_API_KEY", "test-api-key") + + data = { + "type": "haystack.components.evaluators.context_relevance.ContextRelevanceEvaluator", + "init_parameters": { + "api_key": {"env_vars": ["OPENAI_API_KEY"], "strict": True, "type": "env_var"}, + "api": "openai", + "examples": [{"inputs": {"questions": "What is football?"}, "outputs": {"score": 0}}], + }, + } + component = ContextRelevanceEvaluator.from_dict(data) + assert component.api == "openai" + assert component.generator.client.api_key == "test-api-key" + assert component.examples == [{"inputs": {"questions": "What is football?"}, "outputs": {"score": 0}}] + + def test_run_calculates_mean_score(self, monkeypatch): + monkeypatch.setenv("OPENAI_API_KEY", "test-api-key") + component = ContextRelevanceEvaluator() + + def generator_run(self, *args, **kwargs): + if "Football" in kwargs["prompt"]: + return {"replies": ['{"statements": ["a", "b"], "statement_scores": [1, 0]}']} + else: + return {"replies": ['{"statements": ["c", "d"], "statement_scores": [1, 1]}']} + + monkeypatch.setattr("haystack.components.generators.openai.OpenAIGenerator.run", generator_run) + + questions = ["Which is the most popular global sport?", "Who created the Python language?"] + contexts = [ + [ + "The popularity of sports can be measured in various ways, including TV viewership, social media " + "presence, number of participants, and economic impact. Football is undoubtedly the world's most " + "popular sport with major events like the FIFA World Cup and sports personalities like Ronaldo and " + "Messi, drawing a followership of more than 4 billion people." + ], + [ + "Python, created by Guido van Rossum in the late 1980s, is a high-level general-purpose programming " + "language. Its design philosophy emphasizes code readability, and its language constructs aim to help " + "programmers write clear, logical code for both small and large-scale software projects." + ], + ] + results = component.run(questions=questions, contexts=contexts) + assert results == { + "individual_scores": [0.5, 1], + "results": [ + {"score": 0.5, "statement_scores": [1, 0], "statements": ["a", "b"]}, + {"score": 1, "statement_scores": [1, 1], "statements": ["c", "d"]}, + ], + "score": 0.75, + } + + def test_run_missing_parameters(self, monkeypatch): + monkeypatch.setenv("OPENAI_API_KEY", "test-api-key") + component = ContextRelevanceEvaluator() + with pytest.raises(TypeError, match="missing 2 required positional arguments"): + component.run() + + @pytest.mark.skipif( + not os.environ.get("OPENAI_API_KEY", None), + reason="Export an env var called OPENAI_API_KEY containing the OpenAI API key to run this test.", + ) + @pytest.mark.integration + def test_live_run(self): + questions = ["Who created the Python language?"] + contexts = [["Python, created by Guido van Rossum, is a high-level general-purpose programming language."]] + + evaluator = ContextRelevanceEvaluator() + result = evaluator.run(questions=questions, contexts=contexts) + assert result["score"] == 1.0 + assert result["individual_scores"] == [1.0] + assert result["results"][0]["score"] == 1.0 + assert result["results"][0]["statement_scores"] == [1.0] + assert "Guido van Rossum" in result["results"][0]["statements"][0]
Custom LLM-based evaluator in Haystack core Now that we have integrations for third party LLM eval frameworks, we need to add support for a handful of LLM-based metrics that we officially support as part of core. This will be done by implementing a custom `LLMEvaluator` component that wraps around one or more of our generator APIs. We'll then build a small section of curated metrics on top of this component, all the while allowing the user to change the underlying service (OpenAI, Cohere, etc) and the associated prompts at will ```[tasklist] ### Tasks - [ ] LLM Eval - Implement custom LLM evaluator component in core - [ ] LLM Eval - Implement Faithfulness/Factual Accuracy metric - [ ] LLM Eval - Implement Context Relevance metric ```
0.0
3d0f7affed7b192d32d295a6c92bdff5e8f97de4
[ "test/components/evaluators/test_context_relevance_evaluator.py::TestContextRelevanceEvaluator::test_init_default", "test/components/evaluators/test_context_relevance_evaluator.py::TestContextRelevanceEvaluator::test_init_fail_wo_openai_api_key", "test/components/evaluators/test_context_relevance_evaluator.py::TestContextRelevanceEvaluator::test_init_with_parameters", "test/components/evaluators/test_context_relevance_evaluator.py::TestContextRelevanceEvaluator::test_from_dict", "test/components/evaluators/test_context_relevance_evaluator.py::TestContextRelevanceEvaluator::test_run_calculates_mean_score", "test/components/evaluators/test_context_relevance_evaluator.py::TestContextRelevanceEvaluator::test_run_missing_parameters" ]
[]
{ "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false }
2024-04-09 15:52:30+00:00
apache-2.0
1,874
deepset-ai__haystack-7599
diff --git a/haystack/components/preprocessors/document_splitter.py b/haystack/components/preprocessors/document_splitter.py index adea7cc3..033f55a8 100644 --- a/haystack/components/preprocessors/document_splitter.py +++ b/haystack/components/preprocessors/document_splitter.py @@ -1,5 +1,5 @@ from copy import deepcopy -from typing import List, Literal +from typing import Dict, List, Literal, Tuple from more_itertools import windowed @@ -53,7 +53,7 @@ class DocumentSplitter: :returns: A dictionary with the following key: - `documents`: List of documents with the split texts. A metadata field "source_id" is added to each - document to keep track of the original document that was split. Other metadata are copied from the original + document to keep track of the original document that was split. Another metadata field "page_number" is added to each number to keep track of the page it belonged to in the original document. Other metadata are copied from the original document. :raises TypeError: if the input is not a list of Documents. @@ -70,10 +70,12 @@ class DocumentSplitter: f"DocumentSplitter only works with text documents but document.content for document ID {doc.id} is None." ) units = self._split_into_units(doc.content, self.split_by) - text_splits = self._concatenate_units(units, self.split_length, self.split_overlap) + text_splits, splits_pages = self._concatenate_units(units, self.split_length, self.split_overlap) metadata = deepcopy(doc.meta) metadata["source_id"] = doc.id - split_docs += [Document(content=txt, meta=metadata) for txt in text_splits] + split_docs += self._create_docs_from_splits( + text_splits=text_splits, splits_pages=splits_pages, meta=metadata + ) return {"documents": split_docs} def _split_into_units(self, text: str, split_by: Literal["word", "sentence", "passage", "page"]) -> List[str]: @@ -95,15 +97,40 @@ class DocumentSplitter: units[i] += split_at return units - def _concatenate_units(self, elements: List[str], split_length: int, split_overlap: int) -> List[str]: + def _concatenate_units( + self, elements: List[str], split_length: int, split_overlap: int + ) -> Tuple[List[str], List[int]]: """ - Concatenates the elements into parts of split_length units. + Concatenates the elements into parts of split_length units keeping track of the original page number that each element belongs. """ text_splits = [] + splits_pages = [] + cur_page = 1 segments = windowed(elements, n=split_length, step=split_length - split_overlap) for seg in segments: current_units = [unit for unit in seg if unit is not None] txt = "".join(current_units) if len(txt) > 0: text_splits.append(txt) - return text_splits + splits_pages.append(cur_page) + processed_units = current_units[: split_length - split_overlap] + if self.split_by == "page": + num_page_breaks = len(processed_units) + else: + num_page_breaks = sum(processed_unit.count("\f") for processed_unit in processed_units) + cur_page += num_page_breaks + return text_splits, splits_pages + + @staticmethod + def _create_docs_from_splits(text_splits: List[str], splits_pages: List[int], meta: Dict) -> List[Document]: + """ + Creates Document objects from text splits enriching them with page number and the metadata of the original document. + """ + documents: List[Document] = [] + + for i, txt in enumerate(text_splits): + meta = deepcopy(meta) + doc = Document(content=txt, meta=meta) + doc.meta["page_number"] = splits_pages[i] + documents.append(doc) + return documents diff --git a/releasenotes/notes/add-page-number-to-document-splitter-162e9dc7443575f0.yaml b/releasenotes/notes/add-page-number-to-document-splitter-162e9dc7443575f0.yaml new file mode 100644 index 00000000..8c97663c --- /dev/null +++ b/releasenotes/notes/add-page-number-to-document-splitter-162e9dc7443575f0.yaml @@ -0,0 +1,7 @@ +--- +highlights: > + Add the "page_number" field to the metadata of all output documents. + +enhancements: + - | + Now the DocumentSplitter adds the "page_number" field to the metadata of all output documents to keep track of the page of the original document it belongs to.
deepset-ai/haystack
8d04e530da24b5e5c8c11af29829714eeea47db2
diff --git a/test/components/preprocessors/test_document_splitter.py b/test/components/preprocessors/test_document_splitter.py index 479f0d50..4874c25b 100644 --- a/test/components/preprocessors/test_document_splitter.py +++ b/test/components/preprocessors/test_document_splitter.py @@ -141,3 +141,98 @@ class TestDocumentSplitter: for doc, split_doc in zip(documents, result["documents"]): assert doc.meta.items() <= split_doc.meta.items() assert split_doc.content == "Text." + + def test_add_page_number_to_metadata_with_no_overlap_word_split(self): + splitter = DocumentSplitter(split_by="word", split_length=2) + doc1 = Document(content="This is some text.\f This text is on another page.") + doc2 = Document(content="This content has two.\f\f page brakes.") + result = splitter.run(documents=[doc1, doc2]) + + expected_pages = [1, 1, 2, 2, 2, 1, 1, 3] + for doc, p in zip(result["documents"], expected_pages): + assert doc.meta["page_number"] == p + + def test_add_page_number_to_metadata_with_no_overlap_sentence_split(self): + splitter = DocumentSplitter(split_by="sentence", split_length=1) + doc1 = Document(content="This is some text.\f This text is on another page.") + doc2 = Document(content="This content has two.\f\f page brakes.") + result = splitter.run(documents=[doc1, doc2]) + + expected_pages = [1, 1, 1, 1] + for doc, p in zip(result["documents"], expected_pages): + assert doc.meta["page_number"] == p + + def test_add_page_number_to_metadata_with_no_overlap_passage_split(self): + splitter = DocumentSplitter(split_by="passage", split_length=1) + doc1 = Document( + content="This is a text with some words.\f There is a second sentence.\n\nAnd there is a third sentence.\n\nAnd more passages.\n\n\f And another passage." + ) + result = splitter.run(documents=[doc1]) + + expected_pages = [1, 2, 2, 2] + for doc, p in zip(result["documents"], expected_pages): + assert doc.meta["page_number"] == p + + def test_add_page_number_to_metadata_with_no_overlap_page_split(self): + splitter = DocumentSplitter(split_by="page", split_length=1) + doc1 = Document( + content="This is a text with some words. There is a second sentence.\f And there is a third sentence.\f And another passage." + ) + result = splitter.run(documents=[doc1]) + expected_pages = [1, 2, 3] + for doc, p in zip(result["documents"], expected_pages): + assert doc.meta["page_number"] == p + + splitter = DocumentSplitter(split_by="page", split_length=2) + doc1 = Document( + content="This is a text with some words. There is a second sentence.\f And there is a third sentence.\f And another passage." + ) + result = splitter.run(documents=[doc1]) + expected_pages = [1, 3] + + for doc, p in zip(result["documents"], expected_pages): + assert doc.meta["page_number"] == p + + def test_add_page_number_to_metadata_with_overlap_word_split(self): + splitter = DocumentSplitter(split_by="word", split_length=3, split_overlap=1) + doc1 = Document(content="This is some text. And\f this text is on another page.") + doc2 = Document(content="This content has two.\f\f page brakes.") + result = splitter.run(documents=[doc1, doc2]) + + expected_pages = [1, 1, 1, 2, 2, 1, 1, 3] + for doc, p in zip(result["documents"], expected_pages): + print(doc.content, doc.meta, p) + assert doc.meta["page_number"] == p + + def test_add_page_number_to_metadata_with_overlap_sentence_split(self): + splitter = DocumentSplitter(split_by="sentence", split_length=2, split_overlap=1) + doc1 = Document(content="This is some text. And this is more text.\f This text is on another page. End.") + doc2 = Document(content="This content has two.\f\f page brakes. More text.") + result = splitter.run(documents=[doc1, doc2]) + + expected_pages = [1, 1, 1, 2, 1, 1] + for doc, p in zip(result["documents"], expected_pages): + print(doc.content, doc.meta, p) + assert doc.meta["page_number"] == p + + def test_add_page_number_to_metadata_with_overlap_passage_split(self): + splitter = DocumentSplitter(split_by="passage", split_length=2, split_overlap=1) + doc1 = Document( + content="This is a text with some words.\f There is a second sentence.\n\nAnd there is a third sentence.\n\nAnd more passages.\n\n\f And another passage." + ) + result = splitter.run(documents=[doc1]) + + expected_pages = [1, 2, 2] + for doc, p in zip(result["documents"], expected_pages): + assert doc.meta["page_number"] == p + + def test_add_page_number_to_metadata_with_overlap_page_split(self): + splitter = DocumentSplitter(split_by="page", split_length=2, split_overlap=1) + doc1 = Document( + content="This is a text with some words. There is a second sentence.\f And there is a third sentence.\f And another passage." + ) + result = splitter.run(documents=[doc1]) + expected_pages = [1, 2, 3] + + for doc, p in zip(result["documents"], expected_pages): + assert doc.meta["page_number"] == p
feat: Add `page_number` to meta of Documents in `DocumentSplitter` **Is your feature request related to a problem? Please describe.** In Haystack v1 we had an option in the Preprocessor to add the original `page_number` to a Document's meta data when it was split into a chunk. This feature made down stream applications of visualizing the retrieved text from original files (e.g. PDFs) very easy and straightforward, so I'd like to see it in Haystack v2 as well. **Describe the solution you'd like** I would like to add the option to store the `page_number` in the meta info of the Document in the DocumentSplitter component. I believe we can use a similar/same implementation of calculating this like we did for the Preprocessor.
0.0
8d04e530da24b5e5c8c11af29829714eeea47db2
[ "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_add_page_number_to_metadata_with_no_overlap_word_split", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_add_page_number_to_metadata_with_no_overlap_sentence_split", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_add_page_number_to_metadata_with_no_overlap_passage_split", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_add_page_number_to_metadata_with_no_overlap_page_split", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_add_page_number_to_metadata_with_overlap_word_split", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_add_page_number_to_metadata_with_overlap_sentence_split", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_add_page_number_to_metadata_with_overlap_passage_split", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_add_page_number_to_metadata_with_overlap_page_split" ]
[ "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_non_text_document", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_single_doc", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_empty_list", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_unsupported_split_by", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_unsupported_split_length", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_unsupported_split_overlap", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_split_by_word", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_split_by_word_multiple_input_docs", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_split_by_sentence", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_split_by_passage", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_split_by_page", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_split_by_word_with_overlap", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_source_id_stored_in_metadata", "test/components/preprocessors/test_document_splitter.py::TestDocumentSplitter::test_copy_metadata" ]
{ "failed_lite_validators": [ "has_added_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2024-04-25 19:09:50+00:00
apache-2.0
1,875
delph-in__pydelphin-359
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2a5298f..0ef3a60 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -37,4 +37,4 @@ jobs: pytest . - name: Type-check with mypy run: | - mypy delphin --namespace-packages --explicit-package-bases --ignore-missing-imports + mypy delphin --namespace-packages --explicit-package-bases --ignore-missing-imports --implicit-optional diff --git a/CHANGELOG.md b/CHANGELOG.md index e7ef17a..b11f97b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## Unreleased + +### Fixed + +* `delphin.tdl.ConsList.values()` and `delphin.tdl.DiffList.values()` + now treat explicit sublists as regular items instead of descending + into their structures ([#357]) + + ## [v1.7.0] **Release date: 2022-10-13** @@ -1556,3 +1565,4 @@ information about changes, except for [#343]: https://github.com/delph-in/pydelphin/issues/343 [#344]: https://github.com/delph-in/pydelphin/issues/344 [#352]: https://github.com/delph-in/pydelphin/issues/352 +[#357]: https://github.com/delph-in/pydelphin/issues/357 diff --git a/delphin/cli/convert.py b/delphin/cli/convert.py index 5d50e28..4dadf80 100644 --- a/delphin/cli/convert.py +++ b/delphin/cli/convert.py @@ -9,9 +9,7 @@ with "-lines" to enable line-based reading/writing, in which case the import sys import argparse -import warnings -from delphin.exceptions import PyDelphinWarning from delphin.commands import convert from delphin import util diff --git a/delphin/cli/repp.py b/delphin/cli/repp.py index f47571c..ed0cdb8 100644 --- a/delphin/cli/repp.py +++ b/delphin/cli/repp.py @@ -11,9 +11,7 @@ useful for debugging REPP modules. import sys import argparse -import warnings -from delphin.exceptions import PyDelphinWarning from delphin.commands import repp diff --git a/delphin/tdl.py b/delphin/tdl.py index aa7a18a..ec330f4 100644 --- a/delphin/tdl.py +++ b/delphin/tdl.py @@ -253,6 +253,10 @@ class AVM(FeatureStructure, Term): return fs +class _ImplicitAVM(AVM): + """AVM implicitly constructed by list syntax.""" + + class ConsList(AVM): """ AVM subclass for cons-lists (``< ... >``) @@ -308,12 +312,7 @@ class ConsList(AVM): if self._avm is None: return [] else: - vals = [val for _, val in _collect_list_items(self)] - # the < a . b > notation puts b on the last REST path, - # which is not returned by _collect_list_items() - if self.terminated and self[self._last_path] is not None: - vals.append(self[self._last_path]) - return vals + return [val for _, val in _collect_list_items(self)] def append(self, value): """ @@ -330,7 +329,7 @@ class ConsList(AVM): path += '.' self[path + LIST_HEAD] = value self._last_path = path + LIST_TAIL - self[self._last_path] = AVM() + self[self._last_path] = _ImplicitAVM() else: raise TDLError('Cannot append to a closed list.') @@ -395,7 +394,7 @@ class DiffList(AVM): if values: # use ConsList to construct the list, but discard the class tmplist = ConsList(values, end=cr) - dl_list = AVM() + dl_list = _ImplicitAVM() dl_list._avm.update(tmplist._avm) dl_list._feats = tmplist._feats self.last = 'LIST.' + tmplist._last_path @@ -416,16 +415,25 @@ class DiffList(AVM): """ Return the list of values in the DiffList feature structure. """ - return [val for _, val - in _collect_list_items(self.get(DIFF_LIST_LIST))] + if isinstance(self[DIFF_LIST_LIST], Coreference): + vals = [] + else: + vals = [val for _, val + in _collect_list_items(self.get(DIFF_LIST_LIST))] + vals.pop() # last item of diff list is coreference + return vals def _collect_list_items(d): - if d is None or not isinstance(d, AVM) or d.get(LIST_HEAD) is None: + if not isinstance(d, AVM) or d.get(LIST_HEAD) is None: return [] vals = [(LIST_HEAD, d[LIST_HEAD])] - vals.extend((LIST_TAIL + '.' + path, val) - for path, val in _collect_list_items(d.get(LIST_TAIL))) + rest = d[LIST_TAIL] + if isinstance(rest, _ImplicitAVM): + vals.extend((LIST_TAIL + '.' + path, val) + for path, val in _collect_list_items(rest)) + elif rest is not None: + vals.append((LIST_TAIL, rest)) return vals
delph-in/pydelphin
b5c7094691f01a161983224fe78b2ad26e7fea9b
diff --git a/tests/tdl_test.py b/tests/tdl_test.py index b4b88d2..5cae05c 100644 --- a/tests/tdl_test.py +++ b/tests/tdl_test.py @@ -960,3 +960,18 @@ def test_format_environments(): ' :end :instance.\n' ' :include "another.tdl".\n' ':end :type.') + + +def test_issue_357(): + # https://github.com/delph-in/pydelphin/issues/357 + t = TypeDefinition( + 'id', + ConsList( + [TypeIdentifier('a')], + end=ConsList([TypeIdentifier('b')], end=TypeIdentifier('c')) + ) + ) + c = t.conjunction.terms[0] + assert isinstance(c, ConsList) + assert len(c.values()) == 2 + assert tdl.format(t) == 'id := < a . < b . c > >.'
format function for TypeDefinition seems to mess up some of the Lists If I `iterparse` this TypeDefinition ``` main-vprn := basic-main-verb & norm-pronominal-verb & [ SYNSEM.LOCAL.CAT.VAL [ SUBJ < #subj >, COMPS < #comps >, CLTS #clt ], ARG-ST < #subj . < #comps . #clt > > ]. ``` and then print it back out using the `format` function, I get this: ``` main-vprn := basic-main-verb & norm-pronominal-verb & [ SYNSEM.LOCAL.CAT.VAL [ SUBJ < #subj >, COMPS < #comps >, CLTS #clt ], ARG-ST < #subj, #comps . < #comps . #clt > > ]. <----- Note the extra `,#comps`which used to not be there before ```
0.0
b5c7094691f01a161983224fe78b2ad26e7fea9b
[ "tests/tdl_test.py::test_issue_357" ]
[ "tests/tdl_test.py::test_Term", "tests/tdl_test.py::test_TypeIdentifier", "tests/tdl_test.py::test_String", "tests/tdl_test.py::test_Regex", "tests/tdl_test.py::test_AVM", "tests/tdl_test.py::test_ConsList", "tests/tdl_test.py::test_DiffList", "tests/tdl_test.py::test_Coreference", "tests/tdl_test.py::TestConjunction::test_init", "tests/tdl_test.py::TestConjunction::test_and", "tests/tdl_test.py::TestConjunction::test_eq", "tests/tdl_test.py::TestConjunction::test__contains__", "tests/tdl_test.py::TestConjunction::test__getitem__", "tests/tdl_test.py::TestConjunction::test__setitem__", "tests/tdl_test.py::TestConjunction::test__setitem__issue293", "tests/tdl_test.py::TestConjunction::test__delitem__", "tests/tdl_test.py::TestConjunction::test_get", "tests/tdl_test.py::TestConjunction::test_normalize", "tests/tdl_test.py::TestConjunction::test_terms", "tests/tdl_test.py::TestConjunction::test_add", "tests/tdl_test.py::TestConjunction::test_types", "tests/tdl_test.py::TestConjunction::test_features", "tests/tdl_test.py::TestConjunction::test_string", "tests/tdl_test.py::test_TypeDefinition", "tests/tdl_test.py::test_TypeAddendum", "tests/tdl_test.py::test_LexicalRuleDefinition", "tests/tdl_test.py::test_parse_identifiers", "tests/tdl_test.py::test_parse_supertypes", "tests/tdl_test.py::test_parse_no_features", "tests/tdl_test.py::test_parse_string_features", "tests/tdl_test.py::test_quoted_symbol", "tests/tdl_test.py::test_parse_type_features", "tests/tdl_test.py::test_parse_cons_list", "tests/tdl_test.py::test_issue_294", "tests/tdl_test.py::test_parse_diff_list", "tests/tdl_test.py::test_parse_multiple_features", "tests/tdl_test.py::test_parse_multiple_avms", "tests/tdl_test.py::test_parse_feature_path", "tests/tdl_test.py::test_parse_coreferences", "tests/tdl_test.py::test_parse_typedef", "tests/tdl_test.py::test_parse_typeaddendum", "tests/tdl_test.py::test_parse_lexicalruledefinition", "tests/tdl_test.py::test_parse_docstrings", "tests/tdl_test.py::test_parse_letterset", "tests/tdl_test.py::test_parse_wildcard", "tests/tdl_test.py::test_parse_linecomment", "tests/tdl_test.py::test_parse_blockcomment", "tests/tdl_test.py::test_parse_environments", "tests/tdl_test.py::test_format_TypeTerms", "tests/tdl_test.py::test_format_AVM", "tests/tdl_test.py::test_format_lists", "tests/tdl_test.py::test_format_docstring_terms", "tests/tdl_test.py::test_format_Conjunction", "tests/tdl_test.py::test_format_typedefs", "tests/tdl_test.py::test_format_morphsets", "tests/tdl_test.py::test_format_environments" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-01-03 07:08:39+00:00
mit
1,876
delph-in__pydelphin-362
diff --git a/CHANGELOG.md b/CHANGELOG.md index b99690f..1163e8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Unreleased +### Added + +* `delphin.tdl.LineComment` class ([#356]) +* `delphin.tdl.BlockComment` class ([#356]) + ### Fixed * `delphin.tdl.ConsList.values()` and `delphin.tdl.DiffList.values()` @@ -9,6 +14,11 @@ into their structures ([#357]) * Implicit optional types are made explicit ([#360]) +### Changed + +* TDL parsing now models line and block comments ([#356]) +* TDL formatting now formats `LineComment` and `BlockComment` classes ([#356]) + ## [v1.7.0] @@ -1566,5 +1576,6 @@ information about changes, except for [#343]: https://github.com/delph-in/pydelphin/issues/343 [#344]: https://github.com/delph-in/pydelphin/issues/344 [#352]: https://github.com/delph-in/pydelphin/issues/352 +[#356]: https://github.com/delph-in/pydelphin/issues/356 [#357]: https://github.com/delph-in/pydelphin/issues/357 [#360]: https://github.com/delph-in/pydelphin/issues/360 diff --git a/delphin/tdl.py b/delphin/tdl.py index ec330f4..4bb0ae5 100644 --- a/delphin/tdl.py +++ b/delphin/tdl.py @@ -853,6 +853,14 @@ class FileInclude: self.path = Path(basedir, value).with_suffix('.tdl') +class LineComment(str): + """Single-line comments in TDL.""" + + +class BlockComment(str): + """Multi-line comments in TDL.""" + + # NOTE: be careful rearranging subpatterns in _tdl_lex_re; some must # appear before others, e.g., """ before ", <! before <, etc., # to prevent short-circuiting from blocking the larger patterns @@ -1055,9 +1063,9 @@ def _parse_tdl(tokens, path): except StopIteration: # normal EOF break if gid == 2: - yield ('BlockComment', token, line_no) + yield ('BlockComment', BlockComment(token), line_no) elif gid == 3: - yield ('LineComment', token, line_no) + yield ('LineComment', LineComment(token), line_no) elif gid == 20: obj = _parse_letterset(token, line_no) yield (obj.__class__.__name__, obj, line_no) @@ -1371,6 +1379,10 @@ def format(obj, indent=0): return _format_environment(obj, indent) elif isinstance(obj, FileInclude): return _format_include(obj, indent) + elif isinstance(obj, LineComment): + return _format_linecomment(obj, indent) + elif isinstance(obj, BlockComment): + return _format_blockcomment(obj, indent) else: raise ValueError(f'cannot format object as TDL: {obj!r}') @@ -1584,3 +1596,11 @@ def _format_environment(env, indent): def _format_include(fi, indent): return '{}:include "{}".'.format(' ' * indent, fi.value) + + +def _format_linecomment(obj, indent): + return '{};{}'.format(' ' * indent, str(obj)) + + +def _format_blockcomment(obj, indent): + return '{}#|{}|#'.format(' ' * indent, str(obj)) diff --git a/docs/api/delphin.tdl.rst b/docs/api/delphin.tdl.rst index 2d45274..f07b863 100644 --- a/docs/api/delphin.tdl.rst +++ b/docs/api/delphin.tdl.rst @@ -166,6 +166,16 @@ Environments and File Inclusion :members: +Comments +'''''''' + +.. autoclass:: LineComment + :members: + +.. autoclass:: BlockComment + :members: + + Exceptions and Warnings -----------------------
delph-in/pydelphin
4f71897b21f19be1c7efe219c02495cea911714b
diff --git a/tests/tdl_test.py b/tests/tdl_test.py index 5cae05c..968691d 100644 --- a/tests/tdl_test.py +++ b/tests/tdl_test.py @@ -24,6 +24,8 @@ from delphin.tdl import ( TypeEnvironment, InstanceEnvironment, FileInclude, + LineComment, + BlockComment, TDLError, TDLSyntaxError, TDLWarning) @@ -721,11 +723,13 @@ def test_parse_wildcard(): def test_parse_linecomment(): lc = tdlparse('; this is a comment\n') assert lc == ' this is a comment' + assert isinstance(lc, LineComment) def test_parse_blockcomment(): bc = tdlparse('#| this is a comment\n on multiple lines|#') assert bc == ' this is a comment\n on multiple lines' + assert isinstance(bc, BlockComment) def test_parse_environments(): @@ -962,6 +966,24 @@ def test_format_environments(): ':end :type.') +def test_format_fileinclude(): + assert tdl.format(FileInclude('foo.tdl')) == ':include "foo.tdl".' + + +def test_format_linecomment(): + assert tdl.format(LineComment(' a comment')) == '; a comment' + assert tdl.format(LineComment('; two semicolons')) == ';; two semicolons' + + +def test_format_blockcomment(): + assert tdl.format( + BlockComment(' a block comment ') + ) == '#| a block comment |#' + assert tdl.format( + BlockComment('\n one\n two\n') + ) == '#|\n one\n two\n|#' + + def test_issue_357(): # https://github.com/delph-in/pydelphin/issues/357 t = TypeDefinition(
format function for LineComment and BlockComment If I understand right, the `format` method is not currently implemented for all Events, in particular it is not implemented for LineComment and BlockComment? This would be useful in scenarios when someone is automatically updating part of a large TDL file and wants to copy large parts of it without modifying them (while modifying other parts).
0.0
4f71897b21f19be1c7efe219c02495cea911714b
[ "tests/tdl_test.py::test_Term", "tests/tdl_test.py::test_TypeIdentifier", "tests/tdl_test.py::test_String", "tests/tdl_test.py::test_Regex", "tests/tdl_test.py::test_AVM", "tests/tdl_test.py::test_ConsList", "tests/tdl_test.py::test_DiffList", "tests/tdl_test.py::test_Coreference", "tests/tdl_test.py::TestConjunction::test_init", "tests/tdl_test.py::TestConjunction::test_and", "tests/tdl_test.py::TestConjunction::test_eq", "tests/tdl_test.py::TestConjunction::test__contains__", "tests/tdl_test.py::TestConjunction::test__getitem__", "tests/tdl_test.py::TestConjunction::test__setitem__", "tests/tdl_test.py::TestConjunction::test__setitem__issue293", "tests/tdl_test.py::TestConjunction::test__delitem__", "tests/tdl_test.py::TestConjunction::test_get", "tests/tdl_test.py::TestConjunction::test_normalize", "tests/tdl_test.py::TestConjunction::test_terms", "tests/tdl_test.py::TestConjunction::test_add", "tests/tdl_test.py::TestConjunction::test_types", "tests/tdl_test.py::TestConjunction::test_features", "tests/tdl_test.py::TestConjunction::test_string", "tests/tdl_test.py::test_TypeDefinition", "tests/tdl_test.py::test_TypeAddendum", "tests/tdl_test.py::test_LexicalRuleDefinition", "tests/tdl_test.py::test_parse_identifiers", "tests/tdl_test.py::test_parse_supertypes", "tests/tdl_test.py::test_parse_no_features", "tests/tdl_test.py::test_parse_string_features", "tests/tdl_test.py::test_quoted_symbol", "tests/tdl_test.py::test_parse_type_features", "tests/tdl_test.py::test_parse_cons_list", "tests/tdl_test.py::test_issue_294", "tests/tdl_test.py::test_parse_diff_list", "tests/tdl_test.py::test_parse_multiple_features", "tests/tdl_test.py::test_parse_multiple_avms", "tests/tdl_test.py::test_parse_feature_path", "tests/tdl_test.py::test_parse_coreferences", "tests/tdl_test.py::test_parse_typedef", "tests/tdl_test.py::test_parse_typeaddendum", "tests/tdl_test.py::test_parse_lexicalruledefinition", "tests/tdl_test.py::test_parse_docstrings", "tests/tdl_test.py::test_parse_letterset", "tests/tdl_test.py::test_parse_wildcard", "tests/tdl_test.py::test_parse_linecomment", "tests/tdl_test.py::test_parse_blockcomment", "tests/tdl_test.py::test_parse_environments", "tests/tdl_test.py::test_format_TypeTerms", "tests/tdl_test.py::test_format_AVM", "tests/tdl_test.py::test_format_lists", "tests/tdl_test.py::test_format_docstring_terms", "tests/tdl_test.py::test_format_Conjunction", "tests/tdl_test.py::test_format_typedefs", "tests/tdl_test.py::test_format_morphsets", "tests/tdl_test.py::test_format_environments", "tests/tdl_test.py::test_format_fileinclude", "tests/tdl_test.py::test_format_linecomment", "tests/tdl_test.py::test_format_blockcomment", "tests/tdl_test.py::test_issue_357" ]
[]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-01-08 02:33:35+00:00
mit
1,877
deppen8__pandas-vet-127
diff --git a/src/pandas_vet/__init__.py b/src/pandas_vet/__init__.py index 9060511..2a4f0e0 100644 --- a/src/pandas_vet/__init__.py +++ b/src/pandas_vet/__init__.py @@ -173,7 +173,11 @@ def check_inplace_false(node: ast.Call) -> List: """ errors = [] for kw in node.keywords: - if kw.arg == "inplace" and kw.value.value is True: + if ( + kw.arg == "inplace" + and hasattr(kw.value, "value") + and kw.value.value is True + ): errors.append(PD002(node.lineno, node.col_offset)) return errors
deppen8/pandas-vet
b45e2283b2d880f88401992424c59682d0e4c380
diff --git a/tests/test_PD002.py b/tests/test_PD002.py index 7034674..f34fb1b 100644 --- a/tests/test_PD002.py +++ b/tests/test_PD002.py @@ -24,3 +24,16 @@ def test_PD002_fail(): actual = list(VetPlugin(tree).run()) expected = [PD002(1, 0)] assert actual == expected + + +def test_PD002_with_variable_does_not_crash(): + """ + Test that using inplace=<some variable> does not raise Exceptions. + + It will not be able to infer the value of the variable, so no errors either. + """ + statement = """use_inplace=True; df.drop(['a'], axis=1, inplace=use_inplace)""" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected
inplace set to a variable raises exception **Describe the bug** raised exception **To Reproduce** Steps to reproduce the behavior: Have the following code in a file ```python def some_function(dataFrame, in_place=False): return dataFrame.drop([], inplace=in_place) ``` **Expected behavior** Allow `flake8` to report violations and not throw exceptions. **Screenshots** <img width="732" alt="Screen Shot 2021-09-11 at 11 42 54 AM" src="https://user-images.githubusercontent.com/82820859/132955083-596471df-a18d-4b6d-b45b-afbdaae3596d.png"> **Additional context** ``` bash-5.1# cat /usr/lib/python3.9/site-packages/pandas_vet/version.py __version__ = "0.2.2" ``` This is running on a docker container based on alpine:3.14.1. Same results obtained on a mac. Things work if we do not provide a variable: ```python def some_function(dataFrame, in_place=False): return dataFrame.drop([], inplace=False) ```
0.0
b45e2283b2d880f88401992424c59682d0e4c380
[ "tests/test_PD002.py::test_PD002_with_variable_does_not_crash" ]
[ "tests/test_PD002.py::test_PD002_pass", "tests/test_PD002.py::test_PD002_fail" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_media" ], "has_test_patch": true, "is_lite": false }
2023-08-09 03:15:39+00:00
mit
1,878
deppen8__pandas-vet-39
diff --git a/pandas_vet/__init__.py b/pandas_vet/__init__.py index b675fd8..3e5e351 100644 --- a/pandas_vet/__init__.py +++ b/pandas_vet/__init__.py @@ -33,6 +33,7 @@ class Visitor(ast.NodeVisitor): self.errors.extend(check_for_unstack(node)) self.errors.extend(check_for_arithmetic_methods(node)) self.errors.extend(check_for_comparison_methods(node)) + self.errors.extend(check_for_read_table(node)) def visit_Subscript(self, node): self.generic_visit(node) # continue checking children @@ -136,19 +137,19 @@ def check_for_comparison_methods(node: ast.Call) -> List: def check_for_ix(node: ast.Subscript) -> List: - if node.value.attr == "ix": + if isinstance(node.value, ast.Attribute) and node.value.attr == "ix": return [PD007(node.lineno, node.col_offset)] return [] -def check_for_at(node: ast.Call) -> List: - if node.value.attr == "at": +def check_for_at(node: ast.Subscript) -> List: + if isinstance(node.value, ast.Attribute) and node.value.attr == "at": return [PD008(node.lineno, node.col_offset)] return [] -def check_for_iat(node: ast.Call) -> List: - if node.value.attr == "iat": +def check_for_iat(node: ast.Subscript) -> List: + if isinstance(node.value, ast.Attribute) and node.value.attr == "iat": return [PD009(node.lineno, node.col_offset)] return [] @@ -177,6 +178,17 @@ def check_for_unstack(node: ast.Call) -> List: return [] +def check_for_read_table(node: ast.Call) -> List: + """ + Check AST for occurence of the `.read_table()` method on the pandas object. + + Error/warning message to recommend use of `.read_csv()` method instead. + """ + if isinstance(node.func, ast.Attribute) and node.func.attr == "read_table": + return [PD012(node.lineno, node.col_offset)] + return [] + + error = namedtuple("Error", ["lineno", "col", "message", "type"]) VetError = partial(partial, error, type=VetPlugin) @@ -210,3 +222,6 @@ PD009 = VetError( PD010 = VetError( message="PD010 '.pivot_table' is preferred to '.pivot' or '.unstack'; provides same functionality" ) +PD012 = VetError( + message="PDO12 '.read_csv' is preferred to '.read_table'; provides same functionality" +)
deppen8/pandas-vet
f0865882b8f857ae38fc1c0e42e671418d8bb3ee
diff --git a/tests/test_PD012.py b/tests/test_PD012.py new file mode 100644 index 0000000..ee45e2e --- /dev/null +++ b/tests/test_PD012.py @@ -0,0 +1,41 @@ +""" +Test to check for use of the pandas soon-to-be-deprecated `.read_table()` +method. +""" +import ast + +from pandas_vet import VetPlugin +from pandas_vet import PD012 + + +def test_PD012_pass_read_csv(): + """ + Test that using .read_csv() explicitly does not result in an error. + """ + statement = "df = pd.read_csv(input_file)" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected + + +def test_PD012_fail_read_table(): + """ + Test that using .read_table() method results in an error. + """ + statement = "df = pd.read_table(input_file)" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [PD012(1, 5)] + assert actual == expected + + +def test_PD012_node_Name_pass(): + """ + Test that where 'read_table' is a Name does NOT raise an error + """ + statement = "df = read_table" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected
Check for pd.read_table Check for `pd.read_table` function call. [See flashcard here](https://deppen8.github.io/pandas-bw/reading-data/). Give error message: > 'pd.read_table' is deprecated. Use 'pd.read_csv' for all delimited files.
0.0
f0865882b8f857ae38fc1c0e42e671418d8bb3ee
[ "tests/test_PD012.py::test_PD012_pass_read_csv", "tests/test_PD012.py::test_PD012_fail_read_table", "tests/test_PD012.py::test_PD012_node_Name_pass" ]
[]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_hyperlinks", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2019-02-28 21:33:20+00:00
mit
1,879
deppen8__pandas-vet-42
diff --git a/pandas_vet/__init__.py b/pandas_vet/__init__.py index 8c286e0..b675fd8 100644 --- a/pandas_vet/__init__.py +++ b/pandas_vet/__init__.py @@ -14,6 +14,9 @@ class Visitor(ast.NodeVisitor): ast.NodeVisitor will automatically call the appropriate method for a given node type i.e. calling self.visit on an Import node calls visit_import + + The `check` functions should be called from the `visit_` method that + would produce a 'fail' condition. """ errors = attr.ib(default=attr.Factory(list)) @@ -28,6 +31,8 @@ class Visitor(ast.NodeVisitor): self.errors.extend(check_for_notnull(node)) self.errors.extend(check_for_pivot(node)) self.errors.extend(check_for_unstack(node)) + self.errors.extend(check_for_arithmetic_methods(node)) + self.errors.extend(check_for_comparison_methods(node)) def visit_Subscript(self, node): self.generic_visit(node) # continue checking children @@ -86,6 +91,50 @@ def check_for_notnull(node: ast.Call) -> List: return [PD004(node.lineno, node.col_offset)] return [] +def check_for_arithmetic_methods(node: ast.Call) -> List: + """ + Check AST for occurence of explicit arithmetic methods. + + Error/warning message to recommend use of binary arithmetic operators instead. + """ + arithmetic_methods = [ + 'add', + 'sub', 'subtract', + 'mul', 'multiply', + 'div', 'divide', 'truediv', + 'pow', + 'floordiv', + 'mod', + ] + arithmetic_operators = [ + '+', + '-', + '*', + '/', + '**', + '//', + '%', + ] + + if isinstance(node.func, ast.Attribute) and node.func.attr in arithmetic_methods: + return [PD005(node.lineno, node.col_offset)] + return [] + + +def check_for_comparison_methods(node: ast.Call) -> List: + """ + Check AST for occurence of explicit comparison methods. + + Error/warning message to recommend use of binary comparison operators instead. + """ + comparison_methods = ['gt', 'lt', 'ge', 'le', 'eq', 'ne'] + comparison_operators = ['>', '<', '>=', '<=', '==', '!='] + + if isinstance(node.func, ast.Attribute) and node.func.attr in comparison_methods: + return [PD006(node.lineno, node.col_offset)] + return [] + + def check_for_ix(node: ast.Subscript) -> List: if node.value.attr == "ix": return [PD007(node.lineno, node.col_offset)]
deppen8/pandas-vet
128232a43e8dd2819e77da5a03f494691e494da1
diff --git a/tests/test_PD005.py b/tests/test_PD005.py new file mode 100644 index 0000000..9c68e0e --- /dev/null +++ b/tests/test_PD005.py @@ -0,0 +1,51 @@ +""" +Test to check for use of explicit arithmetic methods. + +Recommend use of binary arithmetic operators instead. +""" +import ast + +from pandas_vet import VetPlugin +from pandas_vet import PD005 + + +def test_PD005_pass_arithmetic_operator(): + """ + Test that using binary arithmetic operator explicitly does not result in an error. + """ + arithmetic_operators = [ + '+', + '-', + '*', + '/', + '**', + '//', + '%', + ] + for op in arithmetic_operators: + statement = 'C = A {0} B'.format(op) + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected + + +def test_PD005_fail_arithmetic_method(): + """ + Test that using arithmetic method results in an error. + """ + arithmetic_methods = [ + 'add', + 'sub', 'subtract', + 'mul', 'multiply', + 'div', 'divide', 'truediv', + 'pow', + 'floordiv', + 'mod', + ] + for op in arithmetic_methods: + statement = 'C = A.{0}(B)'.format(op) + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [PD005(1, 4)] + assert actual == expected diff --git a/tests/test_PD006.py b/tests/test_PD006.py new file mode 100644 index 0000000..cb30365 --- /dev/null +++ b/tests/test_PD006.py @@ -0,0 +1,35 @@ +""" +Test to check for use of explicit comparison methods. + +Recommend use of binary comparison operators instead. +""" +import ast + +from pandas_vet import VetPlugin +from pandas_vet import PD006 + + +def test_PD006_pass_comparison_operator(): + """ + Test that using binary comparison operator explicitly does not result in an error. + """ + comparison_operators = ['>', '<', '>=', '<=', '==', '!='] + for op in comparison_operators: + statement = 'C = A {0} B'.format(op) + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected + + +def test_PD006_fail_comparison_method(): + """ + Test that using comparison method results in an error. + """ + comparison_methods = ['gt', 'lt', 'ge', 'le', 'eq', 'ne'] + for op in comparison_methods: + statement = 'C = A.{0}(B)'.format(op) + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [PD006(1, 4)] + assert actual == expected
Arithmetic and comparison operators We should implement checks for all of the text-based arithmetic and comparison operators. If found, recommend using the operator itself. Something like: > Use <operator> instead of <text method> | use | check for | | --- | ---------- | | `+` | `.add` | | `-` | `.sub` and `.subtract` | | `*` | `.mul` and `.multiply` | | `/` | `.div`, `.divide` and `.truediv` | | `**` | `.pow` | | `//` | `.floordiv` | | `%` | `.mod` | | `>` | `.gt` | | `<` | `.lt` | | `>=` | `.ge` | | `<=` | `.le` | | `==` | `.eq` | | `!=` | `.ne` |
0.0
128232a43e8dd2819e77da5a03f494691e494da1
[ "tests/test_PD005.py::test_PD005_fail_arithmetic_method", "tests/test_PD006.py::test_PD006_fail_comparison_method" ]
[ "tests/test_PD005.py::test_PD005_pass_arithmetic_operator", "tests/test_PD006.py::test_PD006_pass_comparison_operator" ]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2019-03-03 00:22:37+00:00
mit
1,880
deppen8__pandas-vet-52
diff --git a/pandas_vet/__init__.py b/pandas_vet/__init__.py index 1b54d23..6237dd5 100644 --- a/pandas_vet/__init__.py +++ b/pandas_vet/__init__.py @@ -37,6 +37,7 @@ class Visitor(ast.NodeVisitor): self.errors.extend(check_for_notnull(node)) self.errors.extend(check_for_pivot(node)) self.errors.extend(check_for_unstack(node)) + self.errors.extend(check_for_stack(node)) self.errors.extend(check_for_arithmetic_methods(node)) self.errors.extend(check_for_comparison_methods(node)) self.errors.extend(check_for_read_table(node)) @@ -193,6 +194,17 @@ def check_for_unstack(node: ast.Call) -> List: return [] +def check_for_stack(node: ast.Call) -> List: + """ + Check AST for occurence of the `.stack()` method on the pandas data frame. + + Error/warning message to recommend use of `.melt()` method instead. + """ + if isinstance(node.func, ast.Attribute) and node.func.attr == "stack": + return [PD013(node.lineno, node.col_offset)] + return [] + + def check_for_values(node: ast.Attribute) -> List: """ Check AST for occurence of the `.values` attribute on the pandas data frame. @@ -255,3 +267,6 @@ PD011 = VetError( PD012 = VetError( message="PDO12 '.read_csv' is preferred to '.read_table'; provides same functionality" ) +PD013 = VetError( + message="PD013 '.melt' is preferred to '.stack'; provides same functionality" +)
deppen8/pandas-vet
8605bebf1cb5b59b9fa0c541ed5c026a9d3acbed
diff --git a/tests/test_PD005.py b/tests/test_PD005.py index 9c68e0e..1fcc596 100644 --- a/tests/test_PD005.py +++ b/tests/test_PD005.py @@ -11,7 +11,8 @@ from pandas_vet import PD005 def test_PD005_pass_arithmetic_operator(): """ - Test that using binary arithmetic operator explicitly does not result in an error. + Test that explicit use of binary arithmetic operator does not + result in an error. """ arithmetic_operators = [ '+', diff --git a/tests/test_PD006.py b/tests/test_PD006.py index cb30365..7dae856 100644 --- a/tests/test_PD006.py +++ b/tests/test_PD006.py @@ -11,7 +11,8 @@ from pandas_vet import PD006 def test_PD006_pass_comparison_operator(): """ - Test that using binary comparison operator explicitly does not result in an error. + Test that explicit use of binary comparison operator does not + result in an error. """ comparison_operators = ['>', '<', '>=', '<=', '==', '!='] for op in comparison_operators: diff --git a/tests/test_PD010.py b/tests/test_PD010.py index d3ec020..1e897bd 100644 --- a/tests/test_PD010.py +++ b/tests/test_PD010.py @@ -12,7 +12,15 @@ def test_PD010_pass(): """ Test that using .pivot_table() explicitly does not result in an error. """ - statement = "table = df.pivot_table(df, values='D', index=['A', 'B'], columns=['C'], aggfunc=np.sum, fill_value=0)" + statement = """table = df.pivot_table( + df, + values='D', + index=['A', 'B'], + columns=['C'], + aggfunc=np.sum, + fill_value=0 + ) + """ tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) expected = [] @@ -21,9 +29,16 @@ def test_PD010_pass(): def test_PD010_fail_pivot(): """ - Test that using either pd.pivot(df) or df.pivot() methods results in an error. + Test that using either pd.pivot(df) or df.pivot() methods + results in an error. + """ + statement = """table = pd.pivot( + df, + index='foo', + columns='bar', + values='baz' + ) """ - statement = "table = pd.pivot(df, index='foo', columns='bar', values='baz')" tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) expected = [PD010(1, 8)] diff --git a/tests/test_PD011.py b/tests/test_PD011.py index b8f9cf1..6a671e2 100644 --- a/tests/test_PD011.py +++ b/tests/test_PD011.py @@ -1,6 +1,6 @@ """ -Test to check for use of the pandas dataframe `.array` attribute -or `.to_array()` method in preference to `.values` attribute. +Test to check for use of the pandas dataframe `.array` attribute +or `.to_array()` method in preference to `.values` attribute. """ import ast @@ -40,6 +40,7 @@ def test_PD011_fail_values(): expected = [PD011(1, 9)] assert actual == expected + def test_PD011_pass_node_Name(): """ Test that where 'values' is a Name does NOT raise an error diff --git a/tests/test_PD012.py b/tests/test_PD012.py index ee45e2e..176b2d4 100644 --- a/tests/test_PD012.py +++ b/tests/test_PD012.py @@ -1,6 +1,6 @@ """ Test to check for use of the pandas soon-to-be-deprecated `.read_table()` -method. +method. """ import ast diff --git a/tests/test_PD013.py b/tests/test_PD013.py new file mode 100644 index 0000000..dededc0 --- /dev/null +++ b/tests/test_PD013.py @@ -0,0 +1,35 @@ +""" +Test to check functionality for use of the `.melt()` data frame +method in preference to `.stack()` method. +""" +import ast + +from pandas_vet import VetPlugin +from pandas_vet import PD013 + + +def test_PD013_pass(): + """ + Test that using .melt() explicitly does not result in an error. + """ + statement = """table = df.melt( + id_vars='airline', + value_vars=['ATL', 'DEN', 'DFW'], + value_name='airline delay' + ) + """ + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected + + +def test_PD013_fail_stack(): + """ + Test that using .stack() results in an error. + """ + statement = "table = df.stack(level=-1, dropna=True)" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [PD013(1, 8)] + assert actual == expected
Check for .stack Check for `.stack` method. [See flashcard](https://deppen8.github.io/pandas-bw/reshape-split-apply-combine/melt-vs-stack.png). Give error message: > Prefer '.melt' to '.stack'. '.melt' allows direct column renaming and avoids a MultiIndex
0.0
8605bebf1cb5b59b9fa0c541ed5c026a9d3acbed
[ "tests/test_PD005.py::test_PD005_pass_arithmetic_operator", "tests/test_PD005.py::test_PD005_fail_arithmetic_method", "tests/test_PD006.py::test_PD006_pass_comparison_operator", "tests/test_PD006.py::test_PD006_fail_comparison_method", "tests/test_PD010.py::test_PD010_pass", "tests/test_PD010.py::test_PD010_fail_pivot", "tests/test_PD010.py::test_PD010_fail_unstack", "tests/test_PD011.py::test_PD011_pass_to_array", "tests/test_PD011.py::test_PD011_pass_array", "tests/test_PD011.py::test_PD011_fail_values", "tests/test_PD011.py::test_PD011_pass_node_Name", "tests/test_PD012.py::test_PD012_pass_read_csv", "tests/test_PD012.py::test_PD012_fail_read_table", "tests/test_PD012.py::test_PD012_node_Name_pass", "tests/test_PD013.py::test_PD013_pass", "tests/test_PD013.py::test_PD013_fail_stack" ]
[]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_hyperlinks", "has_media" ], "has_test_patch": true, "is_lite": false }
2019-03-07 18:36:43+00:00
mit
1,881
deppen8__pandas-vet-69
diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b26e92..fb5f7e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,42 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) (to the best of our ability). +## Unreleased + +### Added + +- New check `PD901 'df' is a bad variable name. Be kinder to your future self.` ([#69](https://github.com/deppen8/pandas-vet/pull/69)) +- An `--annoy` flag that can be used to activate checks that set to "off" by default. The off-by-default checks should use the convention `PD9xx` ([#69](https://github.com/deppen8/pandas-vet/pull/69)) +- Added `PD901` to README along with an example use of the `--annoy` flag ([#69](https://github.com/deppen8/pandas-vet/pull/69)) + +### Changed + +- `test_PD012.py` had test cases that used `df = <something>`, which conflicted with the new `PD901` check. These were changed to `employees = <something>` ([#69](https://github.com/deppen8/pandas-vet/pull/69)) +- Applied the `black` formatter to the entire pandas-vet package. + +### Deprecated + +- None + +### Removed + +- A few extraneous variables ([455d1f0](https://github.com/deppen8/pandas-vet/pull/69/commits/455d1f0525dd4e9590cd10efdcd39c9d9a7923a2)) + +### Fixed + +- None + +### Security + +- None + + ## [0.2.1] - 2019-07-27 ### Added -- Leandro Leites added as contributor (#66) -- This CHANGELOG.md added +- Leandro Leites added as contributor ([#66](https://github.com/deppen8/pandas-vet/pull/66)) +- This CHANGELOG.md added ([#68](https://github.com/deppen8/pandas-vet/pull/68)) ### Changed @@ -22,12 +52,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed -- Unnecessary commented line from `setup.py` (#67) +- Unnecessary commented line from `setup.py` ([#67](https://github.com/deppen8/pandas-vet/pull/67)) ### Fixed -- PD015 would fail if `node.func.value` did not have an `id`. Fixed with #65 -- `version.py` now correctly uses v0.2.x. This version file was not bumped with the last release. (#67) +- PD015 would fail if `node.func.value` did not have an `id`. Fixed with [#65](https://github.com/deppen8/pandas-vet/pull/65) +- `version.py` now correctly uses v0.2.x. This version file was not bumped with the last release. ([#67](https://github.com/deppen8/pandas-vet/pull/67)) ### Security diff --git a/README.md b/README.md index bf5cb1c..f875ae7 100644 --- a/README.md +++ b/README.md @@ -138,3 +138,13 @@ flake8 pandas_vet setup.py tests --exclude tests/data **PD013** '.melt' is preferred to '.stack'; provides same functionality **PD015** Use '.merge' method instead of 'pd.merge' function. They have equivalent functionality. + +### *Very* Opinionated Warnings + +These warnings are turned off by default. To enable them, add the `-annoy` flag to your command, e.g., + +```bash +$ flake8 --annoy my_file.py +``` + +**PD901** 'df' is a bad variable name. Be kinder to your future self. diff --git a/pandas_vet/__init__.py b/pandas_vet/__init__.py index af81139..fd7bee9 100644 --- a/pandas_vet/__init__.py +++ b/pandas_vet/__init__.py @@ -18,6 +18,7 @@ class Visitor(ast.NodeVisitor): The `check` functions should be called from the `visit_` method that would produce a 'fail' condition. """ + errors = attr.ib(default=attr.Factory(list)) def visit_Import(self, node): @@ -56,8 +57,16 @@ class Visitor(ast.NodeVisitor): """ Called for `.attribute` nodes. """ + self.generic_visit(node) # continue checking children self.errors.extend(check_for_values(node)) + def visit_Name(self, node): + """ + Called for `Assignment` nodes. + """ + self.generic_visit(node) # continue checking children + self.errors.extend(check_for_df(node)) + def check(self, node): self.errors = [] self.visit(node) @@ -81,6 +90,22 @@ class VetPlugin: except Exception as e: raise PandasVetException(e) + @staticmethod + def add_options(optmanager): + """Informs flake8 to ignore PD9xx by default.""" + optmanager.extend_default_ignore(disabled_by_default) + + optmanager.add_option( + long_option_name="--annoy", + action="store_true", + dest="annoy", + default=False, + ) + + options, xargs = optmanager.parse_args() + if options.annoy: + optmanager.remove_from_default_ignore(disabled_by_default) + def check_import_name(node: ast.Import) -> List: """Check AST for imports of pandas not using the preferred alias 'pd'. @@ -163,26 +188,23 @@ def check_for_arithmetic_methods(node: ast.Call) -> List: Error/warning message to recommend use of binary arithmetic operators. """ arithmetic_methods = [ - 'add', - 'sub', 'subtract', - 'mul', 'multiply', - 'div', 'divide', 'truediv', - 'pow', - 'floordiv', - 'mod', - ] - arithmetic_operators = [ - '+', - '-', - '*', - '/', - '**', - '//', - '%', - ] - - if isinstance(node.func, ast.Attribute) and \ - node.func.attr in arithmetic_methods: + "add", + "sub", + "subtract", + "mul", + "multiply", + "div", + "divide", + "truediv", + "pow", + "floordiv", + "mod", + ] + + if ( + isinstance(node.func, ast.Attribute) + and node.func.attr in arithmetic_methods + ): return [PD005(node.lineno, node.col_offset)] return [] @@ -193,11 +215,12 @@ def check_for_comparison_methods(node: ast.Call) -> List: Error/warning message to recommend use of binary comparison operators. """ - comparison_methods = ['gt', 'lt', 'ge', 'le', 'eq', 'ne'] - comparison_operators = ['>', '<', '>=', '<=', '==', '!='] + comparison_methods = ["gt", "lt", "ge", "le", "eq", "ne"] - if isinstance(node.func, ast.Attribute) and \ - node.func.attr in comparison_methods: + if ( + isinstance(node.func, ast.Attribute) + and node.func.attr in comparison_methods + ): return [PD006(node.lineno, node.col_offset)] return [] @@ -304,42 +327,55 @@ def check_for_merge(node: ast.Call) -> List: # object. If the object name is `pd`, and if the `.merge()` method has at # least two arguments (left, right, ... ) we will assume that it matches # the pattern that we are trying to check, `pd.merge(left, right)` - if not hasattr(node.func, 'value'): - return [] # ignore functions - elif not hasattr(node.func.value, 'id'): - return [] # it could be the case that id is not present + if not hasattr(node.func, "value"): + return [] # ignore functions + elif not hasattr(node.func.value, "id"): + return [] # it could be the case that id is not present - if node.func.value.id != 'pd': return[] # assume object name is `pd` + if node.func.value.id != "pd": + return [] # assume object name is `pd` - if not len(node.args) >= 2: return [] # at least two arguments + if not len(node.args) >= 2: + return [] # at least two arguments - if isinstance(node.func, ast.Attribute) and \ - node.func.attr == "merge": + if isinstance(node.func, ast.Attribute) and node.func.attr == "merge": return [PD015(node.lineno, node.col_offset)] return [] +def check_for_df(node: ast.Name) -> List: + """ + Check for variables named `df` + """ + if node.id == "df" and isinstance(node.ctx, ast.Store): + return [PD901(node.lineno, node.col_offset)] + return [] + + error = namedtuple("Error", ["lineno", "col", "message", "type"]) VetError = partial(partial, error, type=VetPlugin) +disabled_by_default = ["PD9"] + PD001 = VetError( message="PD001 pandas should always be imported as 'import pandas as pd'" ) + PD002 = VetError( message="PD002 'inplace = True' should be avoided; it has inconsistent behavior" ) + PD003 = VetError( message="PD003 '.isna' is preferred to '.isnull'; functionality is equivalent" ) + PD004 = VetError( message="PD004 '.notna' is preferred to '.notnull'; functionality is equivalent" ) -PD005 = VetError( - message="PD005 Use arithmetic operator instead of method" -) -PD006 = VetError( - message="PD006 Use comparison operator instead of method" -) +PD005 = VetError(message="PD005 Use arithmetic operator instead of method") + +PD006 = VetError(message="PD006 Use comparison operator instead of method") + PD007 = VetError( message="PD007 '.ix' is deprecated; use more explicit '.loc' or '.iloc'" ) @@ -364,3 +400,7 @@ PD013 = VetError( PD015 = VetError( message="PD015 Use '.merge' method instead of 'pd.merge' function. They have equivalent functionality." ) + +PD901 = VetError( + message="PD901 'df' is a bad variable name. Be kinder to your future self." +) diff --git a/setup.py b/setup.py index 96c1e4c..10e1b69 100644 --- a/setup.py +++ b/setup.py @@ -1,15 +1,10 @@ import setuptools -requires = [ - "flake8 > 3.0.0", - "attrs", -] +requires = ["flake8 > 3.0.0", "attrs"] -tests_requires = [ - "pytest > 4.0.0" -] +tests_requires = ["pytest > 4.0.0"] -flake8_entry_point = 'flake8.extension' +flake8_entry_point = "flake8.extension" with open("README.md", "rt") as f: long_description = f.read() @@ -26,16 +21,10 @@ setuptools.setup( author="Jacob Deppen", author_email="[email protected]", url="https://github.com/deppen8/pandas-vet", - packages=[ - "pandas_vet", - ], + packages=["pandas_vet"], install_requires=requires, tests_require=tests_requires, - entry_points={ - flake8_entry_point: [ - 'PD = pandas_vet:VetPlugin', - ], - }, + entry_points={flake8_entry_point: ["PD = pandas_vet:VetPlugin"]}, classifiers=[ "Development Status :: 4 - Beta", "Environment :: Console",
deppen8/pandas-vet
4d0611ec5fb91fa9fc8c00a3bcc94e3d8beb94f7
diff --git a/tests/test_PD005.py b/tests/test_PD005.py index 1fcc596..78b3eca 100644 --- a/tests/test_PD005.py +++ b/tests/test_PD005.py @@ -14,17 +14,9 @@ def test_PD005_pass_arithmetic_operator(): Test that explicit use of binary arithmetic operator does not result in an error. """ - arithmetic_operators = [ - '+', - '-', - '*', - '/', - '**', - '//', - '%', - ] + arithmetic_operators = ["+", "-", "*", "/", "**", "//", "%"] for op in arithmetic_operators: - statement = 'C = A {0} B'.format(op) + statement = "C = A {0} B".format(op) tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) expected = [] @@ -36,16 +28,20 @@ def test_PD005_fail_arithmetic_method(): Test that using arithmetic method results in an error. """ arithmetic_methods = [ - 'add', - 'sub', 'subtract', - 'mul', 'multiply', - 'div', 'divide', 'truediv', - 'pow', - 'floordiv', - 'mod', - ] + "add", + "sub", + "subtract", + "mul", + "multiply", + "div", + "divide", + "truediv", + "pow", + "floordiv", + "mod", + ] for op in arithmetic_methods: - statement = 'C = A.{0}(B)'.format(op) + statement = "C = A.{0}(B)".format(op) tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) expected = [PD005(1, 4)] diff --git a/tests/test_PD006.py b/tests/test_PD006.py index 7dae856..b1e1b62 100644 --- a/tests/test_PD006.py +++ b/tests/test_PD006.py @@ -14,9 +14,9 @@ def test_PD006_pass_comparison_operator(): Test that explicit use of binary comparison operator does not result in an error. """ - comparison_operators = ['>', '<', '>=', '<=', '==', '!='] + comparison_operators = [">", "<", ">=", "<=", "==", "!="] for op in comparison_operators: - statement = 'C = A {0} B'.format(op) + statement = "C = A {0} B".format(op) tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) expected = [] @@ -27,9 +27,9 @@ def test_PD006_fail_comparison_method(): """ Test that using comparison method results in an error. """ - comparison_methods = ['gt', 'lt', 'ge', 'le', 'eq', 'ne'] + comparison_methods = ["gt", "lt", "ge", "le", "eq", "ne"] for op in comparison_methods: - statement = 'C = A.{0}(B)'.format(op) + statement = "C = A.{0}(B)".format(op) tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) expected = [PD006(1, 4)] diff --git a/tests/test_PD012.py b/tests/test_PD012.py index 176b2d4..d669b42 100644 --- a/tests/test_PD012.py +++ b/tests/test_PD012.py @@ -12,7 +12,7 @@ def test_PD012_pass_read_csv(): """ Test that using .read_csv() explicitly does not result in an error. """ - statement = "df = pd.read_csv(input_file)" + statement = "employees = pd.read_csv(input_file)" tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) expected = [] @@ -23,10 +23,10 @@ def test_PD012_fail_read_table(): """ Test that using .read_table() method results in an error. """ - statement = "df = pd.read_table(input_file)" + statement = "employees = pd.read_table(input_file)" tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) - expected = [PD012(1, 5)] + expected = [PD012(1, 12)] assert actual == expected @@ -34,7 +34,7 @@ def test_PD012_node_Name_pass(): """ Test that where 'read_table' is a Name does NOT raise an error """ - statement = "df = read_table" + statement = "employees = read_table" tree = ast.parse(statement) actual = list(VetPlugin(tree).run()) expected = [] diff --git a/tests/test_PD901.py b/tests/test_PD901.py new file mode 100644 index 0000000..f4093f1 --- /dev/null +++ b/tests/test_PD901.py @@ -0,0 +1,36 @@ +import ast + +from pandas_vet import VetPlugin +from pandas_vet import PD901 + + +def test_PD901_pass_non_df(): + statement = "employees = pd.DataFrame(employee_dict)" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected + + +def test_PD901_pass_part_df(): + statement = "employees_df = pd.DataFrame(employee_dict)" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected + + +def test_PD901_pass_df_param(): + statement = "my_function(df=data)" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [] + assert actual == expected + + +def test_PD901_fail_df_var(): + statement = "df = pd.DataFrame()" + tree = ast.parse(statement) + actual = list(VetPlugin(tree).run()) + expected = [PD901(1, 0)] + assert actual == expected
Method for off-by-default linter checks As discussed in #64, it would be good to have some checks that can be implemented but are "off" by default. These would be the most opinionated checks that would be a bit too strict to be activated out-of-the-box.
0.0
4d0611ec5fb91fa9fc8c00a3bcc94e3d8beb94f7
[ "tests/test_PD005.py::test_PD005_pass_arithmetic_operator", "tests/test_PD005.py::test_PD005_fail_arithmetic_method", "tests/test_PD006.py::test_PD006_pass_comparison_operator", "tests/test_PD006.py::test_PD006_fail_comparison_method", "tests/test_PD012.py::test_PD012_pass_read_csv", "tests/test_PD012.py::test_PD012_fail_read_table", "tests/test_PD012.py::test_PD012_node_Name_pass", "tests/test_PD901.py::test_PD901_pass_non_df", "tests/test_PD901.py::test_PD901_pass_part_df", "tests/test_PD901.py::test_PD901_pass_df_param", "tests/test_PD901.py::test_PD901_fail_df_var" ]
[]
{ "failed_lite_validators": [ "has_issue_reference", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2019-08-03 21:46:13+00:00
mit
1,882
deshima-dev__decode-132
diff --git a/decode/__init__.py b/decode/__init__.py index 4ea797c..1646883 100644 --- a/decode/__init__.py +++ b/decode/__init__.py @@ -8,6 +8,7 @@ __all__ = [ "plot", "qlook", "select", + "utils", ] __version__ = "2.7.2" @@ -22,3 +23,4 @@ from . import make from . import plot from . import qlook from . import select +from . import utils diff --git a/decode/qlook.py b/decode/qlook.py index 7e5305a..388160b 100644 --- a/decode/qlook.py +++ b/decode/qlook.py @@ -1,4 +1,4 @@ -__all__ = ["raster", "skydip", "zscan"] +__all__ = ["pswsc", "raster", "skydip", "zscan"] # standard library @@ -11,7 +11,7 @@ import numpy as np import xarray as xr import matplotlib.pyplot as plt from fire import Fire -from . import assign, convert, load, make, plot, select +from . import assign, convert, load, make, plot, select, utils # constants @@ -22,6 +22,98 @@ BAD_MKID_IDS = ( 283, 296, 297, 299, 301, 313, ) # fmt: on +DFOF_TO_TSKY = -(300 - 77) / 3e-5 +TSKY_TO_DFOF = -3e-5 / (300 - 77) + + +def pswsc( + dems: Path, + /, + *, + include_mkid_ids: Optional[Sequence[int]] = None, + exclude_mkid_ids: Optional[Sequence[int]] = BAD_MKID_IDS, + data_type: Literal["df/f", "brightness"] = "brightness", + frequency_units: str = "GHz", + outdir: Path = Path(), + format: str = "png", +) -> None: + """Quick-look at a PSW observation with sky chopper. + + Args: + dems: Input DEMS file (netCDF or Zarr). + include_mkid_ids: MKID IDs to be included in analysis. + Defaults to all MKID IDs. + exclude_mkid_ids: MKID IDs to be excluded in analysis. + Defaults to bad MKID IDs found on 2023-11-07. + data_type: Data type of the input DEMS file. + frequency_units: Units of the frequency axis. + outdir: Output directory for the analysis result. + format: Output data format of the analysis result. + + """ + dems = Path(dems) + out = Path(outdir) / dems.with_suffix(f".pswsc.{format}").name + + # load DEMS + da = load.dems(dems, chunks=None) + da = assign.scan(da) + da = convert.frame(da, "relative") + da = convert.coord_units(da, "frequency", frequency_units) + da = convert.coord_units(da, "d2_mkid_frequency", frequency_units) + + if data_type == "df/f": + da = cast(xr.DataArray, np.abs(da)) + da.attrs.update(long_name="|df/f|", units="dimensionless") + + # select DEMS + da = select.by(da, "d2_mkid_type", include="filter") + da = select.by( + da, + "d2_mkid_id", + include=include_mkid_ids, + exclude=exclude_mkid_ids, + ) + da = select.by(da, "state", include=["ON", "OFF"]) + da_sub = da.groupby("scan").map(subtract_per_scan) + + # export output + spec = da_sub.mean("scan") + mad = utils.mad(spec) + + if format == "csv": + spec.to_dataset(name=data_type).to_pandas().to_csv(out) + elif format == "nc": + spec.to_netcdf(out) + elif format.startswith("zarr"): + spec.to_zarr(out) + else: + fig, axes = plt.subplots(1, 2, figsize=(12, 4)) + + ax = axes[0] + plot.data(da.scan, ax=ax) + ax.set_title(Path(dems).name) + ax.grid(True) + + ax = axes[1] + plot.data(spec, x="frequency", s=5, hue=None, ax=ax) + ax.set_ylim(-mad, spec.max() + mad) + ax.set_title(Path(dems).name) + ax.grid(True) + + if data_type == "df/f": + ax = ax.secondary_yaxis( + "right", + functions=( + lambda x: -DFOF_TO_TSKY * x, + lambda x: -TSKY_TO_DFOF * x, + ), + ) + ax.set_ylabel("Approx. brightness [K]") + + fig.tight_layout() + fig.savefig(out) + + print(str(out)) def raster( @@ -341,11 +433,30 @@ def mean_in_time(dems: xr.DataArray) -> xr.DataArray: return xr.zeros_like(middle) + dems.mean("time") +def subtract_per_scan(dems: xr.DataArray) -> xr.DataArray: + """Apply source-sky subtraction to a single-scan DEMS.""" + if len(states := np.unique(dems.state)) != 1: + raise ValueError("State must be unique.") + + if (state := states[0]) == "ON": + src = select.by(dems, "beam", include="B") + sky = select.by(dems, "beam", include="A") + return src.mean("time") - sky.mean("time").data + + if state == "OFF": + src = select.by(dems, "beam", include="A") + sky = select.by(dems, "beam", include="B") + return src.mean("time") - sky.mean("time").data + + raise ValueError("State must be either ON or OFF.") + + def main() -> None: """Entry point of the decode-qlook command.""" with xr.set_options(keep_attrs=True): Fire( { + "pswsc": pswsc, "raster": raster, "skydip": skydip, "zscan": zscan, diff --git a/decode/utils.py b/decode/utils.py new file mode 100644 index 0000000..53e4f74 --- /dev/null +++ b/decode/utils.py @@ -0,0 +1,40 @@ +__all__ = ["mad"] + + +# dependencies +from typing import Any, Optional, cast +import numpy as np +import xarray as xr +from xarray.core.types import Dims + + +def mad( + da: xr.DataArray, + dim: Dims = None, + skipna: Optional[bool] = None, + keep_attrs: Optional[bool] = None, + **kwargs: Any, +) -> xr.DataArray: + """Calculate median absolute deviation (MAD) of a DataArray. + + Args: + da: Input DataArray. + dim: Name of dimension(s) along which MAD is calculated. + skipna: Same-name option to be passed to ``DataArray.median``. + keep_attrs: Same-name option to be passed to ``DataArray.median``. + kwargs: Same-name option(s) to be passed to ``DataArray.median``. + + Returns: + MAD of the input DataArray. + + """ + + def median(da: xr.DataArray) -> xr.DataArray: + return da.median( + dim=dim, + skipna=skipna, + keep_attrs=keep_attrs, + **kwargs, + ) + + return median(cast(xr.DataArray, np.abs(da - median(da))))
deshima-dev/decode
15c93d59f42a9b3ad367d687de2ea24190213511
diff --git a/tests/test_utils.py b/tests/test_utils.py new file mode 100644 index 0000000..177a62c --- /dev/null +++ b/tests/test_utils.py @@ -0,0 +1,10 @@ +# dependencies +import numpy as np +import xarray as xr +from decode import utils +from dems.d2 import MS + + +def test_mad() -> None: + dems = MS.new(np.arange(25).reshape(5, 5)) + assert (utils.mad(dems, "time") == 5.0).all()
Add qlook command for PSW + Sky chopper (pswsc)
0.0
15c93d59f42a9b3ad367d687de2ea24190213511
[ "tests/test_utils.py::test_mad" ]
[]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-11-12 18:56:23+00:00
mit
1,883
desihub__desitransfer-10
diff --git a/bin/desi_transfer_status_restore b/bin/desi_transfer_status_restore new file mode 100755 index 0000000..4766fc8 --- /dev/null +++ b/bin/desi_transfer_status_restore @@ -0,0 +1,71 @@ +#!/usr/bin/env python +""" +Quick and dirty script to restore raw data transfer status. + +1. Obtain rsync time from modification time of exposure directory. +2. Set checksum time to rsync time. +3. Ignore pipeline time (as of early 2020). +4. Obtain backup time from HPSS backup files. + +This script is deliberately kept separate from the package because it +uses hpsspy. +""" +from sys import exit +import json +import os +import hpsspy.os as hpos + + +def backup_times(path='desi/spectro/data'): + """Obtain backup times from HPSS files. + + Parameters + ---------- + path : :class:`str` + The HPSS path to the raw data backup files. + + Returns + ------- + :class:`dict` + A mapping of night to backup time. The backup time is in milliseconds + for compatibility with JavaScript. + """ + ls = hpos.listdir(path) + return dict([(os.path.splitext(f.name)[0].split('_')[-1], f.st_mtime*1000) + for f in ls if f.name.endswith('.tar')]) + + +def main(): + """Entry point for :command:`desi_transfer_status_restore`. + + Returns + ------- + :class:`int` + An integer suitable for passing to :func:`sys.exit`. + """ + bt = backup_times() + nights = os.listdir(os.environ['DESI_SPECTRO_DATA']) + status = list() + for night in nights: + if night != 'README.html': + exposures = os.listdir(os.path.join(os.environ['DESI_SPECTRO_DATA'], night)) + for exp in exposures: + rt = int(os.stat(os.path.join(os.environ['DESI_SPECTRO_DATA'], night, exp)).st_mtime * 1000) + status.append([int(night), int(exp), 'rsync', True, '', rt]) + status.append([int(night), int(exp), 'checksum', True, '', rt]) + try: + status.append([int(night), int(exp), 'backup', True, '', bt[night]]) + except KeyError: + pass + status = sorted(status, key=lambda x: x[0]*10000000 + x[1], reverse=True) + with open('desi_transfer_status_restore.json', 'w') as j: + json.dump(status, j, indent=None, separators=(',', ':')) + return 0 + + +if __name__ == '__main__': + try: + foo = os.environ['HPSS_DIR'] + except KeyError: + os.environ['HPSS_DIR'] = '/usr/common/mss' + exit(main()) diff --git a/doc/api.rst b/doc/api.rst index 418593d..9ee155f 100644 --- a/doc/api.rst +++ b/doc/api.rst @@ -5,6 +5,9 @@ desitransfer API .. automodule:: desitransfer :members: +.. automodule:: desitransfer.common + :members: + .. automodule:: desitransfer.daemon :members: diff --git a/doc/changes.rst b/doc/changes.rst index c55f0ac..44903e1 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -5,7 +5,10 @@ Change Log 0.3.4 (unreleased) ------------------ -* No changes yet. +* Guard against corrupted status JSON files; restore transfer status; + additional daily transfers (PR `#10`_). + +.. _`#10`: https://github.com/desihub/desitransfer/pull/10 0.3.3 (2019-12-18) ------------------ diff --git a/py/desitransfer/daily.py b/py/desitransfer/daily.py index 94b63d5..d27b1f7 100644 --- a/py/desitransfer/daily.py +++ b/py/desitransfer/daily.py @@ -98,6 +98,8 @@ def _config(): # os.path.join(engineering, 'fxc')), DailyDirectory('/data/focalplane/logs/calib_logs', os.path.join(engineering, 'focalplane', 'logs', 'calib_logs')), + DailyDirectory('/data/focalplane/logs/kpno', + os.path.join(engineering, 'focalplane', 'logs', 'kpno')), DailyDirectory('/data/focalplane/logs/xytest_data', os.path.join(engineering, 'focalplane', 'logs', 'xytest_data')), DailyDirectory('/data/fvc/data', diff --git a/py/desitransfer/status.py b/py/desitransfer/status.py index 21cb7a9..e92998f 100644 --- a/py/desitransfer/status.py +++ b/py/desitransfer/status.py @@ -14,10 +14,6 @@ import time from argparse import ArgumentParser from pkg_resources import resource_filename from . import __version__ as dtVersion -# from desiutil.log import get_logger - - -# log = None class TransferStatus(object): @@ -47,11 +43,44 @@ class TransferStatus(object): return try: with open(self.json) as j: - self.status = json.load(j) + try: + self.status = json.load(j) + except json.JSONDecodeError: + self._handle_malformed() except FileNotFoundError: pass return + def _handle_malformed(self): + """Handle malformed JSON files. + + This function will save the malformed file to a .bad file for + later analysis, and write an empty array to a new status file. + """ + from .daemon import log + bad = self.json + '.bad' + m = "Malformed JSON file detected: %s; saving original file as %s." + try: + log.error(m, self.json, bad) + except AttributeError: + # If the status code is running stand-alone, the log object + # will be None. + print("ERROR: " + (m % (self.json, bad))) + m = "shutil.copy2('%s', '%s')" + try: + log.debug(m, self.json, bad) + except AttributeError: + print("DEBUG: " + (m % (self.json, bad))) + shutil.copy2(self.json, bad) + m = "Writing empty array to %s." + try: + log.info(m, self.json) + except AttributeError: + print("INFO: " + (m % (self.json,))) + with open(self.json, 'w') as j: + j.write('[]') + return + def update(self, night, exposure, stage, failure=False, last=''): """Update the transfer status. @@ -92,6 +121,14 @@ class TransferStatus(object): self.status.insert(0, row) self.status = sorted(self.status, key=lambda x: x[0]*10000000 + x[1], reverse=True) + # + # Copy the original file before modifying. + # This will overwrite any existing .bak file + # + try: + shutil.copy2(self.json, self.json + '.bak') + except FileNotFoundError: + pass with open(self.json, 'w') as j: json.dump(self.status, j, indent=None, separators=(',', ':')) diff --git a/requirements.txt b/requirements.txt index 345f714..98fc19f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ setuptools pytz -git+https://github.com/desihub/[email protected]#egg=desiutil +git+https://github.com/desihub/[email protected]#egg=desiutil
desihub/desitransfer
9e0011389a87b6e881c99349dfb03ef4c9f3d85c
diff --git a/py/desitransfer/test/t/bad.json b/py/desitransfer/test/t/bad.json new file mode 100644 index 0000000..0f25ee4 --- /dev/null +++ b/py/desitransfer/test/t/bad.json @@ -0,0 +1,1 @@ +This is a bad JSON file! diff --git a/py/desitransfer/test/test_daemon.py b/py/desitransfer/test/test_daemon.py index f6247df..ab51215 100644 --- a/py/desitransfer/test/test_daemon.py +++ b/py/desitransfer/test/test_daemon.py @@ -135,10 +135,10 @@ class TestDaemon(unittest.TestCase): @patch('desitransfer.daemon.SMTPHandler') @patch('desitransfer.daemon.RotatingFileHandler') @patch('desitransfer.daemon.get_logger') - def test_TransferDaemon_configure_log(self, gl, rfh, smtp): + @patch('desitransfer.daemon.log') # Needed to restore the module-level log object after test. + def test_TransferDaemon_configure_log(self, mock_log, gl, rfh, smtp): """Test logging configuration. """ - ll = gl.return_value = MagicMock() with patch.dict('os.environ', {'CSCRATCH': self.tmp.name, 'DESI_ROOT': '/desi/root', @@ -149,7 +149,7 @@ class TestDaemon(unittest.TestCase): rfh.assert_called_once_with('/desi/root/spectro/staging/logs/desi_transfer_daemon.log', backupCount=100, maxBytes=100000000) gl.assert_called_once_with(timestamp=True) - ll.setLevel.assert_called_once_with(logging.DEBUG) + gl().setLevel.assert_called_once_with(logging.DEBUG) @patch.object(TransferDaemon, 'checksum_lock') @patch.object(TransferDaemon, 'directory') diff --git a/py/desitransfer/test/test_daily.py b/py/desitransfer/test/test_daily.py index 1d8c180..9089131 100644 --- a/py/desitransfer/test/test_daily.py +++ b/py/desitransfer/test/test_daily.py @@ -110,7 +110,7 @@ class TestDaily(unittest.TestCase): call().__exit__(None, None, None)]) mock_popen.assert_has_calls([call(), call(['fix_permissions.sh', '-a', '/dst/d0'], - stdout=mo(), stderr=-2), + stdout=mo(), stderr=-2), call().wait()]) diff --git a/py/desitransfer/test/test_status.py b/py/desitransfer/test/test_status.py index 0194031..23adbe1 100644 --- a/py/desitransfer/test/test_status.py +++ b/py/desitransfer/test/test_status.py @@ -4,9 +4,10 @@ """ import json import os +import shutil import sys import unittest -from unittest.mock import patch +from unittest.mock import patch, call from tempfile import TemporaryDirectory from pkg_resources import resource_filename from ..status import TransferStatus, _options @@ -85,6 +86,45 @@ class TestStatus(unittest.TestCase): cp.assert_called_once_with(j, d) cf.assert_called_once_with(h, os.path.join(d, 'index.html')) + @patch('desitransfer.daemon.log') + def test_TransferStatus_handle_malformed_with_log(self, mock_log): + """Test handling of malformed JSON files. + """ + bad = resource_filename('desitransfer.test', 't/bad.json') + with TemporaryDirectory() as d: + shutil.copy(bad, os.path.join(d, 'desi_transfer_status.json')) + s = TransferStatus(d) + self.assertTrue(os.path.exists(os.path.join(d, 'desi_transfer_status.json.bad'))) + self.assertListEqual(s.status, []) + self.assertListEqual(os.listdir(d), ['desi_transfer_status.json.bad', + 'desi_transfer_status.json']) + mock_log.error.assert_called_once_with('Malformed JSON file detected: %s; saving original file as %s.', + os.path.join(d, 'desi_transfer_status.json'), + os.path.join(d, 'desi_transfer_status.json.bad')) + mock_log.debug.assert_called_once_with("shutil.copy2('%s', '%s')", + os.path.join(d, 'desi_transfer_status.json'), + os.path.join(d, 'desi_transfer_status.json.bad')) + mock_log.info.assert_called_once_with('Writing empty array to %s.', + os.path.join(d, 'desi_transfer_status.json')) + + @patch('builtins.print') + def test_TransferStatus_handle_malformed_without_log(self, mock_print): + """Test handling of malformed JSON files (no log object). + """ + bad = resource_filename('desitransfer.test', 't/bad.json') + with TemporaryDirectory() as d: + shutil.copy(bad, os.path.join(d, 'desi_transfer_status.json')) + s = TransferStatus(d) + self.assertTrue(os.path.exists(os.path.join(d, 'desi_transfer_status.json.bad'))) + self.assertListEqual(s.status, []) + self.assertListEqual(os.listdir(d), ['desi_transfer_status.json.bad', + 'desi_transfer_status.json']) + mock_print.assert_has_calls([call('ERROR: Malformed JSON file detected: %s; saving original file as %s.' % (os.path.join(d, 'desi_transfer_status.json'), + os.path.join(d, 'desi_transfer_status.json.bad'))), + call("DEBUG: shutil.copy2('%s', '%s')" % (os.path.join(d, 'desi_transfer_status.json'), + os.path.join(d, 'desi_transfer_status.json.bad'))), + call("INFO: Writing empty array to %s." % (os.path.join(d, 'desi_transfer_status.json'),))]) + @patch('time.time') def test_TransferStatus_update(self, mock_time): """Test status reporting mechanism updates. @@ -98,6 +138,7 @@ class TestStatus(unittest.TestCase): json.dump(st, f, indent=None, separators=(',', ':')) s = TransferStatus(d) s.update('20200703', '12345678', 'checksum') + self.assertTrue(os.path.exists(js + '.bak')) self.assertEqual(s.status[0], [20200703, 12345678, 'checksum', True, '', 1565300090000]) s.update('20200703', '12345680', 'rsync') self.assertEqual(s.status[0], [20200703, 12345680, 'rsync', True, '', 1565300090000]) @@ -112,6 +153,35 @@ class TestStatus(unittest.TestCase): self.assertTrue(all(b)) self.assertEqual(len(b), 4) + @patch('time.time') + def test_TransferStatus_update_empty(self, mock_time): + """Test status reporting mechanism updates (with no initial JSON file). + """ + mock_time.return_value = 1565300090 + # st = [[20200703, 12345678, 'rsync', True, '', 1565300074664], + # [20200703, 12345677, 'rsync', True, '', 1565300073000]] + with TemporaryDirectory() as d: + js = os.path.join(d, 'desi_transfer_status.json') + # with open(js, 'w') as f: + # json.dump(st, f, indent=None, separators=(',', ':')) + s = TransferStatus(d) + s.update('20200703', '12345678', 'checksum') + self.assertFalse(os.path.exists(js + '.bak')) + self.assertEqual(s.status[0], [20200703, 12345678, 'checksum', True, '', 1565300090000]) + s.update('20200703', '12345680', 'rsync') + self.assertTrue(os.path.exists(js + '.bak')) + self.assertEqual(s.status[0], [20200703, 12345680, 'rsync', True, '', 1565300090000]) + s.update('20200703', '12345678', 'checksum', failure=True) + self.assertEqual(s.status[1], [20200703, 12345678, 'checksum', False, '', 1565300090000]) + s.update('20200703', '12345681', 'pipeline') + self.assertEqual(s.status[0], [20200703, 12345681, 'pipeline', True, '', 1565300090000]) + s.update('20200703', '12345681', 'pipeline', last='arcs') + self.assertEqual(s.status[0], [20200703, 12345681, 'pipeline', True, 'arcs', 1565300090000]) + s.update('20200703', 'all', 'backup') + b = [i[3] for i in s.status if i[2] == 'backup'] + self.assertTrue(all(b)) + self.assertEqual(len(b), 3) + def test_TransferStatus_find(self): """Test status search. """
Guard against truncated status file At 2020-01-09 01:00 PST, the desi_transfer_status.json file was truncated, causing the transfer daemon to crash when it subsequently tried to read the empty file. Workaround for quick restart: Add `[]` (an array) to the empty file. dtn04.nersc.gov was rebooted sometime after the file was truncated (approximately 02:30 PST), suggesting transient problems with the filesystem.
0.0
9e0011389a87b6e881c99349dfb03ef4c9f3d85c
[ "py/desitransfer/test/test_status.py::TestStatus::test_TransferStatus_handle_malformed_with_log", "py/desitransfer/test/test_status.py::TestStatus::test_TransferStatus_handle_malformed_without_log", "py/desitransfer/test/test_status.py::TestStatus::test_TransferStatus_update", "py/desitransfer/test/test_status.py::TestStatus::test_TransferStatus_update_empty" ]
[ "py/desitransfer/test/test_daemon.py::TestDaemon::test_lock_directory", "py/desitransfer/test/test_daemon.py::TestDaemon::test_popen", "py/desitransfer/test/test_daemon.py::TestDaemon::test_rsync_night", "py/desitransfer/test/test_daemon.py::TestDaemon::test_unlock_directory", "py/desitransfer/test/test_daemon.py::TestDaemon::test_verify_checksum", "py/desitransfer/test/test_daemon.py::test_suite", "py/desitransfer/test/test_daily.py::TestDaily::test_apache", "py/desitransfer/test/test_daily.py::TestDaily::test_config", "py/desitransfer/test/test_daily.py::TestDaily::test_lock", "py/desitransfer/test/test_daily.py::TestDaily::test_transfer", "py/desitransfer/test/test_daily.py::test_suite", "py/desitransfer/test/test_status.py::TestStatus::test_TransferStatus_find", "py/desitransfer/test/test_status.py::TestStatus::test_TransferStatus_init", "py/desitransfer/test/test_status.py::TestStatus::test_options", "py/desitransfer/test/test_status.py::test_suite" ]
{ "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2020-01-10 05:53:30+00:00
bsd-3-clause
1,884
desihub__desitransfer-21
diff --git a/bin/desi_tucson_transfer.sh b/bin/desi_tucson_transfer.sh index 94f1cc0..77cb2d5 100755 --- a/bin/desi_tucson_transfer.sh +++ b/bin/desi_tucson_transfer.sh @@ -29,7 +29,7 @@ set -o noglob # # Static data sets don't need to be updated as frequently. # -static='protodesi public/ets spectro/redux/andes spectro/redux/minisv2 spectro/redux/oak1' +static='protodesi public/epo public/ets spectro/redux/andes spectro/redux/minisv2 spectro/redux/oak1' # # Dynamic data sets may change daily. # diff --git a/doc/changes.rst b/doc/changes.rst index 81a4637..f41a9af 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -5,7 +5,12 @@ Change Log 0.3.9 (unreleased) ------------------ -* No changes yet. +* Deprecate continuous nightwatch transfers; nightwatch is now part of the + daily engineering transfer (PR `#21`_). +* Allow alternate scratch directory to be chosen if :envvar:`CSCRATCH` is + unavailable (PR `#21`_). + +.. _`#21`: https://github.com/desihub/desitransfer/pull/21 0.3.8 (2020-10-26) ------------------ diff --git a/py/desitransfer/common.py b/py/desitransfer/common.py index 0b9bb1b..6eba487 100644 --- a/py/desitransfer/common.py +++ b/py/desitransfer/common.py @@ -81,6 +81,35 @@ def stamp(zone='US/Pacific'): return n.astimezone(tz).strftime('%Y-%m-%d %H:%M:%S %Z') +def ensure_scratch(primary, alternate): + """Try an alternate temporary directory if the primary temporary directory + is unavilable. + + Parameters + ---------- + primary : :class:`str` + Primary temporary directory. + alternate : :class:`list` + A list of alternate directories. + + Returns + ------- + The first available temporary directory found. + """ + if not isinstance(alternate, list): + alternate = [alternate] + try: + l = os.listdir(primary) + except FileNotFoundError: + for a in alternate: + try: + l = os.listdir(a) + except FileNotFoundError: + continue + return a + return primary + + def yesterday(): """Yesterday's date in DESI "NIGHT" format, YYYYMMDD. """ diff --git a/py/desitransfer/daemon.py b/py/desitransfer/daemon.py index a3b5813..7113f27 100644 --- a/py/desitransfer/daemon.py +++ b/py/desitransfer/daemon.py @@ -24,7 +24,7 @@ from socket import getfqdn from tempfile import TemporaryFile from pkg_resources import resource_filename from desiutil.log import get_logger -from .common import dir_perm, file_perm, rsync, yesterday, empty_rsync +from .common import dir_perm, file_perm, rsync, yesterday, empty_rsync, ensure_scratch from .status import TransferStatus from . import __version__ as dtVersion @@ -94,7 +94,7 @@ class TransferDaemon(object): self.conf[s].getlist('expected_files'), self.conf[s]['checksum_file']) for s in self.sections] - self.scratch = self.conf['common']['scratch'] + self.scratch = ensure_scratch(self.conf['common']['scratch'], self.conf['common']['alternate_scratch'].split(',')) self._configure_log(options.debug) return @@ -365,7 +365,7 @@ The DESI Collaboration Account # pass else: - log.error('rsync problem detected!') + log.error('rsync problem detected for %s/%s!', night, exposure) log.debug("status.update('%s', '%s', 'rsync', failure=True)", night, exposure) status.update(night, exposure, 'rsync', failure=True) diff --git a/py/desitransfer/daily.py b/py/desitransfer/daily.py index 642825d..0ce4c30 100644 --- a/py/desitransfer/daily.py +++ b/py/desitransfer/daily.py @@ -11,6 +11,7 @@ import subprocess as sub import sys import time from argparse import ArgumentParser +from pkg_resources import resource_filename from .common import dir_perm, file_perm, rsync, stamp from . import __version__ as dtVersion @@ -24,20 +25,26 @@ class DailyDirectory(object): Source directory. destination : :class:`str` Desitination directory. + extra : :class:`list`, optional + Extra :command:`rsync` arguments to splice into command. + dirlinks : :class:`bool`, optional + If ``True``, convert source links into linked directory. """ - def __init__(self, source, destination): + def __init__(self, source, destination, extra=[], dirlinks=False): self.source = source self.destination = destination self.log = self.destination + '.log' + self.extra = extra + self.dirlinks = dirlinks - def transfer(self, apache=True): + def transfer(self, permission=True): """Data transfer operations for a single destination directory. Parameters ---------- - apache : :class:`bool` - If ``True`` set file ACLs for Apache httpd access. + permission : :class:`bool`, optional + If ``True``, set permissions for DESI collaboration access. Returns ------- @@ -45,6 +52,11 @@ class DailyDirectory(object): The status returned by :command:`rsync`. """ cmd = rsync(self.source, self.destination) + if not self.dirlinks: + cmd[cmd.index('--copy-dirlinks')] = '--links' + if self.extra: + for i, e in enumerate(self.extra): + cmd.insert(cmd.index('--omit-dir-times') + 1 + i, e) with open(self.log, 'ab') as l: l.write(("DEBUG: desi_daily_transfer %s\n" % dtVersion).encode('utf-8')) l.write(("DEBUG: %s\n" % stamp()).encode('utf-8')) @@ -54,8 +66,8 @@ class DailyDirectory(object): status = p.wait() if status == 0: self.lock() - if apache: - s = self.apache() + if permission: + s = self.permission() return status def lock(self): @@ -66,8 +78,8 @@ class DailyDirectory(object): for f in filenames: os.chmod(os.path.join(dirpath, f), file_perm) - def apache(self): - """Grant apache/www read access. + def permission(self): + """Set permissions for DESI collaboration access. In theory this should not change any permissions set by :meth:`~DailyDirectory.lock`. @@ -90,16 +102,20 @@ def _config(): """Wrap configuration so that module can be imported without environment variables set. """ + nightwatch_exclude = resource_filename('desitransfer', + 'data/desi_nightwatch_transfer_exclude.txt') engineering = os.path.realpath(os.path.join(os.environ['DESI_ROOT'], 'engineering')) spectro = os.path.realpath(os.path.join(os.environ['DESI_ROOT'], 'spectro')) return [DailyDirectory('/exposures/desi/sps', os.path.join(engineering, 'spectrograph', 'sps')), - # DailyDirectory('/exposures/nightwatch', - # os.path.join(spectro, 'nightwatch', 'kpno')), + DailyDirectory('/exposures/nightwatch', + os.path.join(spectro, 'nightwatch', 'kpno'), + extra=['--exclude-from', nightwatch_exclude]), DailyDirectory('/data/dts/exposures/lost+found', - os.path.join(spectro, 'staging', 'lost+found')), + os.path.join(spectro, 'staging', 'lost+found'), + dirlinks=True), # DailyDirectory('/data/fxc', # os.path.join(engineering, 'fxc')), DailyDirectory('/data/focalplane/logs/calib_logs', @@ -127,8 +143,6 @@ def _options(*args): """ desc = "Transfer non-critical DESI data from KPNO to NERSC." prsr = ArgumentParser(description=desc) - prsr.add_argument('-A', '--no-apache', action='store_false', dest='apache', - help='Do not set ACL for Apache httpd access.') # prsr.add_argument('-b', '--backup', metavar='H', type=int, default=20, # help='UTC time in hours to trigger HPSS backups (default %(default)s:00 UTC).') # prsr.add_argument('-d', '--debug', action='store_true', @@ -142,8 +156,8 @@ def _options(*args): help="Exit the script when FILE is detected (default %(default)s).") # prsr.add_argument('-n', '--nersc', default='cori', metavar='NERSC_HOST', # help="Trigger DESI pipeline on this NERSC system (default %(default)s).") - # prsr.add_argument('-P', '--no-pipeline', action='store_false', dest='pipeline', - # help="Only transfer files, don't start the DESI pipeline.") + prsr.add_argument('-P', '--no-permission', action='store_false', dest='permission', + help='Do not set permissions for DESI collaboration access.') prsr.add_argument('-s', '--sleep', metavar='H', type=int, default=24, help='In daemon mode, sleep H hours before checking for new data (default %(default)s hours).') # prsr.add_argument('-S', '--shadow', action='store_true', @@ -167,7 +181,7 @@ def main(): print("INFO: %s detected, shutting down daily transfer script." % options.kill) return 0 for d in _config(): - status = d.transfer(apache=options.apache) + status = d.transfer(permission=options.permission) if status != 0: print("ERROR: rsync problem detected for {0.source} -> {0.destination}!".format(d)) return status diff --git a/py/desitransfer/data/desi_nightwatch_transfer_exclude.txt b/py/desitransfer/data/desi_nightwatch_transfer_exclude.txt index 2f1f1fa..446d0a0 100644 --- a/py/desitransfer/data/desi_nightwatch_transfer_exclude.txt +++ b/py/desitransfer/data/desi_nightwatch_transfer_exclude.txt @@ -1,3 +1,9 @@ -*/preproc*.fits -*/qsky-*.fits -*/*.tmp +preproc*.fits +qsky-*.fits +*.tmp +nightwatch.* +nightwatch-debug.* +nightwatch-webapp.* +webapp.log +redux +test diff --git a/py/desitransfer/data/desi_transfer_daemon.ini b/py/desitransfer/data/desi_transfer_daemon.ini index c1a8ade..222baed 100644 --- a/py/desitransfer/data/desi_transfer_daemon.ini +++ b/py/desitransfer/data/desi_transfer_daemon.ini @@ -22,7 +22,7 @@ checksum_file = checksum-{exposure}.sha256sum [common] # Use this directory for temporary files. scratch = ${CSCRATCH} -# scratch = ${HOME}/tmp +alternate_scratch = ${HOME}/tmp # The presence of this file indicates checksums are being computed. checksum_lock = /tmp/checksum-running # UTC time in hours to look for delayed files.
desihub/desitransfer
e6e6d9ee728d4525608213214f00ff6127ccb376
diff --git a/py/desitransfer/test/test_common.py b/py/desitransfer/test/test_common.py index 1642616..8be6d5e 100644 --- a/py/desitransfer/test/test_common.py +++ b/py/desitransfer/test/test_common.py @@ -6,7 +6,8 @@ import datetime import os import unittest from unittest.mock import patch -from ..common import dir_perm, file_perm, empty_rsync, rsync, stamp, yesterday, today +from tempfile import TemporaryDirectory +from ..common import dir_perm, file_perm, empty_rsync, rsync, stamp, ensure_scratch, yesterday, today class TestCommon(unittest.TestCase): @@ -22,10 +23,14 @@ class TestCommon(unittest.TestCase): pass def setUp(self): - pass + """Create a temporary directory to simulate CSCRATCH. + """ + self.tmp = TemporaryDirectory() def tearDown(self): - pass + """Clean up temporary directory. + """ + self.tmp.cleanup() def test_permissions(self): """Ensure that file and directory permissions do not change. @@ -72,6 +77,19 @@ total size is 118,417,836,324 speedup is 494,367.55 s = stamp('US/Arizona') self.assertEqual(s, '2019-07-03 05:00:00 MST') + def test_ensure_scratch(self): + """Test ensure_scratch. + """ + tmp = self.tmp.name + t = ensure_scratch(tmp, ['/foo', '/bar']) + self.assertEqual(t, tmp) + t = ensure_scratch('/foo', tmp) + self.assertEqual(t, tmp) + t = ensure_scratch('/foo', ['/bar', tmp]) + self.assertEqual(t, tmp) + t = ensure_scratch('/foo', ['/bar', '/abcdefg', tmp]) + self.assertEqual(t, tmp) + @patch('desitransfer.common.dt') def test_yesterday(self, mock_dt): """Test yesterday's date. diff --git a/py/desitransfer/test/test_daemon.py b/py/desitransfer/test/test_daemon.py index 0944a75..fa0551e 100644 --- a/py/desitransfer/test/test_daemon.py +++ b/py/desitransfer/test/test_daemon.py @@ -288,7 +288,7 @@ class TestDaemon(unittest.TestCase): mock_popen.assert_called_once_with(['/bin/rsync', '--verbose', '--recursive', '--copy-dirlinks', '--times', '--omit-dir-times', 'dts:/data/dts/exposures/raw/20190703/00000127/', '/desi/root/spectro/staging/raw/20190703/00000127/']) - mock_log.error.assert_called_once_with('rsync problem detected!') + mock_log.error.assert_called_once_with('rsync problem detected for %s/%s!', '20190703', '00000127') mock_status.update.assert_called_once_with('20190703', '00000127', 'rsync', failure=True) # # Actually run the pipeline diff --git a/py/desitransfer/test/test_daily.py b/py/desitransfer/test/test_daily.py index 863f9e9..18feddd 100644 --- a/py/desitransfer/test/test_daily.py +++ b/py/desitransfer/test/test_daily.py @@ -37,6 +37,8 @@ class TestDaily(unittest.TestCase): self.assertEqual(c[0].source, '/exposures/desi/sps') self.assertEqual(c[0].destination, os.path.join(os.environ['DESI_ROOT'], 'engineering', 'spectrograph', 'sps')) + self.assertEqual(c[1].extra[0], '--exclude-from') + self.assertTrue(c[2].dirlinks) def test_options(self): """Test command-line arguments. @@ -45,7 +47,7 @@ class TestDaily(unittest.TestCase): ['desi_daily_transfer', '--daemon', '--kill', os.path.expanduser('~/stop_daily_transfer')]): options = _options() - self.assertTrue(options.apache) + self.assertTrue(options.permission) self.assertEqual(options.sleep, 24) self.assertTrue(options.daemon) self.assertEqual(options.kill, @@ -69,7 +71,7 @@ class TestDaily(unittest.TestCase): call().__enter__(), call().write(('DEBUG: desi_daily_transfer {}\n'.format(dtVersion)).encode('utf-8')), call().write(b'DEBUG: 2019-07-03\n'), - call().write(b'DEBUG: /bin/rsync --verbose --recursive --copy-dirlinks --times --omit-dir-times dts:/src/d0/ /dst/d0/\n'), + call().write(b'DEBUG: /bin/rsync --verbose --recursive --links --times --omit-dir-times dts:/src/d0/ /dst/d0/\n'), call().flush(), call().__exit__(None, None, None)]) mock_walk.assert_called_once_with('/dst/d0') @@ -79,6 +81,30 @@ class TestDaily(unittest.TestCase): @patch('os.walk') @patch('os.chmod') + @patch('subprocess.Popen') + @patch('desitransfer.daily.stamp') + @patch('builtins.open', new_callable=mock_open) + def test_transfer_extra(self, mo, mock_stamp, mock_popen, mock_chmod, mock_walk): + """Test the transfer functions in DailyDirectory.transfer() with extra options. + """ + mock_walk.return_value = [('/dst/d0', [], ['f1', 'f2'])] + mock_stamp.return_value = '2019-07-03' + mock_popen().wait.return_value = 0 + d = DailyDirectory('/src/d0', '/dst/d0', extra=['--exclude-from', 'foo']) + d.transfer() + mo.assert_has_calls([call('/dst/d0.log', 'ab'), + call().__enter__(), + call().write(('DEBUG: desi_daily_transfer {}\n'.format(dtVersion)).encode('utf-8')), + call().write(b'DEBUG: 2019-07-03\n'), + call().write(b'DEBUG: /bin/rsync --verbose --recursive --links --times --omit-dir-times --exclude-from foo dts:/src/d0/ /dst/d0/\n'), + call().flush(), + call().__exit__(None, None, None)]) + mock_walk.assert_called_once_with('/dst/d0') + mock_chmod.assert_has_calls([call('/dst/d0', 1512), + call('/dst/d0/f1', 288), + call('/dst/d0/f2', 288)]) + @patch('os.walk') + @patch('os.chmod') def test_lock(self, mock_chmod, mock_walk): """Test the lock functions in DailyDirectory.lock(). """ @@ -98,12 +124,12 @@ class TestDaily(unittest.TestCase): @patch('subprocess.Popen') @patch('builtins.open', new_callable=mock_open) - def test_apache(self, mo, mock_popen): - """Test granting apache/www permissions. + def test_permission(self, mo, mock_popen): + """Test granting permissions. """ mock_popen().wait.return_value = 0 d = DailyDirectory('/src/d0', '/dst/d0') - d.apache() + d.permission() mo.assert_has_calls([call('/dst/d0.log', 'ab'), call().__enter__(), call().write(b'DEBUG: fix_permissions.sh /dst/d0\n'),
Shift nightwatch transfer to daily engineering data transfer Nightwatch is now primarily being run at NERSC, so there is no need for near-real-time transfers of nightwatch data produced at KPNO.
0.0
e6e6d9ee728d4525608213214f00ff6127ccb376
[ "py/desitransfer/test/test_common.py::TestCommon::test_empty_rsync", "py/desitransfer/test/test_common.py::TestCommon::test_ensure_scratch", "py/desitransfer/test/test_common.py::TestCommon::test_permissions", "py/desitransfer/test/test_common.py::TestCommon::test_rsync", "py/desitransfer/test/test_common.py::TestCommon::test_stamp", "py/desitransfer/test/test_common.py::TestCommon::test_today", "py/desitransfer/test/test_common.py::TestCommon::test_yesterday", "py/desitransfer/test/test_common.py::test_suite", "py/desitransfer/test/test_daemon.py::TestDaemon::test_lock_directory", "py/desitransfer/test/test_daemon.py::TestDaemon::test_popen", "py/desitransfer/test/test_daemon.py::TestDaemon::test_rsync_night", "py/desitransfer/test/test_daemon.py::TestDaemon::test_unlock_directory", "py/desitransfer/test/test_daemon.py::TestDaemon::test_verify_checksum", "py/desitransfer/test/test_daemon.py::test_suite", "py/desitransfer/test/test_daily.py::TestDaily::test_config", "py/desitransfer/test/test_daily.py::TestDaily::test_lock", "py/desitransfer/test/test_daily.py::TestDaily::test_permission", "py/desitransfer/test/test_daily.py::TestDaily::test_transfer", "py/desitransfer/test/test_daily.py::TestDaily::test_transfer_extra", "py/desitransfer/test/test_daily.py::test_suite" ]
[]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2020-11-20 18:43:42+00:00
bsd-3-clause
1,885
desihub__desiutil-125
diff --git a/doc/changes.rst b/doc/changes.rst index f154327..6f23c11 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -10,7 +10,11 @@ Change Log 1.9.15 (unreleased) ------------------- -* Draw ecliptic in all-sky plots. +* Set read-only permissions on all Module files, and unlock them as needed (PR `#125`_). +* Draw ecliptic in all-sky plots (PR `#124`_). + +.. _`#125`: https://github.com/desihub/desiutil/pull/125 +.. _`#124`: https://github.com/desihub/desiutil/pull/124 1.9.14 (2018-10-05) ------------------- diff --git a/py/desiutil/install.py b/py/desiutil/install.py index 11f22e1..1f7077f 100644 --- a/py/desiutil/install.py +++ b/py/desiutil/install.py @@ -720,7 +720,6 @@ class DesiInstall(object): outfile = os.path.join(module_directory, self.module_keywords['name'], self.module_keywords['version']) - os.chmod(outfile, 0o440) except OSError as ose: self.log.critical(ose.strerror) raise DesiInstallException(ose.strerror) diff --git a/py/desiutil/io.py b/py/desiutil/io.py index 4a9d2a5..b515e43 100644 --- a/py/desiutil/io.py +++ b/py/desiutil/io.py @@ -9,6 +9,8 @@ Module for I/O related code. """ from __future__ import (print_function, absolute_import, division, unicode_literals) +from contextlib import contextmanager + try: basestring @@ -218,3 +220,55 @@ def decode_table(data, encoding='ascii', native=True): table.meta['ENCODING'] = encoding return table + + +@contextmanager +def unlock_file(*args, **kwargs): + """Unlock a read-only file, return a file-like object, and restore the + read-only state when done. Arguments are the same as :func:`open`. + + Returns + ------- + file-like + A file-like object, as returned by :func:`open`. + + Notes + ----- + * This assumes that the user of this function is also the owner of the + file. :func:`os.chmod` would not be expected to work in any other + circumstance. + * Technically, this restores the *original* permissions of the file, it + does not care what the original permissions were. + * If the named file does not exist, this function effectively does not + attempt to guess what the final permissions of the file would be. In + other words, it just does whatever :func:`open` would do. In this case + it is the user's responsibilty to change permissions as needed after + creating the file. + + Examples + -------- + >>> with unlock_file('read-only.txt', 'w') as f: + ... f.write(new_data) + """ + import os + import stat + w = stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH + # + # Get original permissions, unlock permissions + # + # uid = os.getuid() + old_mode = None + if os.path.exists(args[0]): + old_mode = stat.S_IMODE(os.stat(args[0]).st_mode) + os.chmod(args[0], old_mode | stat.S_IWUSR) + f = open(*args, **kwargs) + try: + yield f + finally: + # + # Restore permissions to read-only state. + # + f.close() + if old_mode is None: + old_mode = stat.S_IMODE(os.stat(args[0]).st_mode) + os.chmod(args[0], old_mode & ~w) diff --git a/py/desiutil/modules.py b/py/desiutil/modules.py index f8be62f..97aebb4 100644 --- a/py/desiutil/modules.py +++ b/py/desiutil/modules.py @@ -253,8 +253,7 @@ def process_module(module_file, module_keywords, module_dir): module_keywords['version']) with open(module_file) as m: mod = m.read().format(**module_keywords) - with open(install_module_file, 'w') as m: - m.write(mod) + _write_module_data(install_module_file, mod) return mod @@ -278,6 +277,18 @@ def default_module(module_keywords, module_dir): install_version_file = join(module_dir, module_keywords['name'], '.version') dot_version = dot_template.format(**module_keywords) - with open(install_version_file, 'w') as v: - v.write(dot_version) + _write_module_data(install_version_file, dot_version) return dot_version + + +def _write_module_data(filename, data): + """Write and permission-lock Module file data. This is intended + to consolidate some duplicated code. + """ + from os import chmod + from stat import S_IRUSR, S_IRGRP + from .io import unlock_file + with unlock_file(filename, 'w') as f: + f.write(data) + chmod(filename, S_IRUSR | S_IRGRP) + return
desihub/desiutil
07df949c0cd4e94db02a8941b369899245df5af0
diff --git a/py/desiutil/test/test_io.py b/py/desiutil/test/test_io.py index a8b17dd..4c75f51 100644 --- a/py/desiutil/test/test_io.py +++ b/py/desiutil/test/test_io.py @@ -6,16 +6,24 @@ from __future__ import (absolute_import, division, print_function, unicode_literals) # The line above will help with 2to3 support. import unittest +import os +import stat import sys import numpy as np from astropy.table import Table -from ..io import combine_dicts, decode_table, encode_table, yamlify +from ..io import combine_dicts, decode_table, encode_table, yamlify, unlock_file try: basestring except NameError: # For Python 3 basestring = str +skipTemp = False +try: + from tempfile import TemporaryDirectory +except ImportError: + skipTemp = True + class TestIO(unittest.TestCase): """Test desiutil.io @@ -178,6 +186,33 @@ class TestIO(unittest.TestCase): self.assertEqual(dict1, {'a': {'b': {'x': 1, 'y': 2}}}) self.assertEqual(dict2, {'a': {'b': {'p': 3, 'q': 4}}}) + @unittest.skipIf(skipTemp, "Skipping test that requires tempfile.TemporaryDirectory.") + def test_unlock_file(self): + """Test the permission unlock file manager. + """ + fff = stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH + www = stat.S_IWUSR | stat.S_IWGRP | stat.S_IWOTH + with TemporaryDirectory() as dirname: + filename = os.path.join(dirname, 'tempfile') + with open(filename, 'wb') as f: + f.write(b'Content\n') + s0 = os.stat(filename) + ro = stat.S_IFMT(s0.st_mode) | fff + os.chmod(filename, ro) + s1 = os.stat(filename) + self.assertEqual(stat.S_IMODE(s1.st_mode), fff) + with unlock_file(filename, 'ab') as f: + f.write(b'More content\n') + s2 = os.stat(filename) + self.assertEqual(stat.S_IMODE(s2.st_mode), fff | stat.S_IWUSR) + s3 = os.stat(filename) + self.assertEqual(stat.S_IMODE(s3.st_mode), fff) + filename = os.path.join(dirname, 'newfile') + with unlock_file(filename, 'wb') as f: + f.write(b'Some content\n') + s0 = os.stat(filename) + self.assertEqual(stat.S_IMODE(s0.st_mode) & www, 0) + def test_suite(): """Allows testing of only this module with the command:: diff --git a/py/desiutil/test/test_modules.py b/py/desiutil/test/test_modules.py index a05a62c..72c073a 100644 --- a/py/desiutil/test/test_modules.py +++ b/py/desiutil/test/test_modules.py @@ -12,6 +12,8 @@ from os import chmod, environ, mkdir, pathsep, remove, rmdir from os.path import dirname, exists, isdir, join from sys import version_info from shutil import rmtree +from tempfile import mkdtemp +from pkg_resources import resource_filename from ..modules import (init_modules, configure_module, process_module, default_module) @@ -23,7 +25,7 @@ class TestModules(unittest.TestCase): @classmethod def setUpClass(cls): # Data directory - cls.data_dir = join(dirname(__file__), 't') + cls.data_dir = mkdtemp() cls.bin_dir = join(cls.data_dir, 'libexec') cls.orig_env_cache = dict() cls.env_cache = dict() @@ -56,7 +58,7 @@ class TestModules(unittest.TestCase): del environ[e] else: environ[e] = cls.orig_env_cache[e] - rmtree(cls.bin_dir) + rmtree(cls.data_dir) def cache_env(self, envs): """Store existing environment variables in a cache and delete them. @@ -227,7 +229,7 @@ class TestModules(unittest.TestCase): def test_process_module(self): """Test processing of module file templates. """ - module_file = join(self.data_dir, 'test.module') + module_file = resource_filename('desiutil.test', 't/test.module') module_keywords = {'name': 'foo', 'version': 'bar'} process_module(module_file, module_keywords, self.data_dir) self.assertTrue(isdir(join(self.data_dir, 'foo')))
desiInstall can't alter .version files with new permissions settings. So, I tagged 1.9.14, and went to install it with `desiInstall -d desiutil 1.9.14`. In the process of restricting write access, even to the desi user, I also made .version files read-only. However, `desiInstall` expects to be able to write to such files. For now, I am going to restore user-read to all .version files in 20180709-1.2.6-spec.
0.0
07df949c0cd4e94db02a8941b369899245df5af0
[ "py/desiutil/test/test_io.py::TestIO::test_combinedicts", "py/desiutil/test/test_io.py::TestIO::test_endecode_table", "py/desiutil/test/test_io.py::TestIO::test_unlock_file", "py/desiutil/test/test_io.py::test_suite", "py/desiutil/test/test_modules.py::TestModules::test_configure_module", "py/desiutil/test/test_modules.py::TestModules::test_default_module", "py/desiutil/test/test_modules.py::TestModules::test_init_modules", "py/desiutil/test/test_modules.py::TestModules::test_process_module", "py/desiutil/test/test_modules.py::test_suite" ]
[]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-10-30 16:59:46+00:00
bsd-3-clause
1,886
desihub__desiutil-173
diff --git a/doc/changes.rst b/doc/changes.rst index ef3bf1d..0fc8189 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -5,7 +5,10 @@ Change Log 3.2.2 (unreleased) ------------------ -* No changes yet. +* Add module config support for packages like QuasarNP where the GitHub + name is capitalized by the python package isn't (PR `#173`_). + +.. _`#173`: https://github.com/desihub/desiutil/pull/173 3.2.1 (2021-05-13) ------------------ diff --git a/py/desiutil/modules.py b/py/desiutil/modules.py index 33a2ca9..4accae3 100644 --- a/py/desiutil/modules.py +++ b/py/desiutil/modules.py @@ -199,7 +199,10 @@ def configure_module(product, version, product_root, working_dir=None, dev=False module_keywords['needs_ld_lib'] = '' if isdir(join(working_dir, 'pro')): module_keywords['needs_idl'] = '' - if (exists(join(working_dir, 'setup.py')) and isdir(join(working_dir, product))): + if (exists(join(working_dir, 'setup.py')) and + (isdir(join(working_dir, product)) or + isdir(join(working_dir, product.lower()))) + ): if dev: module_keywords['needs_trunk_py'] = '' module_keywords['trunk_py_dir'] = ''
desihub/desiutil
93f40ac22f0d5629bb80713e11918e1d1cd3f36b
diff --git a/py/desiutil/test/test_modules.py b/py/desiutil/test/test_modules.py index 3b5233b..4c710f0 100644 --- a/py/desiutil/test/test_modules.py +++ b/py/desiutil/test/test_modules.py @@ -222,6 +222,35 @@ class TestModules(unittest.TestCase): rmdir(join(self.data_dir, t)) for t in test_files: remove(join(self.data_dir, t)) + # + # Test mixed case product directory (Blat) vs. python package (blat) + # + test_dirs = ('blat',) + test_files = {'setup.py': '#!/usr/bin/env python\n'} + for t in test_dirs: + mkdir(join(self.data_dir, t)) + for t in test_files: + with open(join(self.data_dir, t), 'w') as s: + s.write(test_files[t]) + results['name'] = 'Blat' + results['version'] = '1.2.3' + results['needs_bin'] = '# ' + results['needs_python'] = '' + results['needs_trunk_py'] = '# ' + results['trunk_py_dir'] = '/py' + results['needs_ld_lib'] = '# ' + results['needs_idl'] = '# ' + + conf = configure_module('Blat', '1.2.3', '/my/product/root', + working_dir=self.data_dir) + + for key in results: + self.assertEqual(conf[key], results[key], key) + for t in test_dirs: + rmdir(join(self.data_dir, t)) + for t in test_files: + remove(join(self.data_dir, t)) + def test_process_module(self): """Test processing of module file templates.
desiInstall creates incorrect module file for QuasarNP QuasarNP is a semi-external package hosted in desihub. It doesn't have a boilerplate etc/quasarnp.module file, but it also doesn't require anything custom so I was expecting the desiInstall default module file to work. desiInstall does correctly identify the "py" install and pip installs QuasarNP, but the resulting module file doesn't add $PRODUCT_DIR/lib/python3.8/site-packages to $PYTHONPATH. ``` [cori06 ~] desiInstall -v -r $SCRATCH/desi/test QuasarNP 0.1.0 WARNING:install.py:183:get_options:2021-06-03T14:21:29: The environment variable LANG is not set! DEBUG:install.py:251:get_options:2021-06-03T14:21:29: Set log level to DEBUG. DEBUG:install.py:320:get_product_version:2021-06-03T14:21:29: Detected GitHub install. DEBUG:install.py:351:identify_branch:2021-06-03T14:21:29: Using https://github.com/desihub/QuasarNP/archive/0.1.0.tar.gz as the URL of this product. INFO:install.py:412:get_code:2021-06-03T14:21:29: Detected old working directory, /global/u2/s/sjbailey/QuasarNP-0.1.0. Deleting... DEBUG:install.py:414:get_code:2021-06-03T14:21:29: shutil.rmtree('/global/u2/s/sjbailey/QuasarNP-0.1.0') DEBUG:install.py:638:start_modules:2021-06-03T14:21:30: Initializing Modules with MODULESHOME=/opt/cray/pe/modules/3.2.11.4. DEBUG:install.py:538:build_type:2021-06-03T14:21:30: Detected build type: py DEBUG:install.py:700:install_module:2021-06-03T14:21:30: configure_module(QuasarNP, 0.1.0, working_dir=/global/u2/s/sjbailey/QuasarNP-0.1.0, dev=False) DEBUG:install.py:720:install_module:2021-06-03T14:21:30: process_module('/global/common/software/desi/cori/desiconda/20200801-1.4.0-spec/code/desiutil/3.2.1/lib/python3.8/site-packages/desiutil/data/desiutil.module', self.module_keywords, '/global/cscratch1/sd/sjbailey/desi/test/modulefiles') DEBUG:install.py:757:prepare_environment:2021-06-03T14:21:31: module('switch', 'QuasarNP/0.1.0') DEBUG:install.py:538:build_type:2021-06-03T14:21:31: Detected build type: py DEBUG:install.py:538:build_type:2021-06-03T14:21:31: Detected build type: py DEBUG:install.py:802:install:2021-06-03T14:21:31: os.makedirs('/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages') DEBUG:install.py:824:install:2021-06-03T14:21:31: /global/common/software/desi/cori/desiconda/20200801-1.4.0-spec/conda/bin/python -m pip install --no-deps --disable-pip-version-check --ignore-installed --prefix=/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0 . DEBUG:install.py:833:install:2021-06-03T14:21:33: Processing /global/u2/s/sjbailey/QuasarNP-0.1.0 Building wheels for collected packages: quasarnp Building wheel for quasarnp (setup.py): started Building wheel for quasarnp (setup.py): finished with status 'done' Created wheel for quasarnp: filename=quasarnp-0.1.0-py3-none-any.whl size=13407 sha256=17d7dbdf89520f3a0e5d751edd4b7591b45563425a190550ff31c71e48b1b855 Stored in directory: /global/u2/s/sjbailey/.cache/pip/wheels/b3/5d/19/08d052aecb141666e9fca7cef889a0c9393b18766c47f69300 Successfully built quasarnp Installing collected packages: quasarnp Successfully installed quasarnp-0.1.0 DEBUG:install.py:538:build_type:2021-06-03T14:21:33: Detected build type: py DEBUG:install.py:538:build_type:2021-06-03T14:21:33: Detected build type: py DEBUG:install.py:957:permissions:2021-06-03T14:21:33: fix_permissions.sh -v /global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0 DEBUG:install.py:962:permissions:2021-06-03T14:21:35: Fixing permissions on /global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0 ... /usr/bin/find /global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0 -user sjbailey -not -group desi -exec chgrp -c -h desi {} ; changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/model.py' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/io.py' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/__init__.py' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/__pycache__' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/__pycache__/layers.cpython-38.pyc' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/__pycache__/model.cpython-38.pyc' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/__pycache__/__init__.cpython-38.pyc' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/__pycache__/utils.cpython-38.pyc' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/__pycache__/io.cpython-38.pyc' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/layers.py' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/utils.py' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp-0.1.0.dist-info' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp-0.1.0.dist-info/INSTALLER' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp-0.1.0.dist-info/WHEEL' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp-0.1.0.dist-info/LICENSE' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp-0.1.0.dist-info/top_level.txt' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp-0.1.0.dist-info/METADATA' from sjbailey to desi changed group of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp-0.1.0.dist-info/RECORD' from sjbailey to desi /usr/bin/find /global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0 -user sjbailey -type f -not -perm /g+r -exec chmod -c g+r {} ; /usr/bin/find /global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0 -user sjbailey -type d -not -perm -g+rxs -exec chmod -c g+rxs {} ; mode of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0' changed from 0755 (rwxr-xr-x) to 2755 (rwxr-sr-x) mode of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib' changed from 0755 (rwxr-xr-x) to 2755 (rwxr-sr-x) mode of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8' changed from 0755 (rwxr-xr-x) to 2755 (rwxr-sr-x) mode of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages' changed from 0755 (rwxr-xr-x) to 2755 (rwxr-sr-x) mode of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp' changed from 0755 (rwxr-xr-x) to 2755 (rwxr-sr-x) mode of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp/__pycache__' changed from 0755 (rwxr-xr-x) to 2755 (rwxr-sr-x) mode of '/global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0/lib/python3.8/site-packages/quasarnp-0.1.0.dist-info' changed from 0755 (rwxr-xr-x) to 2755 (rwxr-sr-x) DEBUG:install.py:970:permissions:2021-06-03T14:21:35: chmod -R a-w /global/cscratch1/sd/sjbailey/desi/test/code/QuasarNP/0.1.0 DEBUG:install.py:975:permissions:2021-06-03T14:21:35: DEBUG:install.py:987:cleanup:2021-06-03T14:21:35: os.chdir('/global/u2/s/sjbailey') DEBUG:install.py:991:cleanup:2021-06-03T14:21:35: shutil.rmtree('/global/u2/s/sjbailey/QuasarNP-0.1.0') DEBUG:install.py:1024:run:2021-06-03T14:21:35: run() complete. [cori06 ~] tail -15 $SCRATCH/desi/test/modulefiles/QuasarNP/0.1.0 # setenv [string toupper $product] $PRODUCT_DIR # # The lines below set various other environment variables. They assume the # template product layout. These will be set or commented as needed by the # desiInstall script. # # prepend-path PATH $PRODUCT_DIR/bin # prepend-path PYTHONPATH $PRODUCT_DIR/lib/python3.8/site-packages # prepend-path PYTHONPATH $PRODUCT_DIR/py # prepend-path LD_LIBRARY_PATH $PRODUCT_DIR/lib # prepend-path IDL_PATH +$PRODUCT_DIR/pro # # Add any non-standard Module code below this point. # ```
0.0
93f40ac22f0d5629bb80713e11918e1d1cd3f36b
[ "py/desiutil/test/test_modules.py::TestModules::test_configure_module" ]
[ "py/desiutil/test/test_modules.py::TestModules::test_default_module", "py/desiutil/test/test_modules.py::TestModules::test_init_modules", "py/desiutil/test/test_modules.py::TestModules::test_process_module", "py/desiutil/test/test_modules.py::test_suite" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2021-06-03 22:34:52+00:00
bsd-3-clause
1,887
desihub__desiutil-188
diff --git a/doc/changes.rst b/doc/changes.rst index 8697970..93581d9 100644 --- a/doc/changes.rst +++ b/doc/changes.rst @@ -8,9 +8,14 @@ Change Log * :command:`desiInstall` uses desihub location of simqso fork (commit e963344_). * Allow :command:`desiInstall` to remove permission-locked directories; suppress certain :command:`pip` warnings (PR `#185`_). +* Allow :command:`desiInstall` to compile code in certain branch installs (PR `#188`_). +* Add `gpu_specter`_ to known packages (PR `#189`_). .. _e963344: https://github.com/desihub/desiutil/commit/e963344cd072255174187d2bd6da72d085745abd .. _`#185`: https://github.com/desihub/desiutil/pull/185 +.. _`#188`: https://github.com/desihub/desiutil/pull/188 +.. _`#189`: https://github.com/desihub/desiutil/pull/189 +.. _`gpu_specter`: https://github.com/desihub/gpu_specter 3.2.5 (2022-01-20) ------------------ diff --git a/doc/desiInstall.rst b/doc/desiInstall.rst index e433192..8c926f0 100644 --- a/doc/desiInstall.rst +++ b/doc/desiInstall.rst @@ -322,6 +322,23 @@ not bundled with the code. The script should download data *directly* to with :command:`desiInstall` and unit tests. Note that here are other, better ways to install and manipulate data that is bundled *with* a Python package. +Compile in Branch Installs +-------------------------- + +In a few cases (fiberassign_, specex_) code needs to be compiled even when +installing a branch. If :command:`desiInstall` detects a branch install *and* +the script ``etc/product_compile.sh`` exists, :command:`desiInstall` will run this +script, supplying the Python executable path as a single command-line argument. +The script itself is intended to be a thin wrapper on *e.g.*:: + + #!/bin/bash + py=$1 + ${py} setup.py build_ext --inplace + + +.. _fiberassign: https://github.com/desihub/fiberassign +.. _specex: https://github.com/desihub/specex + Fix Permissions --------------- diff --git a/py/desiutil/install.py b/py/desiutil/install.py index 28c92ad..7dfc4cf 100644 --- a/py/desiutil/install.py +++ b/py/desiutil/install.py @@ -910,6 +910,33 @@ class DesiInstall(object): raise DesiInstallException(message) return + def compile_branch(self): + """Certain packages need C/C++ code compiled even for a branch install. + """ + if self.is_branch: + compile_script = os.path.join(self.install_dir, 'etc', + '{0}_compile.sh'.format(self.baseproduct)) + if os.path.exists(compile_script): + self.log.debug("Detected compile script: %s.", compile_script) + if self.options.test: + self.log.debug('Test Mode. Skipping compile script.') + else: + current_dir = os.getcwd() + self.log.debug("os.chdir('%s')", self.install_dir) + os.chdir(self.install_dir) + proc = Popen([compile_script, sys.executable], universal_newlines=True, + stdout=PIPE, stderr=PIPE) + out, err = proc.communicate() + status = proc.returncode + self.log.debug(out) + self.log.debug("os.chdir('%s')", current_dir) + os.chdir(current_dir) + if status != 0 and len(err) > 0: + message = "Error compiling code: {0}".format(err) + self.log.critical(message) + raise DesiInstallException(message) + return + def verify_bootstrap(self): """Make sure that desiutil/desiInstall was installed with an explicit Python executable path. @@ -1027,6 +1054,7 @@ class DesiInstall(object): self.prepare_environment() self.install() self.get_extra() + self.compile_branch() self.verify_bootstrap() self.permissions() except DesiInstallException:
desihub/desiutil
4f910f407c4b7fa9636aa64fc65acd72c49a3cf7
diff --git a/py/desiutil/test/test_install.py b/py/desiutil/test/test_install.py index 73c18f7..a12433f 100644 --- a/py/desiutil/test/test_install.py +++ b/py/desiutil/test/test_install.py @@ -2,6 +2,7 @@ # -*- coding: utf-8 -*- """Test desiutil.install. """ +import sys import unittest from unittest.mock import patch, call, MagicMock, mock_open from os import chdir, environ, getcwd, mkdir, remove, rmdir @@ -507,6 +508,42 @@ class TestInstall(unittest.TestCase): self.assertLog(-1, message) self.assertEqual(str(cm.exception), message) + @patch('os.chdir') + @patch('os.path.exists') + @patch('desiutil.install.Popen') + def test_compile_branch(self, mock_popen, mock_exists, mock_chdir): + """Test compiling code in certain cases. + """ + current_dir = getcwd() + options = self.desiInstall.get_options(['fiberassign', 'branches/main']) + self.desiInstall.baseproduct = 'fiberassign' + self.desiInstall.is_branch = True + self.desiInstall.install_dir = join(self.data_dir, 'fiberassign') + mock_exists.return_value = True + mock_proc = mock_popen() + mock_proc.returncode = 0 + mock_proc.communicate.return_value = ('out', 'err') + self.desiInstall.compile_branch() + mock_chdir.assert_has_calls([call(self.desiInstall.install_dir), + call(current_dir)]) + mock_exists.assert_has_calls([call(join(self.desiInstall.install_dir, 'etc', 'fiberassign_compile.sh'))]) + mock_popen.assert_has_calls([call([join(self.desiInstall.install_dir, 'etc', 'fiberassign_compile.sh'), sys.executable], + stderr=-1, stdout=-1, universal_newlines=True)], any_order=True) + mock_popen.reset_mock() + self.desiInstall.options.test = True + self.desiInstall.compile_branch() + self.assertLog(-1, 'Test Mode. Skipping compile script.') + mock_popen.reset_mock() + self.desiInstall.options.test = False + mock_proc = mock_popen() + mock_proc.returncode = 1 + mock_proc.communicate.return_value = ('out', 'err') + with self.assertRaises(DesiInstallException) as cm: + self.desiInstall.compile_branch() + message = "Error compiling code: err" + self.assertLog(-1, message) + self.assertEqual(str(cm.exception), message) + def test_verify_bootstrap(self): """Test proper installation of the desiInstall executable. """
desiInstall of specex/main and fiberassign/main, which need compilation too desiInstall supports "in-place" installations of python repos that adds `$PRODUCT_DIR/py` to `$PYTHONPATH` and `$PRODUCT_DIR/bin` to `$PATH` so that any changes to the repo are automatically available without having to do a separate installation step. Good. specex and fiberassign, however, are hybrid repos that have python code with compiled extensions. An in-place install is handy when making changes to any of the python code, but if any of the C++ code changes it still has to be compiled using: ``` python setup.py build_ext --inplace ``` desiInstall doesn't know this, and this pattern doesn't fit any of the build types listed at https://desiutil.readthedocs.io/en/latest/desiInstall.html#determine-build-type . What's the best way to get desiInstall to know that it needs to run this extra step for these two repos? A somewhat hacky solution that may not require changing desiInstall is to leverage its special case of looking for an `etc/{productname}_data.sh` script and executing that, e.g. as used by desimodel to get the data from svn. specex and fiberassign could add their own `etc/*_data.sh` scripts to run `python setup.py build_ext --inplace`, but that is somewhat cryptically using a data-download hook for other purposes. It might be better to define another hook similar to `etc/*_data.sh`, and if desiInstall detects that it will run it for in-place branch installations, but not for regular installations. That requires an update to both desiInstall and the specex+fiberassign repos, but it might be more obvious and maintainable in the future. For context, both specex and fiberassign used to have a Makefile that desiInstall knew to run, but both have migrated to a python-first approach with compiled extensions without a Makefile. Current master (now main) installations have bootstrapped the `python setup.py build_ext --inplace` upon first installation, after which the desitest nightly update cronjob re-runs that every night after `git pull`. The point of this ticket is so that the end-user doesn't have to remember to do special steps whenever they make a fresh main installation. @weaverba137 thoughts?
0.0
4f910f407c4b7fa9636aa64fc65acd72c49a3cf7
[ "py/desiutil/test/test_install.py::TestInstall::test_compile_branch" ]
[ "py/desiutil/test/test_install.py::TestInstall::test_anaconda_version", "py/desiutil/test/test_install.py::TestInstall::test_build_type", "py/desiutil/test/test_install.py::TestInstall::test_cleanup", "py/desiutil/test/test_install.py::TestInstall::test_default_nersc_dir", "py/desiutil/test/test_install.py::TestInstall::test_dependencies", "py/desiutil/test/test_install.py::TestInstall::test_get_extra", "py/desiutil/test/test_install.py::TestInstall::test_get_product_version", "py/desiutil/test/test_install.py::TestInstall::test_identify_branch", "py/desiutil/test/test_install.py::TestInstall::test_install", "py/desiutil/test/test_install.py::TestInstall::test_install_module", "py/desiutil/test/test_install.py::TestInstall::test_module_dependencies", "py/desiutil/test/test_install.py::TestInstall::test_nersc_module_dir", "py/desiutil/test/test_install.py::TestInstall::test_permissions", "py/desiutil/test/test_install.py::TestInstall::test_prepare_environment", "py/desiutil/test/test_install.py::TestInstall::test_sanity_check", "py/desiutil/test/test_install.py::TestInstall::test_set_install_dir", "py/desiutil/test/test_install.py::TestInstall::test_unlock_permissions", "py/desiutil/test/test_install.py::TestInstall::test_verify_bootstrap", "py/desiutil/test/test_install.py::test_suite" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false }
2022-08-18 00:08:44+00:00
bsd-3-clause
1,888
destag__at-date-17
diff --git a/atdate/api.py b/atdate/api.py index b42b2ac..7f1af8e 100644 --- a/atdate/api.py +++ b/atdate/api.py @@ -15,7 +15,9 @@ class AtDateParser: tree = self.parser.parse(string_to_parse.lower()) new_tree = transformer.transform(tree) - next_time_run = new_tree if isinstance(new_tree, datetime) else new_tree.children[-1] + next_time_run = new_tree + while not isinstance(next_time_run, datetime): + next_time_run = next_time_run.children[-1] if next_time_run < transformer.now: raise ValueError @@ -65,7 +67,7 @@ class AtDateTransformer(Transformer): self.datetime_params['second'] = 0 return datetime(**self.datetime_params) - def _hr24clock_hour_minute(self, matches): + def _iso_time(self, matches): hour = int(matches[0]) minute = int(matches[1]) next_day = self._check_if_next_day(hour, minute) @@ -152,6 +154,13 @@ class AtDateTransformer(Transformer): self.datetime_params['year'] = year return datetime(**self.datetime_params) + def _iso_date(self, matches): + year, month, day = map(int, matches) + self.datetime_params['day'] = day + self.datetime_params['month'] = month + self.datetime_params['year'] = year + return datetime(**self.datetime_params) + def _next(self, matches): inc_period = matches[0] if matches[0].endswith('s') else matches[0] + 's' dt = datetime(**self.datetime_params) diff --git a/atdate/atdate_format.py b/atdate/atdate_format.py index 42e910b..f163137 100644 --- a/atdate/atdate_format.py +++ b/atdate/atdate_format.py @@ -3,25 +3,30 @@ format_string = r''' | time date | time increment | time date increment + | date time + | isodate "t" isotime | date | date increment | nowspec | nowspec increment | increment -time: HR24CLOCK_HR_MIN -> _hr24clock_hr_min - | HR24CLOCK_HOUR ":" MINUTE -> _hr24clock_hour_minute - | WALLCLOCK_HR_MIN AM_PM -> _wallclock_hr_min_am_pm - | WALLCLOCK_HOUR ":" MINUTE AM_PM -> _wallclock_hour_minute_am_pm - | "noon" -> _noon - | "midnight" -> _midnight -date: MONTH_NAME DAY_NUMBER -> _month_name_day_number - | MONTH_NUMBER "/" DAY_NUMBER -> _month_number_day_number - | MONTH_NUMBER "/" DAY_NUMBER "/" YEAR_NUMBER -> _month_number_day_number_year_number - | DAY_NUMBER "." MONTH_NUMBER -> _day_number_month_number - | DAY_NUMBER "." MONTH_NUMBER "." YEAR_NUMBER -> _day_number_month_number_year_number -increment: "next" INC_PERIOD -> _next - | "+" INT INC_PERIOD -> _inc_number -nowspec: "now" -> _now +time: HR24CLOCK_HR_MIN -> _hr24clock_hr_min + | WALLCLOCK_HR_MIN AM_PM -> _wallclock_hr_min_am_pm + | WALLCLOCK_HOUR ":" MINUTE AM_PM -> _wallclock_hour_minute_am_pm + | "noon" -> _noon + | "midnight" -> _midnight + | isotime +date: MONTH_NAME DAY_NUMBER -> _month_name_day_number + | MONTH_NUMBER "/" DAY_NUMBER -> _month_number_day_number + | MONTH_NUMBER "/" DAY_NUMBER "/" YEAR_NUMBER -> _month_number_day_number_year_number + | DAY_NUMBER "." MONTH_NUMBER -> _day_number_month_number + | DAY_NUMBER "." MONTH_NUMBER "." YEAR_NUMBER -> _day_number_month_number_year_number + | isodate +isodate: YEAR_NUMBER "-" MONTH_NUMBER "-" DAY_NUMBER -> _iso_date +isotime: HR24CLOCK_HOUR ":" MINUTE -> _iso_time +increment: "next" INC_PERIOD -> _next + | "+" INT INC_PERIOD -> _inc_number +nowspec: "now" -> _now INC_PERIOD: "minutes" | "minute" | "hours" | "hour" | "days" | "day" diff --git a/docs/README.md b/docs/README.md index b33fdbd..ab82ea5 100644 --- a/docs/README.md +++ b/docs/README.md @@ -98,15 +98,18 @@ tokens|example [time] [increment]|17:32 next day [time] [date] [increment]|17:32 11/22/2033 next day [date]|11/22/2033 +[date] [time]|11/22/2033 17:32 [date] [increment]|11/22/2033 next month [now]|now [now] [increment]|now next day [increment]|next month +[isodatetime]|2033-11-22T17:32 [time]: #time [date]: #date [increment]: #increment [now]: #now +[isodatetime]: #isodatetime ### At date tokens @@ -135,6 +138,7 @@ format|example \[1-12\] / \[1-31\] / \[0-9999\]|10/27/2006 \[1-12\] . \[1-31\]|10.27 \[1-12\] . \[1-31\] . \[0-9999\]|10.27.2006 +\[0-9999\] - \[1-12\] - \[1-31\]|2006-10-27 #### increment @@ -145,6 +149,14 @@ format|example next \[[period](#period)\]|next month \+ \[0-9999\] \[[period](#period)\]|\+ 12 minutes +#### isodatetime + +Format for ISO 8601 date time. + +format|example +---|--- +\[0-9999\] - \[1-12\] - \[1-31\] T \[0-23\] : \[0-59\]|2033-11-22T17:32 + #### now Format for this token is literally `now`.
destag/at-date
3957d0b750ef1205adb0ba2fc3dccf34c3f0ce62
diff --git a/test/test_atdate.py b/test/test_atdate.py index fdbf0ce..8c23f7c 100644 --- a/test/test_atdate.py +++ b/test/test_atdate.py @@ -220,3 +220,31 @@ def test_plus_one_day_without_now(): test_string = '+1days' result = atdate.parse(test_string) assert result == datetime(2000, 7, 3, 3, 4, 5, 0) + + +@freeze_time('2000-07-02 03:04:05') +def test_isodate(): + test_string = '2011-09-22' + result = atdate.parse(test_string) + assert result == datetime(2011, 9, 22, 3, 4, 5, 0) + + +@freeze_time('2000-07-02 03:04:05') +def test_time_date(): + test_string = "12:24 01.02.2011" + result = atdate.parse(test_string) + assert result == datetime(2011, 2, 1, 12, 24, 0, 0) + + +@freeze_time('2000-07-02 03:04:05') +def test_isodatetime(): + test_string = '2011-09-22T11:44' + result = atdate.parse(test_string) + assert result == datetime(2011, 9, 22, 11, 44, 0, 0) + + +@freeze_time('2000-07-02 03:04:05') +def test_isodatetime_without_t(): + test_string = '2011-09-22 11:44' + result = atdate.parse(test_string) + assert result == datetime(2011, 9, 22, 11, 44, 0, 0)
ISO 8601 compatibility I think that it would be nice to support dates and times in ISO 8601 format.
0.0
3957d0b750ef1205adb0ba2fc3dccf34c3f0ce62
[ "test/test_atdate.py::test_isodate", "test/test_atdate.py::test_isodatetime_without_t", "test/test_atdate.py::test_isodatetime" ]
[ "test/test_atdate.py::test_at_midnight_month_change", "test/test_atdate.py::test_day_number_month_number_year_number", "test/test_atdate.py::test_at_now_next_week", "test/test_atdate.py::test_at_now_next_day", "test/test_atdate.py::test_at_midnight", "test/test_atdate.py::test_at_now_next_minutes", "test/test_atdate.py::test_at_noon_after_noon", "test/test_atdate.py::test_at_now_next_minute_change_minute", "test/test_atdate.py::test_next_month_without_now", "test/test_atdate.py::test_month_number_day_number", "test/test_atdate.py::test_at_now_next_minute_change_day", "test/test_atdate.py::test_wallclock_hour_minute_am_pm", "test/test_atdate.py::test_at_now_next_year", "test/test_atdate.py::test_at_now_next_hour", "test/test_atdate.py::test_at_noon_before_noon", "test/test_atdate.py::test_at_now_next_month", "test/test_atdate.py::test_hr24clock_hr_min", "test/test_atdate.py::test_at_date_has_atdateparser_attribute", "test/test_atdate.py::test_day_number_month_number", "test/test_atdate.py::test_month_name_day_number", "test/test_atdate.py::test_wallclock_hr_min_am_pm", "test/test_atdate.py::test_at_now_next_minute_change_hour", "test/test_atdate.py::test_plus_one_day_without_now", "test/test_atdate.py::test_at_noon_month_change", "test/test_atdate.py::test_at_noon_year_change", "test/test_atdate.py::test_parse_return_datetime_object", "test/test_atdate.py::test_at_now", "test/test_atdate.py::test_inc_period", "test/test_atdate.py::test_hr24clock_hour_minute", "test/test_atdate.py::test_month_number_day_number_year_number", "test/test_atdate.py::test_at_date_has_parse_attribute", "test/test_atdate.py::test_time_date", "test/test_atdate.py::test_at_midnight_year_change" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-10-17 19:42:01+00:00
mit
1,889
dev-cafe__parselglossy-52
diff --git a/parselglossy/documentation.py b/parselglossy/documentation.py index f101cb7..0b8ed79 100644 --- a/parselglossy/documentation.py +++ b/parselglossy/documentation.py @@ -51,14 +51,19 @@ def documentation_generator( """ comment = ( + ".. raw:: html\n\n" + " <style> .red {color:#aa0060; font-weight:bold; font-size:18px} </style>\n\n" # noqa: E501 + ".. role:: red\n\n" ".. This documentation was autogenerated using parselglossy." " Editing by hand is not recommended.\n" ) header_fmt = ( "{comment:s}\n{markup:s}\n{header:s}\n{markup:s}\n\n" - "Keywords without a default value are **required**.\n" - "Sections where all keywords have a default value can be omitted.\n" + "- Keywords without a default value are **required**.\n" + "- Default values are either explicit or computed from the value of other keywords in the input.\n" # noqa: E501 + "- Sections where all keywords have a default value can be omitted.\n" + "- Predicates, if present, are the functions run to validate user input.\n" ) docs = rec_documentation_generator(template=template) @@ -78,14 +83,26 @@ def document_keyword(keyword: JSONDict) -> str: **Type** ``{2:s}`` """ - doc = kw_fmt.format(keyword["name"], keyword["docstring"], keyword["type"]) + doc = kw_fmt.format( + keyword["name"], keyword["docstring"].replace("\n", " "), keyword["type"] + ) if "default" in keyword.keys(): doc += """ - **Default** {}""".format( + **Default** ``{}`` +""".format( keyword["default"] ) + if "predicates" in keyword.keys(): + preds = "\n ".join(("- ``{}``".format(x) for x in keyword["predicates"])) + doc += """ + **Predicates** + {} +""".format( + preds + ) + return doc @@ -106,20 +123,20 @@ def rec_documentation_generator(template, *, level: int = 0) -> str: keywords = template["keywords"] if "keywords" in template.keys() else [] if keywords: - doc = "\n**Keywords**" + docs.append(indent("\n:red:`Keywords`", level)) + for k in keywords: - doc += document_keyword(k) + doc = document_keyword(k) docs.extend(indent(doc, level)) sections = template["sections"] if "sections" in template.keys() else [] if sections: - doc = "\n" if level == 0 else "\n\n" - doc += "**Sections**" + docs.append(indent("\n:red:`Sections`", level)) fmt = r""" :{0:s}: {1:s} """ for s in sections: - doc += fmt.format(s["name"], s["docstring"]) + doc = fmt.format(s["name"], s["docstring"].replace("\n", " ")) doc += rec_documentation_generator(s, level=level + 1) docs.extend(indent(doc, level))
dev-cafe/parselglossy
b28084a6ca692dd1cecc2e07a229f20d1630e162
diff --git a/tests/api/docs_template.yml b/tests/api/docs_template.yml index 9966f26..2425855 100644 --- a/tests/api/docs_template.yml +++ b/tests/api/docs_template.yml @@ -1,20 +1,60 @@ keywords: -- docstring: Title of the calculation. +- docstring: | + Title of the calculation. I had to write an extremely long documentation + string for this one, as it is extremely important to let you know that this + keyword will define the title of the calculation and, not having a default, + you will be required to set it! name: title type: str +- docstring: Some integer + name: an_integer + type: int + default: 15 +- docstring: A list of floats + name: float_list + type: List[float] + default: [1.0, 2.0, 3.0] + predicates: + - "len(value) < 10" + - "max(value) < user['foo']['fooffa]['another_float']" sections: - docstring: brilliant + name: foo keywords: - default: Wham! Bang! Pow! Let's Rock Out! docstring: Title of the calculation. name: tragic type: str - name: foo + - name: a_float + type: float + docstring: A floating point number + predicates: + - "value < 35.0" + - "value in user['float_list']" sections: - docstring: A ba-bar section + name: Bar keywords: - default: Bobson Dugnutt docstring: Title of the calculation. name: amazing type: str - name: Bar + - name: coolio + type: bool + docstring: A cool bool + default: True +- docstring: | + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec luctus elit + ut posuere dictum. Proin ipsum libero, maximus vitae placerat a, bibendum + viverra ante. + name: fooffa + keywords: + - name: dwigt + docstring: An unusual name + type: str + predicates: + - "len(value) < 80" + - name: another_float + type: float + docstring: Another floating point number + default: "user['foo']['a_float'] * 2" diff --git a/tests/cli/docs_template.yml b/tests/cli/docs_template.yml index 9966f26..2425855 100644 --- a/tests/cli/docs_template.yml +++ b/tests/cli/docs_template.yml @@ -1,20 +1,60 @@ keywords: -- docstring: Title of the calculation. +- docstring: | + Title of the calculation. I had to write an extremely long documentation + string for this one, as it is extremely important to let you know that this + keyword will define the title of the calculation and, not having a default, + you will be required to set it! name: title type: str +- docstring: Some integer + name: an_integer + type: int + default: 15 +- docstring: A list of floats + name: float_list + type: List[float] + default: [1.0, 2.0, 3.0] + predicates: + - "len(value) < 10" + - "max(value) < user['foo']['fooffa]['another_float']" sections: - docstring: brilliant + name: foo keywords: - default: Wham! Bang! Pow! Let's Rock Out! docstring: Title of the calculation. name: tragic type: str - name: foo + - name: a_float + type: float + docstring: A floating point number + predicates: + - "value < 35.0" + - "value in user['float_list']" sections: - docstring: A ba-bar section + name: Bar keywords: - default: Bobson Dugnutt docstring: Title of the calculation. name: amazing type: str - name: Bar + - name: coolio + type: bool + docstring: A cool bool + default: True +- docstring: | + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec luctus elit + ut posuere dictum. Proin ipsum libero, maximus vitae placerat a, bibendum + viverra ante. + name: fooffa + keywords: + - name: dwigt + docstring: An unusual name + type: str + predicates: + - "len(value) < 80" + - name: another_float + type: float + docstring: Another floating point number + default: "user['foo']['a_float'] * 2" diff --git a/tests/ref/dwigt.rst b/tests/ref/dwigt.rst index 6d92abd..86670c0 100644 --- a/tests/ref/dwigt.rst +++ b/tests/ref/dwigt.rst @@ -1,33 +1,88 @@ +.. raw:: html + + <style> .red {color:#aa0060; font-weight:bold; font-size:18px} </style> + +.. role:: red + .. This documentation was autogenerated using parselglossy. Editing by hand is not recommended. ========================================== Dwigt Rortugal's guide to input parameters ========================================== -Keywords without a default value are **required**. -Sections where all keywords have a default value can be omitted. +- Keywords without a default value are **required**. +- Default values are either explicit or computed from the value of other keywords in the input. +- Sections where all keywords have a default value can be omitted. +- Predicates, if present, are the functions run to validate user input. -**Keywords** - :title: Title of the calculation. +:red:`Keywords` + :title: Title of the calculation. I had to write an extremely long documentation string for this one, as it is extremely important to let you know that this keyword will define the title of the calculation and, not having a default, you will be required to set it! **Type** ``str`` -**Sections** + :an_integer: Some integer + + **Type** ``int`` + + **Default** ``15`` + + :float_list: A list of floats + + **Type** ``List[float]`` + + **Default** ``[1.0, 2.0, 3.0]`` + + **Predicates** + - ``len(value) < 10`` + - ``max(value) < user['foo']['fooffa]['another_float']`` + +:red:`Sections` :foo: brilliant - **Keywords** + :red:`Keywords` :tragic: Title of the calculation. **Type** ``str`` - **Default** Wham! Bang! Pow! Let's Rock Out! + **Default** ``Wham! Bang! Pow! Let's Rock Out!`` + + :a_float: A floating point number + + **Type** ``float`` - **Sections** + **Predicates** + - ``value < 35.0`` + - ``value in user['float_list']`` + + :red:`Sections` :Bar: A ba-bar section - **Keywords** + :red:`Keywords` :amazing: Title of the calculation. **Type** ``str`` - **Default** Bobson Dugnutt \ No newline at end of file + **Default** ``Bobson Dugnutt`` + + :coolio: A cool bool + + **Type** ``bool`` + + **Default** ``True`` + + :fooffa: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec luctus elit ut posuere dictum. Proin ipsum libero, maximus vitae placerat a, bibendum viverra ante. + + :red:`Keywords` + :dwigt: An unusual name + + **Type** ``str`` + + **Predicates** + - ``len(value) < 80`` + + :another_float: Another floating point number + + **Type** ``float`` + + **Default** ``user['foo']['a_float'] * 2`` + \ No newline at end of file diff --git a/tests/ref/input.rst b/tests/ref/input.rst index 6217605..a5f9cea 100644 --- a/tests/ref/input.rst +++ b/tests/ref/input.rst @@ -1,33 +1,88 @@ +.. raw:: html + + <style> .red {color:#aa0060; font-weight:bold; font-size:18px} </style> + +.. role:: red + .. This documentation was autogenerated using parselglossy. Editing by hand is not recommended. ================ Input parameters ================ -Keywords without a default value are **required**. -Sections where all keywords have a default value can be omitted. +- Keywords without a default value are **required**. +- Default values are either explicit or computed from the value of other keywords in the input. +- Sections where all keywords have a default value can be omitted. +- Predicates, if present, are the functions run to validate user input. -**Keywords** - :title: Title of the calculation. +:red:`Keywords` + :title: Title of the calculation. I had to write an extremely long documentation string for this one, as it is extremely important to let you know that this keyword will define the title of the calculation and, not having a default, you will be required to set it! **Type** ``str`` -**Sections** + :an_integer: Some integer + + **Type** ``int`` + + **Default** ``15`` + + :float_list: A list of floats + + **Type** ``List[float]`` + + **Default** ``[1.0, 2.0, 3.0]`` + + **Predicates** + - ``len(value) < 10`` + - ``max(value) < user['foo']['fooffa]['another_float']`` + +:red:`Sections` :foo: brilliant - **Keywords** + :red:`Keywords` :tragic: Title of the calculation. **Type** ``str`` - **Default** Wham! Bang! Pow! Let's Rock Out! + **Default** ``Wham! Bang! Pow! Let's Rock Out!`` + + :a_float: A floating point number + + **Type** ``float`` - **Sections** + **Predicates** + - ``value < 35.0`` + - ``value in user['float_list']`` + + :red:`Sections` :Bar: A ba-bar section - **Keywords** + :red:`Keywords` :amazing: Title of the calculation. **Type** ``str`` - **Default** Bobson Dugnutt \ No newline at end of file + **Default** ``Bobson Dugnutt`` + + :coolio: A cool bool + + **Type** ``bool`` + + **Default** ``True`` + + :fooffa: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec luctus elit ut posuere dictum. Proin ipsum libero, maximus vitae placerat a, bibendum viverra ante. + + :red:`Keywords` + :dwigt: An unusual name + + **Type** ``str`` + + **Predicates** + - ``len(value) < 80`` + + :another_float: Another floating point number + + **Type** ``float`` + + **Default** ``user['foo']['a_float'] * 2`` + \ No newline at end of file diff --git a/tests/ref/simple.rst b/tests/ref/simple.rst new file mode 100644 index 0000000..fab7a8c --- /dev/null +++ b/tests/ref/simple.rst @@ -0,0 +1,42 @@ +.. raw:: html + + <style> .red {color:#aa0060; font-weight:bold; font-size:18px} </style> + +.. role:: red + +.. This documentation was autogenerated using parselglossy. Editing by hand is not recommended. + +================ +Input parameters +================ + +- Keywords without a default value are **required**. +- Default values are either explicit or computed from the value of other keywords in the input. +- Sections where all keywords have a default value can be omitted. +- Predicates, if present, are the functions run to validate user input. + +:red:`Keywords` + :title: Title of the calculation. + + **Type** ``str`` + +:red:`Sections` + :foo: brilliant + + :red:`Keywords` + :tragic: Title of the calculation. + + **Type** ``str`` + + **Default** ``Wham! Bang! Pow! Let's Rock Out!`` + + :red:`Sections` + :Bar: A ba-bar section + + :red:`Keywords` + :amazing: Title of the calculation. + + **Type** ``str`` + + **Default** ``Bobson Dugnutt`` + \ No newline at end of file diff --git a/tests/test_documentation.py b/tests/test_documentation.py index f8d3aca..fcbb12e 100644 --- a/tests/test_documentation.py +++ b/tests/test_documentation.py @@ -71,7 +71,7 @@ def template(): def test_documentation(template): - doc_ref = Path(__file__).parent / Path("ref/input.rst") + doc_ref = Path(__file__).parent / Path("ref/simple.rst") with doc_ref.open("r") as ref: stuff = ref.read().rstrip("\n")
Repeated keywords in the autogenerated documentation * parselglossy version: b28084a * Python version: 3.7.0 * Operating System: Ubuntu-18.10 ### What I Did The following `template.yml` ``` keywords: - name: foo type: int docstring: foo - name: bar type: int docstring: bar - name: baz type: int docstring: baz ``` is documented using the CLI command `parselglossy doc template.yml` to give: ``` **Keywords** :foo: foo **Type** ``int`` **Keywords** :foo: foo **Type** ``int`` :bar: bar **Type** ``int`` **Keywords** :foo: foo **Type** ``int`` :bar: bar **Type** ``int`` :baz: baz **Type** ``int`` ```
0.0
b28084a6ca692dd1cecc2e07a229f20d1630e162
[ "tests/test_documentation.py::test_documentation" ]
[]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2019-03-27 16:50:22+00:00
mit
1,890
developmentseed__cogeo-mosaic-228
diff --git a/CHANGES.md b/CHANGES.md index 12763d0..1ec014f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,6 @@ +## 7.1.0 + +* Automatically remove/add `asset_prefix` in Mosaic Backends ## 7.0.1 (2023-10-17) diff --git a/cogeo_mosaic/backends/base.py b/cogeo_mosaic/backends/base.py index 4fe4f64..7cb8a91 100644 --- a/cogeo_mosaic/backends/base.py +++ b/cogeo_mosaic/backends/base.py @@ -236,13 +236,17 @@ class BaseBackend(BaseReader): def get_assets(self, x: int, y: int, z: int) -> List[str]: """Find assets.""" quadkeys = self.find_quadkeys(Tile(x=x, y=y, z=z), self.quadkey_zoom) - return list( + assets = list( dict.fromkeys( itertools.chain.from_iterable( [self.mosaic_def.tiles.get(qk, []) for qk in quadkeys] ) ) ) + if self.mosaic_def.asset_prefix: + assets = [self.mosaic_def.asset_prefix + asset for asset in assets] + + return assets def find_quadkeys(self, tile: Tile, quadkey_zoom: int) -> List[str]: """ diff --git a/cogeo_mosaic/backends/dynamodb.py b/cogeo_mosaic/backends/dynamodb.py index 5a1e5f8..8c14e6a 100644 --- a/cogeo_mosaic/backends/dynamodb.py +++ b/cogeo_mosaic/backends/dynamodb.py @@ -222,13 +222,17 @@ class DynamoDBBackend(BaseBackend): def get_assets(self, x: int, y: int, z: int) -> List[str]: """Find assets.""" quadkeys = self.find_quadkeys(Tile(x=x, y=y, z=z), self.quadkey_zoom) - return list( + assets = list( dict.fromkeys( itertools.chain.from_iterable( [self._fetch_dynamodb(qk).get("assets", []) for qk in quadkeys] ) ) ) + if self.mosaic_def.asset_prefix: + assets = [self.mosaic_def.asset_prefix + asset for asset in assets] + + return assets @property def _quadkeys(self) -> List[str]: diff --git a/cogeo_mosaic/backends/sqlite.py b/cogeo_mosaic/backends/sqlite.py index d4ae7d7..d336c9e 100644 --- a/cogeo_mosaic/backends/sqlite.py +++ b/cogeo_mosaic/backends/sqlite.py @@ -316,11 +316,15 @@ class SQLiteBackend(BaseBackend): """Find assets.""" mercator_tile = morecantile.Tile(x=x, y=y, z=z) quadkeys = self.find_quadkeys(mercator_tile, self.quadkey_zoom) - return list( + assets = list( dict.fromkeys( itertools.chain.from_iterable([self._fetch(qk) for qk in quadkeys]) ) ) + if self.mosaic_def.asset_prefix: + assets = [self.mosaic_def.asset_prefix + asset for asset in assets] + + return assets @property def _quadkeys(self) -> List[str]: diff --git a/cogeo_mosaic/mosaic.py b/cogeo_mosaic/mosaic.py index 21d0dbc..4ba709c 100644 --- a/cogeo_mosaic/mosaic.py +++ b/cogeo_mosaic/mosaic.py @@ -1,6 +1,7 @@ """cogeo_mosaic.mosaic MosaicJSON models and helper functions.""" import os +import re import sys import warnings from contextlib import ExitStack @@ -230,9 +231,16 @@ class MosaicJSON(BaseModel, validate_assignment=True): ) if dataset: - mosaic_definition["tiles"][quadkey] = [ - accessor(f) for f in dataset - ] + assets = [accessor(f) for f in dataset] + if asset_prefix: + assets = [ + re.sub(rf"^{asset_prefix}", "", asset) + if asset.startswith(asset_prefix) + else asset + for asset in assets + ] + + mosaic_definition["tiles"][quadkey] = assets return cls(**mosaic_definition)
developmentseed/cogeo-mosaic
2e12ff197f3c64bd3ba36c99ce2f27597342881a
diff --git a/tests/test_backends.py b/tests/test_backends.py index c2e7d57..852157e 100644 --- a/tests/test_backends.py +++ b/tests/test_backends.py @@ -1217,3 +1217,15 @@ def test_point_crs_coordinates(): assert ptsR[0][0] == pts[0][0] assert ptsR[0][1].crs == "epsg:3857" assert ptsR[0][1].coordinates == (-8200051.8694, 5782905.49327) + + +def test_InMemoryReader_asset_prefix(): + """Test MemoryBackend.""" + assets = [asset1, asset2] + prefix = os.path.join(os.path.dirname(__file__), "fixtures") + mosaicdef = MosaicJSON.from_urls(assets, quiet=False, asset_prefix=prefix) + + assert mosaicdef.tiles["0302310"] == ["/cog1.tif", "/cog2.tif"] + with MemoryBackend(mosaic_def=mosaicdef) as mosaic: + assets = mosaic.assets_for_tile(150, 182, 9) + assert assets[0].startswith(prefix) diff --git a/tests/test_create.py b/tests/test_create.py index 6998267..4fb30e5 100644 --- a/tests/test_create.py +++ b/tests/test_create.py @@ -127,7 +127,7 @@ def test_mosaic_create_additional_metadata(): quiet=True, tilematrixset=tms_3857, asset_type="COG", - asset_prefix="s3://my-bucket/", + asset_prefix=basepath, data_type="uint16", layers={ "true-color": { @@ -137,6 +137,7 @@ def test_mosaic_create_additional_metadata(): }, ) assert mosaic.asset_type == "COG" - assert mosaic.asset_prefix == "s3://my-bucket/" + assert mosaic.asset_prefix == basepath assert mosaic.data_type == "uint16" assert mosaic.layers["true-color"] + assert mosaic.tiles["0302301"] == ["/cog1.tif", "/cog2.tif"]
add`asset_prefix` to assets ### Discussed in https://github.com/developmentseed/cogeo-mosaic/discussions/226 <div type='discussions-op-text'> <sup>Originally posted by **scottyhq** December 6, 2023</sup> I tired rendering the 0.0.3 example which uses public data: https://titiler.xyz/mosaicjson/map?url=https://raw.githubusercontent.com/developmentseed/mosaicjson-spec/main/0.0.3/example/dg_post_idai.json But get a lot of 500 errors, I also tried modifying the docs example to just use `"asset_prefix":"s3://noaa-eri-pds/2020_Nashville_Tornado/20200307a_RGB/"`: https://titiler.xyz/mosaicjson/map?url=https://gist.githubusercontent.com/scottyhq/4c288a2dbf7b97ef7833c5e0ee19d6d6/raw/636083cf7117a96e38d271eeef932a3ee507d7d1/NOAA_Nashville_Tornado_v3.json So I suspect titiler by default doesn't have logic to pick up the `asset_prefix` </div>
0.0
2e12ff197f3c64bd3ba36c99ce2f27597342881a
[ "tests/test_backends.py::test_InMemoryReader_asset_prefix", "tests/test_create.py::test_mosaic_create_additional_metadata" ]
[ "tests/test_backends.py::test_file_backend", "tests/test_backends.py::test_http_backend", "tests/test_backends.py::test_s3_backend", "tests/test_backends.py::test_gs_backend", "tests/test_backends.py::test_dynamoDB_backend", "tests/test_backends.py::test_stac_backend", "tests/test_backends.py::test_stac_search", "tests/test_backends.py::test_stac_accessor", "tests/test_backends.py::test_mosaic_crud_error[file:///path/to/mosaic.json]", "tests/test_backends.py::test_mosaic_crud_error[https://developmentseed.org/cogeo-mosaic/amosaic.json.gz]", "tests/test_backends.py::test_InMemoryReader", "tests/test_backends.py::test_sqlite_backend", "tests/test_backends.py::test_tms_and_coordinates", "tests/test_backends.py::test_point_crs_coordinates", "tests/test_create.py::test_mosaic_create", "tests/test_create.py::test_mosaic_create_tms" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-12-06 19:13:07+00:00
mit
1,891
devopshq__artifactory-439
diff --git a/artifactory.py b/artifactory.py index 4325018..69bc540 100755 --- a/artifactory.py +++ b/artifactory.py @@ -410,13 +410,13 @@ def quote_url(url): parsed_url = urllib3.util.parse_url(url) if parsed_url.port: quoted_path = requests.utils.quote( - url.rpartition(f"{parsed_url.host}:{parsed_url.port}")[2] + url.partition(f"{parsed_url.host}:{parsed_url.port}")[2] ) quoted_url = ( f"{parsed_url.scheme}://{parsed_url.host}:{parsed_url.port}{quoted_path}" ) else: - quoted_path = requests.utils.quote(url.rpartition(parsed_url.host)[2]) + quoted_path = requests.utils.quote(url.partition(parsed_url.host)[2]) quoted_url = f"{parsed_url.scheme}://{parsed_url.host}{quoted_path}" return quoted_url
devopshq/artifactory
2e9274273aefba744accb3d5a012c4dbdb111b49
diff --git a/tests/unit/test_artifactory_path.py b/tests/unit/test_artifactory_path.py index f2f57d9..16e528d 100644 --- a/tests/unit/test_artifactory_path.py +++ b/tests/unit/test_artifactory_path.py @@ -100,6 +100,10 @@ class ArtifactoryFlavorTest(unittest.TestCase): check( "https://example.com/artifactory/foo", "https://example.com/artifactory/foo" ) + check( + "https://example.com/artifactory/foo/example.com/bar", + "https://example.com/artifactory/foo/example.com/bar" + ) check( "https://example.com/artifactory/foo/#1", "https://example.com/artifactory/foo/%231",
path.stat() doesn't handle ArtifactoryPath() properly Hi, Here is my environment: ```` python 3.8.4 dohq-artifactory 0.8.4 ```` I want to get the stats of 2 files. I have a piece of code looking like this: ````python from artifactory import ArtifactoryPath path1 = ArtifactoryPath( "https://artifactory.domain.com/artifactory/repo-docker-local/rdl/rd-image/0.2.0/manifest.json", apikey=token ) path2 = ArtifactoryPath( "https://artifactory.domain.com/artifactory/repo-docker-local/rdl/artifactory.domain.com/repo-docker/rd/rd-image/0.2.0/manifest.json", apikey=token ) # Get FileStat stat1 = path1.stat() # works print(stat1) stat2 = path2.stat() # error print(stat2) ```` As you can see the path in `path2` is containing 2 times the artifactory host `artifactory.domain.com`. In the error message below I can see it tries to fetch the file but only using half the real path: it crops everything before the second `artifactory.domain.com`. ````bash $ python tests.py --token=**** ArtifactoryFileStat(ctime='[...]', mtime='[...]', created_by='[...]', modified_by='[...]') # print(stat1), shorted for libility Traceback (most recent call last): File "[...]/.env/lib/python3.8/site-packages/dohq_artifactory/exception.py", line 20, in raise_for_status response.raise_for_status() File "[...]/.env/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://artifactory.domain.com/repo-docker/rd/rd-image/0.2.0/manifest.json The above exception was the direct cause of the following exception: Traceback (most recent call last): File "tests.py", line 35, in <module> stats2 = path2.stat() File "[...]/.env/lib/python3.8/site-packages/artifactory.py", line 1610, in stat return self._accessor.stat(pathobj=pathobj) File "[...]/.env/lib/python3.8/site-packages/artifactory.py", line 878, in stat jsn = self.get_stat_json(pathobj) File "[...]/.env/lib/python3.8/site-packages/artifactory.py", line 869, in get_stat_json raise_for_status(response) File "[...]/.env/lib/python3.8/site-packages/dohq_artifactory/exception.py", line 28, in raise_for_status raise ArtifactoryException(str(exception)) from exception dohq_artifactory.exception.ArtifactoryException: 404 Client Error: Not Found for url: https://artifactory.domain.com/repo-docker/rd/rd-image/0.2.0/manifest.json ```` I cannot change the files names. It is not in my perimeter. To identify where the problem comes from I tried the same thing but using JFrog Web API and it works: ````bash $ curl -u user:passwd https://artifactory.domain.com/artifactory/api/storage/repo-docker-local/rdl/artifactory.domain.com/repo-docker/rdl/rd-image/0.2.0 -v * About to connect() to artifactory.domain.com port <port> (#0) * Trying <ip>... * Connected to artifactory.domain.com (<ip>) port <port> (#0) * [...] > GET /artifactory/api/storage/repo-docker-local/rdl/artifactory.domain.com/repo-docker/rdl/rd-image/0.2.0 HTTP/1.1 > Authorization: Basic xxxx > User-Agent: <user_agent> > Host: artifactory.domain.com > Accept: */* > < HTTP/1.1 200 < Date: Wed, 17 May 2023 11:45:28 GMT < Content-Type: application/vnd.org.jfrog.artifactory.storage.FolderInfo+json < Transfer-Encoding: chunked < Connection: keep-alive < X-JFrog-Version: <jfrog_version> < X-Artifactory-Id: <artifactory_id> < X-Artifactory-Node-Id: <artifactory_node_id> < Cache-Control: no-store < Set-Cookie: <cookie> < { "repo" : "repo-docker-local", "path" : "/rdl/artifactory.domain.com/repo-docker/rdl/rd-image/0.2.0", "created" : "<created>", "createdBy" : "<createdBy>", "lastModified" : "<lastModified>", "modifiedBy" : "<modifiedBy>", "lastUpdated" : "<lastUpdated>", "children" : [{ "uri" : "/manifest.json", "folder" : false, [...] }], "uri" : "https://artifactory.domain.com:<port>/artifactory/api/storage/repo-docker-local/rdl/artifactory.domain.com/repo-docker/rdl/rd-image/0.2.0" } * Connection #0 to host artifactory.domain.com left intact ```` For me the problem is from how the `stat()` method parses an ArtifactoryPath. Do you have any solutions ?
0.0
2e9274273aefba744accb3d5a012c4dbdb111b49
[ "tests/unit/test_artifactory_path.py::ArtifactoryFlavorTest::test_quote_url" ]
[ "tests/unit/test_artifactory_path.py::UtilTest::test_checksum", "tests/unit/test_artifactory_path.py::UtilTest::test_escape_chars", "tests/unit/test_artifactory_path.py::UtilTest::test_matrix_encode", "tests/unit/test_artifactory_path.py::UtilTest::test_properties_encode", "tests/unit/test_artifactory_path.py::UtilTest::test_properties_encode_multi", "tests/unit/test_artifactory_path.py::ArtifactoryFlavorTest::test_parse_parts", "tests/unit/test_artifactory_path.py::ArtifactoryFlavorTest::test_special_characters", "tests/unit/test_artifactory_path.py::ArtifactoryFlavorTest::test_splitroot", "tests/unit/test_artifactory_path.py::ArtifactoryFlavorTest::test_splitroot_custom_drv", "tests/unit/test_artifactory_path.py::ArtifactoryFlavorTest::test_splitroot_custom_root", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_anchor", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_join_endswith_slash", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_join_endswithout_slash", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_join_with_artifactory_folder", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_join_with_multiple_folder_and_artifactory_substr_in_it", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_join_with_repo", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_join_with_repo_folder", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_root", "tests/unit/test_artifactory_path.py::PureArtifactoryPathTest::test_with_suffix", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_get_properties", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_listdir", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_mkdir", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_set_properties", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_set_properties_without_remove", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_stat", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_stat_no_sha256", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_unlink", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_unlink_raises_not_found", "tests/unit/test_artifactory_path.py::ArtifactoryAccessorTest::test_unlink_raises_on_404", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_archive", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_archive_download", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_auth", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_auth_inheritance", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_basic", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_deploy_by_checksum_error", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_deploy_by_checksum_sha1", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_deploy_by_checksum_sha1_or_sha256", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_deploy_by_checksum_sha256", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_deploy_deb", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_deploy_file", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_joinpath_repo", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_path_in_repo", "tests/unit/test_artifactory_path.py::ArtifactoryPathTest::test_repo", "tests/unit/test_artifactory_path.py::ArtifactorySaaSPathTest::test_basic", "tests/unit/test_artifactory_path.py::ArtifactorySaaSPathTest::test_drive", "tests/unit/test_artifactory_path.py::ArtifactorySaaSPathTest::test_path_in_repo", "tests/unit/test_artifactory_path.py::ArtifactorySaaSPathTest::test_repo", "tests/unit/test_artifactory_path.py::TestArtifactoryConfig::test_artifactory_config", "tests/unit/test_artifactory_path.py::TestArtifactoryAql::test_create_aql_text_list", "tests/unit/test_artifactory_path.py::TestArtifactoryAql::test_create_aql_text_list_in_dict", "tests/unit/test_artifactory_path.py::TestArtifactoryAql::test_create_aql_text_simple", "tests/unit/test_artifactory_path.py::TestArtifactoryAql::test_from_aql_file", "tests/unit/test_artifactory_path.py::TestArtifactoryPathGetAll::test_get_groups", "tests/unit/test_artifactory_path.py::TestArtifactoryPathGetAll::test_get_groups_lazy", "tests/unit/test_artifactory_path.py::TestArtifactoryPathGetAll::test_get_projects", "tests/unit/test_artifactory_path.py::TestArtifactoryPathGetAll::test_get_projects_lazy", "tests/unit/test_artifactory_path.py::TestArtifactoryPathGetAll::test_get_users", "tests/unit/test_artifactory_path.py::TestArtifactoryPathGetAll::test_get_users_lazy" ]
{ "failed_lite_validators": [ "has_hyperlinks" ], "has_test_patch": true, "is_lite": false }
2023-12-29 09:24:40+00:00
mit
1,892
devopshq__artifactory-cleanup-100
diff --git a/README.md b/README.md index c0a63ec..ee5afde 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,12 @@ artifactory-cleanup --days-in-future=10 # Not satisfied with built-in rules? Write your own rules in python and connect them! artifactory-cleanup --load-rules=myrule.py docker run -v "$(pwd)":/app devopshq/artifactory-cleanup artifactory-cleanup --load-rules=myrule.py + +# Save the table summary in a file +artifactory-cleanup --output=myfile.txt + +# Save the summary in a Json file +artifactory-cleanup --output=myfile.txt --output-format=json ``` # Rules diff --git a/artifactory_cleanup/cli.py b/artifactory_cleanup/cli.py index 312c999..b168ecf 100644 --- a/artifactory_cleanup/cli.py +++ b/artifactory_cleanup/cli.py @@ -1,3 +1,4 @@ +import json import logging import sys from datetime import timedelta, date @@ -5,6 +6,7 @@ from datetime import timedelta, date import requests from hurry.filesize import size from plumbum import cli +from plumbum.cli.switches import Set from prettytable import PrettyTable from requests.auth import HTTPBasicAuth @@ -62,6 +64,19 @@ class ArtifactoryCleanupCLI(cli.Application): mandatory=False, ) + _output_file = cli.SwitchAttr( + "--output", help="Choose the output file", mandatory=False + ) + + _output_format = cli.SwitchAttr( + "--output-format", + Set("table", "json", case_sensitive=False), + help="Choose the output format", + default="table", + requires=["--output"], + mandatory=False, + ) + @property def VERSION(self): # To prevent circular imports @@ -83,6 +98,36 @@ class ArtifactoryCleanupCLI(cli.Application): print(f"Simulating cleanup actions that will occur on {today}") return today + def _format_table(self, result) -> PrettyTable: + table = PrettyTable() + table.field_names = ["Cleanup Policy", "Files count", "Size"] + table.align["Cleanup Policy"] = "l" + + for policy_result in result["policies"]: + row = [ + policy_result["name"], + policy_result["file_count"], + size(policy_result["size"]), + ] + table.add_row(row) + + table.add_row(["", "", ""]) + table.add_row(["Total size: {}".format(size(result["total_size"])), "", ""]) + return table + + def _print_table(self, result: dict): + print(self._format_table(result)) + + def _create_output_file(self, result, filename, format): + text = None + if format == "table": + text = self._format_table(result).get_string() + else: + text = json.dumps(result) + + with open(filename, "w") as file: + file.write(text) + def main(self): today = self._get_today() if self._load_rules: @@ -112,9 +157,7 @@ class ArtifactoryCleanupCLI(cli.Application): if self._policy: cleanup.only(self._policy) - table = PrettyTable() - table.field_names = ["Cleanup Policy", "Files count", "Size"] - table.align["Cleanup Policy"] = "l" + result = {"policies": [], "total_size": 0} total_size = 0 block_ctx_mgr, test_ctx_mgr = get_context_managers() @@ -124,16 +167,21 @@ class ArtifactoryCleanupCLI(cli.Application): if summary is None: continue total_size += summary.artifacts_size - row = [ - summary.policy_name, - summary.artifacts_removed, - size(summary.artifacts_size), - ] - table.add_row(row) - table.add_row(["", "", ""]) - table.add_row(["Total size: {}".format(size(total_size)), "", ""]) - print(table) + result["policies"].append( + { + "name": summary.policy_name, + "file_count": summary.artifacts_removed, + "size": summary.artifacts_size, + } + ) + + result["total_size"] = total_size + + self._print_table(result) + + if self._output_file: + self._create_output_file(result, self._output_file, self._output_format) if __name__ == "__main__":
devopshq/artifactory-cleanup
c523f319dc7835c5b3bd583f5ba187184df24dbc
diff --git a/tests/data/expected_output.txt b/tests/data/expected_output.txt new file mode 100644 index 0000000..2471489 --- /dev/null +++ b/tests/data/expected_output.txt @@ -0,0 +1,8 @@ ++--------------------------------------------------------+-------------+------+ +| Cleanup Policy | Files count | Size | ++--------------------------------------------------------+-------------+------+ +| Remove all files from repo-name-here older then 7 days | 1 | 528B | +| Use your own rules! | 1 | 528B | +| | | | +| Total size: 1K | | | ++--------------------------------------------------------+-------------+------+ \ No newline at end of file diff --git a/tests/test_cli.py b/tests/test_cli.py index f5c5afe..2869e23 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,6 @@ +import json import pytest +from filecmp import cmp from artifactory_cleanup import ArtifactoryCleanupCLI @@ -69,3 +71,101 @@ def test_destroy(capsys, shared_datadir, requests_mock): last_request.url == "https://repo.example.com/artifactory/repo-name-here/path/to/file/filename1.json" ) + + [email protected]("requests_repo_name_here") +def test_output_table(capsys, shared_datadir, requests_mock): + _, code = ArtifactoryCleanupCLI.run( + [ + "ArtifactoryCleanupCLI", + "--config", + str(shared_datadir / "cleanup.yaml"), + "--load-rules", + str(shared_datadir / "myrule.py"), + ], + exit=False, + ) + stdout, stderr = capsys.readouterr() + print(stdout) + assert code == 0, stdout + assert ( + "| Cleanup Policy | Files count | Size |" + in stdout + ) + + [email protected]("requests_repo_name_here") +def test_output_table(capsys, shared_datadir, requests_mock, tmp_path): + output_file = tmp_path / "output.txt" + _, code = ArtifactoryCleanupCLI.run( + [ + "ArtifactoryCleanupCLI", + "--config", + str(shared_datadir / "cleanup.yaml"), + "--load-rules", + str(shared_datadir / "myrule.py"), + "--output-format", + "table", + "--output", + str(output_file), + ], + exit=False, + ) + stdout, stderr = capsys.readouterr() + print(stdout) + assert code == 0, stdout + assert cmp(output_file, shared_datadir / "expected_output.txt") is True + + [email protected]("requests_repo_name_here") +def test_output_json(capsys, shared_datadir, requests_mock, tmp_path): + output_json = tmp_path / "output.json" + _, code = ArtifactoryCleanupCLI.run( + [ + "ArtifactoryCleanupCLI", + "--config", + str(shared_datadir / "cleanup.yaml"), + "--load-rules", + str(shared_datadir / "myrule.py"), + "--output-format", + "json", + "--output", + str(output_json), + ], + exit=False, + ) + stdout, stderr = capsys.readouterr() + assert code == 0, stdout + with open(output_json, "r") as file: + assert json.load(file) == { + "policies": [ + { + "name": "Remove all files from repo-name-here older then 7 days", + "file_count": 1, + "size": 528, + }, + {"name": "Use your own rules!", "file_count": 1, "size": 528}, + ], + "total_size": 1056, + } + + [email protected]("requests_repo_name_here") +def test_require_output_json(capsys, shared_datadir, requests_mock): + _, code = ArtifactoryCleanupCLI.run( + [ + "ArtifactoryCleanupCLI", + "--config", + str(shared_datadir / "cleanup.yaml"), + "--load-rules", + str(shared_datadir / "myrule.py"), + "--output-format", + "json", + ], + exit=False, + ) + assert code == 2, stdout + stdout, stderr = capsys.readouterr() + assert ( + "Error: Given --output-format, the following are missing ['output']" in stdout + )
Output format to Json We would like a feature request to have the output table to Json format. The PrettyTable libraries can do it : https://pypi.org/project/prettytable/ If I have time, I would propose a PR
0.0
c523f319dc7835c5b3bd583f5ba187184df24dbc
[ "tests/test_cli.py::test_output_json", "tests/test_cli.py::test_require_output_json", "tests/test_cli.py::test_output_table" ]
[ "tests/test_cli.py::test_dry_mode", "tests/test_cli.py::test_destroy", "tests/test_cli.py::test_help" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-03-17 06:28:51+00:00
mit
1,893
devopsspiral__KubeLibrary-124
diff --git a/CHANGELOG.md b/CHANGELOG.md index b7b2f42..e8800dd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,8 +5,14 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). ## In progress + +## [0.8.1] - 2022-12-16 +### Added - Add proxy configuration fetched from `HTTP_PROXY` or `http_proxy` environment variable +### Fixed +Fix disabling cert validation [#124](https://github.com/devopsspiral/KubeLibrary/pull/124) + ## [0.8.0] - 2022-10-27 ### Added - Add function list_namespaced_stateful_set_by_pattern [#114](https://github.com/devopsspiral/KubeLibrary/pull/113) by [@siaomingjeng](https://github.com/siaomingjeng) diff --git a/src/KubeLibrary/KubeLibrary.py b/src/KubeLibrary/KubeLibrary.py index 3f73adc..ebff896 100755 --- a/src/KubeLibrary/KubeLibrary.py +++ b/src/KubeLibrary/KubeLibrary.py @@ -1,6 +1,5 @@ import json import re -import ssl import urllib3 from os import environ @@ -276,7 +275,7 @@ class KubeLibrary: def _add_api(self, reference, class_name): self.__dict__[reference] = class_name(self.api_client) if not self.cert_validation: - self.__dict__[reference].api_client.rest_client.pool_manager.connection_pool_kw['cert_reqs'] = ssl.CERT_NONE + self.__dict__[reference].api_client.configuration.verify_ssl = False def k8s_api_ping(self): """Performs GET on /api/v1/ for simple check of API availability. diff --git a/src/KubeLibrary/version.py b/src/KubeLibrary/version.py index 8675559..73baf8f 100644 --- a/src/KubeLibrary/version.py +++ b/src/KubeLibrary/version.py @@ -1,1 +1,1 @@ -version = "0.8.0" +version = "0.8.1"
devopsspiral/KubeLibrary
7f4037c283a38751f9a31160944a17e7b80ec97b
diff --git a/test/test_KubeLibrary.py b/test/test_KubeLibrary.py index b99291b..7cae67e 100644 --- a/test/test_KubeLibrary.py +++ b/test/test_KubeLibrary.py @@ -1,7 +1,6 @@ import json import mock import re -import ssl import unittest from KubeLibrary import KubeLibrary from KubeLibrary.exceptions import BearerTokenWithPrefixException @@ -306,7 +305,7 @@ class TestKubeLibrary(unittest.TestCase): kl = KubeLibrary(kube_config='test/resources/k3d', cert_validation=False) for api in TestKubeLibrary.apis: target = getattr(kl, api) - self.assertEqual(target.api_client.rest_client.pool_manager.connection_pool_kw['cert_reqs'], ssl.CERT_NONE) + self.assertEqual(target.api_client.configuration.verify_ssl, False) @responses.activate def test_KubeLibrary_inits_with_bearer_token(self):
certificate verify failed issue when using Get Namespaced Pod Exec When using the Get Namespaced Pod Exec keywork on a k8s cluster using a custom CA, the following error occurs : ``` ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get issuer certificate (_ssl.c:1129) ``` Other keywords (Read Namespaced Pod Status, List Namespaced Pod By Pattern ...) are working as expected. As a quick fix, I'm adding the following line in the _add_api method of the library : ``` def _add_api(self, reference, class_name): self.__dict__[reference] = class_name(self.api_client) if not self.cert_validation: self.__dict__[reference].api_client.rest_client.pool_manager.connection_pool_kw['cert_reqs'] = ssl.CERT_NONE self.__dict__[reference].api_client.configuration.verify_ssl = False ``` Am I missing something regarding the library configuration ? Versions : ``` KubeLibrary: 0.8.0 Python: 3.9.13 Kubernetes: 1.24 ``` KubeLibrary : ``` Library KubeLibrary kube_config=${KUBECONFIG_FILE} cert_validation=False KubeLibrary.Get Namespaced Pod Exec ... name=my-pod ... namespace=${namespace} ... argv_cmd=${command} ```
0.0
7f4037c283a38751f9a31160944a17e7b80ec97b
[ "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_deployment_by_pattern" ]
[ "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_dynamic_delete", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespace", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_inits_with_bearer_token", "test/test_KubeLibrary.py::TestKubeLibrary::test_read_namespaced_endpoints", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_daemon_set", "test/test_KubeLibrary.py::TestKubeLibrary::test_inits_all_api_clients", "test/test_KubeLibrary.py::TestKubeLibrary::test_assert_pod_has_annotations", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_secret_by_pattern", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_dynamic_create", "test/test_KubeLibrary.py::TestKubeLibrary::test_get_namespaced_exec_without_container", "test/test_KubeLibrary.py::TestKubeLibrary::test_read_namespaced_cron_job", "test/test_KubeLibrary.py::TestKubeLibrary::test_read_namespaced_ingress", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_service_account_by_pattern", "test/test_KubeLibrary.py::TestKubeLibrary::test_read_namespaced_horizontal_pod_autoscaler", "test/test_KubeLibrary.py::TestKubeLibrary::test_assert_container_has_env_vars", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_ingress", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_dynamic_replace", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_job_by_pattern", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_inits_with_context", "test/test_KubeLibrary.py::TestKubeLibrary::test_read_namespaced_daemon_set", "test/test_KubeLibrary.py::TestKubeLibrary::test_get_matching_pods_in_namespace", "test/test_KubeLibrary.py::TestKubeLibrary::test_get_namespaced_exec_not_argv_and_list", "test/test_KubeLibrary.py::TestKubeLibrary::test_get_configmaps_in_namespace", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_cluster_role_binding", "test/test_KubeLibrary.py::TestKubeLibrary::test_filter_containers_images", "test/test_KubeLibrary.py::TestKubeLibrary::test_filter_pods_containers_statuses_by_name", "test/test_KubeLibrary.py::TestKubeLibrary::test_evaluate_callable_from_k8s_client", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_persistent_volume_claim_by_pattern", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_dynamic_init", "test/test_KubeLibrary.py::TestKubeLibrary::test_get_kubelet_version", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_role_binding", "test/test_KubeLibrary.py::TestKubeLibrary::test_generate_alphanumeric_str", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_inits_from_kubeconfig", "test/test_KubeLibrary.py::TestKubeLibrary::test_assert_pod_has_labels", "test/test_KubeLibrary.py::TestKubeLibrary::test_filter_pods_containers_by_name", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_dynamic_patch", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_inits_with_bearer_token_with_ca_crt", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_role", "test/test_KubeLibrary.py::TestKubeLibrary::test_filter_containers_resources", "test/test_KubeLibrary.py::TestKubeLibrary::test_get_namespaced_exec_with_container", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_fails_for_wrong_context", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_stateful_set_by_pattern", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_persistent_volume_claim", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_horizontal_pod_autoscaler", "test/test_KubeLibrary.py::TestKubeLibrary::test_KubeLibrary_dynamic_get", "test/test_KubeLibrary.py::TestKubeLibrary::test_read_namespaced_service", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_service", "test/test_KubeLibrary.py::TestKubeLibrary::test_inits_with_bearer_token_raises_BearerTokenWithPrefixException", "test/test_KubeLibrary.py::TestKubeLibrary::test_read_namespaced_pod_status", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_replica_set_by_pattern", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_cron_job", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_namespaced_pod_by_pattern", "test/test_KubeLibrary.py::TestKubeLibrary::test_list_cluster_role" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2022-12-16 14:17:09+00:00
mit
1,894
devsnd__tinytag-156
diff --git a/README.md b/README.md index 39bfda9..cec3e9d 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ List of possible attributes you can get with TinyTag: tag.title # title of the song tag.track # track number as string tag.track_total # total number of tracks as string - tag.year # year or data as string + tag.year # year or date as string For non-common fields and fields specific to single file formats use extra diff --git a/tinytag/tinytag.py b/tinytag/tinytag.py index 66fff62..a581e66 100644 --- a/tinytag/tinytag.py +++ b/tinytag/tinytag.py @@ -484,7 +484,7 @@ class ID3(TinyTag): FRAME_ID_TO_FIELD = { # Mapping from Frame ID to a field of the TinyTag 'COMM': 'comment', 'COM': 'comment', 'TRCK': 'track', 'TRK': 'track', - 'TYER': 'year', 'TYE': 'year', + 'TYER': 'year', 'TYE': 'year', 'TDRC': 'year', 'TALB': 'album', 'TAL': 'album', 'TPE1': 'artist', 'TP1': 'artist', 'TIT2': 'title', 'TT2': 'title',
devsnd/tinytag
5107f8611192a166dfea4f75619377ab2d5bda49
diff --git a/tinytag/tests/test_all.py b/tinytag/tests/test_all.py index abbb5dc..743e48b 100644 --- a/tinytag/tests/test_all.py +++ b/tinytag/tests/test_all.py @@ -73,7 +73,7 @@ testfiles = OrderedDict([ ('samples/utf-8-id3v2.mp3', {'extra': {}, 'genre': 'Acustico', 'track_total': '21', 'track': '01', 'filesize': 2119, 'title': 'Gran día', - 'artist': 'Paso a paso', 'album': 'S/T', 'disc': '', 'disc_total': '0'}), + 'artist': 'Paso a paso', 'album': 'S/T', 'disc': '', 'disc_total': '0', 'year': '2003'}), ('samples/empty_file.mp3', {'extra': {}, 'filesize': 0}), ('samples/silence-44khz-56k-mono-1s.mp3', @@ -88,10 +88,11 @@ testfiles = OrderedDict([ 'track_total': '12', 'genre': 'AlternRock', 'title': 'Out of the Woodwork', 'artist': 'Courtney Barnett', 'albumartist': 'Courtney Barnett', 'disc': '1', - 'comment': 'Amazon.com Song ID: 240853806', 'composer': 'Courtney Barnett'}), + 'comment': 'Amazon.com Song ID: 240853806', 'composer': 'Courtney Barnett', + 'year': '2013'}), ('samples/utf16be.mp3', {'extra': {}, 'title': '52-girls', 'filesize': 2048, 'track': '6', 'album': 'party mix', - 'artist': 'The B52s', 'genre': 'Rock'}), + 'artist': 'The B52s', 'genre': 'Rock', 'year': '1981'}), ('samples/id3v22_image.mp3', {'extra': {}, 'title': 'Kids (MGMT Cover) ', 'filesize': 35924, 'album': 'winniecooper.net ', 'artist': 'The Kooks', 'year': '2008', @@ -189,7 +190,7 @@ testfiles = OrderedDict([ ('samples/id3v24_genre_null_byte.mp3', {'extra': {}, 'filesize': 256, 'album': '\u79d8\u5bc6', 'albumartist': 'aiko', 'artist': 'aiko', 'disc': '1', 'genre': 'Pop', - 'title': '\u661f\u306e\u306a\u3044\u4e16\u754c', 'track': '10'}), + 'title': '\u661f\u306e\u306a\u3044\u4e16\u754c', 'track': '10', 'year': '2008'}), ('samples/vbr_xing_header_short.mp3', {'filesize': 432, 'audio_offset': 133, 'bitrate': 24.0, 'channels': 1, 'duration': 0.144, 'extra': {}, 'samplerate': 8000}), @@ -376,7 +377,7 @@ testfiles = OrderedDict([ {'extra': {}, 'channels': 2, 'duration': 0.2999546485260771, 'filesize': 6892, 'artist': 'Serhiy Storchaka', 'title': 'Pluck', 'album': 'Python Test Suite', 'bitrate': 176.4, 'samplerate': 11025, 'audio_offset': 116, - 'comment': 'Audacity Pluck + Wahwah'}), + 'comment': 'Audacity Pluck + Wahwah', 'year': '2013'}), ('samples/M1F1-mulawC-AFsp.afc', {'extra': {}, 'channels': 2, 'duration': 2.936625, 'filesize': 47148, 'bitrate': 256.0, 'samplerate': 8000, 'audio_offset': 154,
[BUG] Parsing mp3 file w/ valid TDRC tag does not populate year **Describe the bug** When parsing a mp3 file w/ valid v2.4 metadata and a TDRC frame, TinyTag does not populate the year attribute in the output. **To Reproduce** Steps to reproduce the behavior: 1. Open a valid mp3 file w/ TinyTag 2. See `Found id3 Frame TDRC` in the program output 3. Resulting dict still has `"year": null` **Expected behavior** Valid timestamps (yyyy, yyyy-MM, yyyy-MM-dd, yyyy-MM-ddTHH, yyyy-MM-ddTHH:mm and yyyy-MM-ddTHH:mm:ss) should result in year attribute populated. **Sample File** https://www.dropbox.com/s/lz6vlzhw18znqp8/cdwal5Kw3Fc.mp3?dl=0
0.0
5107f8611192a166dfea4f75619377ab2d5bda49
[ "tinytag/tests/test_all.py::test_file_reading[samples/utf-8-id3v2.mp3-expected8]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v24-long-title.mp3-expected12]", "tinytag/tests/test_all.py::test_file_reading[samples/utf16be.mp3-expected13]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v24_genre_null_byte.mp3-expected39]", "tinytag/tests/test_all.py::test_file_reading[samples/pluck-pcm8.aiff-expected77]" ]
[ "tinytag/tests/test_all.py::test_file_reading[samples/vbri.mp3-expected0]", "tinytag/tests/test_all.py::test_file_reading[samples/cbr.mp3-expected1]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header.mp3-expected2]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header_2channel.mp3-expected3]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22-test.mp3-expected4]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-44-s-v1.mp3-expected5]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v1-latin1.mp3-expected6]", "tinytag/tests/test_all.py::test_file_reading[samples/UTF16.mp3-expected7]", "tinytag/tests/test_all.py::test_file_reading[samples/empty_file.mp3-expected9]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-44khz-56k-mono-1s.mp3-expected10]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-22khz-mono-1s.mp3-expected11]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22_image.mp3-expected14]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22.TCO.genre.mp3-expected15]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_comment_utf_16_with_bom.mp3-expected16]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_comment_utf_16_double_bom.mp3-expected17]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_genre_id_out_of_bounds.mp3-expected18]", "tinytag/tests/test_all.py::test_file_reading[samples/image-text-encoding.mp3-expected19]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v1_does_not_overwrite_id3v2.mp3-expected20]", "tinytag/tests/test_all.py::test_file_reading[samples/nicotinetestdata.mp3-expected21]", "tinytag/tests/test_all.py::test_file_reading[samples/chinese_id3.mp3-expected22]", "tinytag/tests/test_all.py::test_file_reading[samples/cut_off_titles.mp3-expected23]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_xxx_lang.mp3-expected24]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr8.mp3-expected25]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr8stereo.mp3-expected26]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr11.mp3-expected27]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr11stereo.mp3-expected28]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr16.mp3-expected29]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr16stereo.mp3-expected30]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr22.mp3-expected31]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr22stereo.mp3-expected32]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr32.mp3-expected33]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr32stereo.mp3-expected34]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr44.mp3-expected35]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr44stereo.mp3-expected36]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr48.mp3-expected37]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr48stereo.mp3-expected38]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header_short.mp3-expected40]", "tinytag/tests/test_all.py::test_file_reading[samples/empty.ogg-expected41]", "tinytag/tests/test_all.py::test_file_reading[samples/multipagecomment.ogg-expected42]", "tinytag/tests/test_all.py::test_file_reading[samples/multipage-setup.ogg-expected43]", "tinytag/tests/test_all.py::test_file_reading[samples/test.ogg-expected44]", "tinytag/tests/test_all.py::test_file_reading[samples/corrupt_metadata.ogg-expected45]", "tinytag/tests/test_all.py::test_file_reading[samples/composer.ogg-expected46]", "tinytag/tests/test_all.py::test_file_reading[samples/test.opus-expected47]", "tinytag/tests/test_all.py::test_file_reading[samples/8khz_5s.opus-expected48]", "tinytag/tests/test_all.py::test_file_reading[samples/test.wav-expected49]", "tinytag/tests/test_all.py::test_file_reading[samples/test3sMono.wav-expected50]", "tinytag/tests/test_all.py::test_file_reading[samples/test-tagged.wav-expected51]", "tinytag/tests/test_all.py::test_file_reading[samples/test-riff-tags.wav-expected52]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-22khz-mono-1s.wav-expected53]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_header_with_a_zero_byte.wav-expected54]", "tinytag/tests/test_all.py::test_file_reading[samples/adpcm.wav-expected55]", "tinytag/tests/test_all.py::test_file_reading[samples/riff_extra_zero.wav-expected56]", "tinytag/tests/test_all.py::test_file_reading[samples/riff_extra_zero_2.wav-expected57]", "tinytag/tests/test_all.py::test_file_reading[samples/flac1sMono.flac-expected58]", "tinytag/tests/test_all.py::test_file_reading[samples/flac453sStereo.flac-expected59]", "tinytag/tests/test_all.py::test_file_reading[samples/flac1.5sStereo.flac-expected60]", "tinytag/tests/test_all.py::test_file_reading[samples/flac_application.flac-expected61]", "tinytag/tests/test_all.py::test_file_reading[samples/no-tags.flac-expected62]", "tinytag/tests/test_all.py::test_file_reading[samples/variable-block.flac-expected63]", "tinytag/tests/test_all.py::test_file_reading[samples/106-invalid-streaminfo.flac-expected64]", "tinytag/tests/test_all.py::test_file_reading[samples/106-short-picture-block-size.flac-expected65]", "tinytag/tests/test_all.py::test_file_reading[samples/with_id3_header.flac-expected66]", "tinytag/tests/test_all.py::test_file_reading[samples/with_padded_id3_header.flac-expected67]", "tinytag/tests/test_all.py::test_file_reading[samples/with_padded_id3_header2.flac-expected68]", "tinytag/tests/test_all.py::test_file_reading[samples/flac_with_image.flac-expected69]", "tinytag/tests/test_all.py::test_file_reading[samples/test2.wma-expected70]", "tinytag/tests/test_all.py::test_file_reading[samples/test.m4a-expected71]", "tinytag/tests/test_all.py::test_file_reading[samples/test2.m4a-expected72]", "tinytag/tests/test_all.py::test_file_reading[samples/iso8859_with_image.m4a-expected73]", "tinytag/tests/test_all.py::test_file_reading[samples/alac_file.m4a-expected74]", "tinytag/tests/test_all.py::test_file_reading[samples/test-tagged.aiff-expected75]", "tinytag/tests/test_all.py::test_file_reading[samples/test.aiff-expected76]", "tinytag/tests/test_all.py::test_file_reading[samples/M1F1-mulawC-AFsp.afc-expected78]", "tinytag/tests/test_all.py::test_pathlib_compatibility", "tinytag/tests/test_all.py::test_binary_path_compatibility", "tinytag/tests/test_all.py::test_override_encoding", "tinytag/tests/test_all.py::test_mp3_length_estimation", "tinytag/tests/test_all.py::test_unpad", "tinytag/tests/test_all.py::test_mp3_image_loading", "tinytag/tests/test_all.py::test_mp3_id3v22_image_loading", "tinytag/tests/test_all.py::test_mp3_image_loading_without_description", "tinytag/tests/test_all.py::test_mp3_image_loading_with_utf8_description", "tinytag/tests/test_all.py::test_mp3_image_loading2", "tinytag/tests/test_all.py::test_mp3_utf_8_invalid_string_raises_exception", "tinytag/tests/test_all.py::test_mp3_utf_8_invalid_string_can_be_ignored", "tinytag/tests/test_all.py::test_mp4_image_loading", "tinytag/tests/test_all.py::test_flac_image_loading", "tinytag/tests/test_all.py::test_aiff_image_loading", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp3_id3.x-ID3]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp3_fffb.x-ID3]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_ogg.x-Ogg]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_wav.x-Wave]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_flac.x-Flac]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_wma.x-Wma]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp4_m4a.x-MP4]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_aiff.x-Aiff]", "tinytag/tests/test_all.py::test_show_hint_for_wrong_usage", "tinytag/tests/test_all.py::test_to_str" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2022-09-02 01:45:25+00:00
mit
1,895
devsnd__tinytag-171
diff --git a/tinytag/tinytag.py b/tinytag/tinytag.py index a7a8a21..8ba376d 100644 --- a/tinytag/tinytag.py +++ b/tinytag/tinytag.py @@ -924,8 +924,10 @@ class Ogg(TinyTag): 'artist': 'artist', 'date': 'year', 'tracknumber': 'track', + 'tracktotal': 'track_total', 'totaltracks': 'track_total', 'discnumber': 'disc', + 'disctotal': 'disc_total', 'totaldiscs': 'disc_total', 'genre': 'genre', 'description': 'comment',
devsnd/tinytag
85a16fa18bcc534d1d61f10ca539955823945d5d
diff --git a/tinytag/tests/test_all.py b/tinytag/tests/test_all.py index 8f4421c..0b70517 100644 --- a/tinytag/tests/test_all.py +++ b/tinytag/tests/test_all.py @@ -230,7 +230,7 @@ testfiles = OrderedDict([ 'track': '1', 'disc': '1', 'title': 'Bad Apple!!', 'duration': 2.0, 'year': '2008.05.25', 'filesize': 10000, 'artist': 'nomico', 'album': 'Exserens - A selection of Alstroemeria Records', - 'comment': 'ARCD0018 - Lovelight'}), + 'comment': 'ARCD0018 - Lovelight', 'disc_total': '1', 'track_total': '13'}), ('samples/8khz_5s.opus', {'extra': {}, 'filesize': 7251, 'channels': 1, 'samplerate': 48000, 'duration': 5.0}),
Fail to read track_total, but it is ok in foobar I got some tracks from qobuz. I have some problems in reading the track_total. It showed 'null' in track_total. The others is OK, such as artist, album etc.... But its track_total seems OK, when checked in foobar. Why? The attachment are an example flac file [19. I m Not The Man You Think I Am.zip](https://github.com/devsnd/tinytag/files/10875229/19.I.m.Not.The.Man.You.Think.I.Am.zip)
0.0
85a16fa18bcc534d1d61f10ca539955823945d5d
[ "tinytag/tests/test_all.py::test_file_reading[samples/test.opus-expected47]" ]
[ "tinytag/tests/test_all.py::test_file_reading[samples/vbri.mp3-expected0]", "tinytag/tests/test_all.py::test_file_reading[samples/cbr.mp3-expected1]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header.mp3-expected2]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header_2channel.mp3-expected3]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22-test.mp3-expected4]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-44-s-v1.mp3-expected5]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v1-latin1.mp3-expected6]", "tinytag/tests/test_all.py::test_file_reading[samples/UTF16.mp3-expected7]", "tinytag/tests/test_all.py::test_file_reading[samples/utf-8-id3v2.mp3-expected8]", "tinytag/tests/test_all.py::test_file_reading[samples/empty_file.mp3-expected9]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-44khz-56k-mono-1s.mp3-expected10]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-22khz-mono-1s.mp3-expected11]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v24-long-title.mp3-expected12]", "tinytag/tests/test_all.py::test_file_reading[samples/utf16be.mp3-expected13]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22_image.mp3-expected14]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22.TCO.genre.mp3-expected15]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_comment_utf_16_with_bom.mp3-expected16]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_comment_utf_16_double_bom.mp3-expected17]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_genre_id_out_of_bounds.mp3-expected18]", "tinytag/tests/test_all.py::test_file_reading[samples/image-text-encoding.mp3-expected19]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v1_does_not_overwrite_id3v2.mp3-expected20]", "tinytag/tests/test_all.py::test_file_reading[samples/nicotinetestdata.mp3-expected21]", "tinytag/tests/test_all.py::test_file_reading[samples/chinese_id3.mp3-expected22]", "tinytag/tests/test_all.py::test_file_reading[samples/cut_off_titles.mp3-expected23]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_xxx_lang.mp3-expected24]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr8.mp3-expected25]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr8stereo.mp3-expected26]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr11.mp3-expected27]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr11stereo.mp3-expected28]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr16.mp3-expected29]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr16stereo.mp3-expected30]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr22.mp3-expected31]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr22stereo.mp3-expected32]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr32.mp3-expected33]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr32stereo.mp3-expected34]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr44.mp3-expected35]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr44stereo.mp3-expected36]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr48.mp3-expected37]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr48stereo.mp3-expected38]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v24_genre_null_byte.mp3-expected39]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header_short.mp3-expected40]", "tinytag/tests/test_all.py::test_file_reading[samples/empty.ogg-expected41]", "tinytag/tests/test_all.py::test_file_reading[samples/multipagecomment.ogg-expected42]", "tinytag/tests/test_all.py::test_file_reading[samples/multipage-setup.ogg-expected43]", "tinytag/tests/test_all.py::test_file_reading[samples/test.ogg-expected44]", "tinytag/tests/test_all.py::test_file_reading[samples/corrupt_metadata.ogg-expected45]", "tinytag/tests/test_all.py::test_file_reading[samples/composer.ogg-expected46]", "tinytag/tests/test_all.py::test_file_reading[samples/8khz_5s.opus-expected48]", "tinytag/tests/test_all.py::test_file_reading[samples/test.wav-expected49]", "tinytag/tests/test_all.py::test_file_reading[samples/test3sMono.wav-expected50]", "tinytag/tests/test_all.py::test_file_reading[samples/test-tagged.wav-expected51]", "tinytag/tests/test_all.py::test_file_reading[samples/test-riff-tags.wav-expected52]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-22khz-mono-1s.wav-expected53]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_header_with_a_zero_byte.wav-expected54]", "tinytag/tests/test_all.py::test_file_reading[samples/adpcm.wav-expected55]", "tinytag/tests/test_all.py::test_file_reading[samples/riff_extra_zero.wav-expected56]", "tinytag/tests/test_all.py::test_file_reading[samples/riff_extra_zero_2.wav-expected57]", "tinytag/tests/test_all.py::test_file_reading[samples/flac1sMono.flac-expected58]", "tinytag/tests/test_all.py::test_file_reading[samples/flac453sStereo.flac-expected59]", "tinytag/tests/test_all.py::test_file_reading[samples/flac1.5sStereo.flac-expected60]", "tinytag/tests/test_all.py::test_file_reading[samples/flac_application.flac-expected61]", "tinytag/tests/test_all.py::test_file_reading[samples/no-tags.flac-expected62]", "tinytag/tests/test_all.py::test_file_reading[samples/variable-block.flac-expected63]", "tinytag/tests/test_all.py::test_file_reading[samples/106-invalid-streaminfo.flac-expected64]", "tinytag/tests/test_all.py::test_file_reading[samples/106-short-picture-block-size.flac-expected65]", "tinytag/tests/test_all.py::test_file_reading[samples/with_id3_header.flac-expected66]", "tinytag/tests/test_all.py::test_file_reading[samples/with_padded_id3_header.flac-expected67]", "tinytag/tests/test_all.py::test_file_reading[samples/with_padded_id3_header2.flac-expected68]", "tinytag/tests/test_all.py::test_file_reading[samples/flac_with_image.flac-expected69]", "tinytag/tests/test_all.py::test_file_reading[samples/test2.wma-expected70]", "tinytag/tests/test_all.py::test_file_reading[samples/lossless.wma-expected71]", "tinytag/tests/test_all.py::test_file_reading[samples/test.m4a-expected72]", "tinytag/tests/test_all.py::test_file_reading[samples/test2.m4a-expected73]", "tinytag/tests/test_all.py::test_file_reading[samples/iso8859_with_image.m4a-expected74]", "tinytag/tests/test_all.py::test_file_reading[samples/alac_file.m4a-expected75]", "tinytag/tests/test_all.py::test_file_reading[samples/mpeg4_desc_cmt.m4a-expected76]", "tinytag/tests/test_all.py::test_file_reading[samples/mpeg4_xa9des.m4a-expected77]", "tinytag/tests/test_all.py::test_file_reading[samples/test-tagged.aiff-expected78]", "tinytag/tests/test_all.py::test_file_reading[samples/test.aiff-expected79]", "tinytag/tests/test_all.py::test_file_reading[samples/pluck-pcm8.aiff-expected80]", "tinytag/tests/test_all.py::test_file_reading[samples/M1F1-mulawC-AFsp.afc-expected81]", "tinytag/tests/test_all.py::test_file_reading[samples/invalid_sample_rate.aiff-expected82]", "tinytag/tests/test_all.py::test_pathlib_compatibility", "tinytag/tests/test_all.py::test_binary_path_compatibility", "tinytag/tests/test_all.py::test_override_encoding", "tinytag/tests/test_all.py::test_mp3_length_estimation", "tinytag/tests/test_all.py::test_unpad", "tinytag/tests/test_all.py::test_mp3_image_loading", "tinytag/tests/test_all.py::test_mp3_id3v22_image_loading", "tinytag/tests/test_all.py::test_mp3_image_loading_without_description", "tinytag/tests/test_all.py::test_mp3_image_loading_with_utf8_description", "tinytag/tests/test_all.py::test_mp3_image_loading2", "tinytag/tests/test_all.py::test_mp3_utf_8_invalid_string_raises_exception", "tinytag/tests/test_all.py::test_mp3_utf_8_invalid_string_can_be_ignored", "tinytag/tests/test_all.py::test_mp4_image_loading", "tinytag/tests/test_all.py::test_flac_image_loading", "tinytag/tests/test_all.py::test_ogg_image_loading", "tinytag/tests/test_all.py::test_aiff_image_loading", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp3_id3.x-ID3]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp3_fffb.x-ID3]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_ogg.x-Ogg]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_wav.x-Wave]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_flac.x-Flac]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_wma.x-Wma]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp4_m4a.x-MP4]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_aiff.x-Aiff]", "tinytag/tests/test_all.py::test_show_hint_for_wrong_usage", "tinytag/tests/test_all.py::test_to_str" ]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2023-03-20 22:28:45+00:00
mit
1,896
devsnd__tinytag-178
diff --git a/tinytag/tinytag.py b/tinytag/tinytag.py index a3f1305..595a101 100644 --- a/tinytag/tinytag.py +++ b/tinytag/tinytag.py @@ -170,40 +170,48 @@ class TinyTag(object): return parser @classmethod - def get_parser_class(cls, filename, filehandle): + def get_parser_class(cls, filename=None, filehandle=None): if cls != TinyTag: # if `get` is invoked on TinyTag, find parser by ext return cls # otherwise use the class on which `get` was invoked - parser_class = cls._get_parser_for_filename(filename) - if parser_class is not None: - return parser_class + if filename: + parser_class = cls._get_parser_for_filename(filename) + if parser_class is not None: + return parser_class # try determining the file type by magic byte header - parser_class = cls._get_parser_for_file_handle(filehandle) - if parser_class is not None: - return parser_class + if filehandle: + parser_class = cls._get_parser_for_file_handle(filehandle) + if parser_class is not None: + return parser_class raise TinyTagException('No tag reader found to support filetype! ') @classmethod - def get(cls, filename, tags=True, duration=True, image=False, ignore_errors=False, - encoding=None): - try: # cast pathlib.Path to str - import pathlib - if isinstance(filename, pathlib.Path): - filename = str(filename.absolute()) - except ImportError: - pass + def get(cls, filename=None, tags=True, duration=True, image=False, + ignore_errors=False, encoding=None, file_obj=None): + should_open_file = (file_obj is None) + if should_open_file: + try: + file_obj = io.open(filename, 'rb') + except TypeError: + file_obj = io.open(str(filename.absolute()), 'rb') # Python 3.4/3.5 pathlib support + filename = file_obj.name else: - filename = os.path.expanduser(filename) - size = os.path.getsize(filename) - if not size > 0: - return TinyTag(None, 0) - with io.open(filename, 'rb') as af: - parser_class = cls.get_parser_class(filename, af) - tag = parser_class(af, size, ignore_errors=ignore_errors) + file_obj = io.BufferedReader(file_obj) # buffered reader to support peeking + try: + file_obj.seek(0, os.SEEK_END) + filesize = file_obj.tell() + file_obj.seek(0) + if filesize <= 0: + return TinyTag(None, filesize) + parser_class = cls.get_parser_class(filename, file_obj) + tag = parser_class(file_obj, filesize, ignore_errors=ignore_errors) tag._filename = filename tag._default_encoding = encoding tag.load(tags=tags, duration=duration, image=image) tag.extra = dict(tag.extra) # turn default dict into dict so that it can throw KeyError return tag + finally: + if should_open_file: + file_obj.close() def __str__(self): return json.dumps(OrderedDict(sorted(self.as_dict().items())))
devsnd/tinytag
337c044ce51f9e707b8cd31d02896c9041a98afa
diff --git a/tinytag/tests/test_all.py b/tinytag/tests/test_all.py index 0b70517..aa3a38e 100644 --- a/tinytag/tests/test_all.py +++ b/tinytag/tests/test_all.py @@ -510,6 +510,13 @@ def test_pathlib_compatibility(): TinyTag.get(filename) +def test_bytesio_compatibility(): + testfile = next(iter(testfiles.keys())) + filename = os.path.join(testfolder, testfile) + with io.open(filename, 'rb') as file_handle: + TinyTag.get(file_obj=io.BytesIO(file_handle.read())) + + @pytest.mark.skipif(sys.platform == "win32", reason='Windows does not support binary paths') def test_binary_path_compatibility(): binary_file_path = os.path.join(os.path.dirname(__file__).encode('utf-8'), b'\x01.mp3')
Support BytesIo objects for tagging It would be awesome to support BytesIO or any other IO types with TinyTag. This way it can be used in some scenarios where files are packaged and do not have a normal path.
0.0
337c044ce51f9e707b8cd31d02896c9041a98afa
[ "tinytag/tests/test_all.py::test_bytesio_compatibility" ]
[ "tinytag/tests/test_all.py::test_file_reading[samples/vbri.mp3-expected0]", "tinytag/tests/test_all.py::test_file_reading[samples/cbr.mp3-expected1]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header.mp3-expected2]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header_2channel.mp3-expected3]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22-test.mp3-expected4]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-44-s-v1.mp3-expected5]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v1-latin1.mp3-expected6]", "tinytag/tests/test_all.py::test_file_reading[samples/UTF16.mp3-expected7]", "tinytag/tests/test_all.py::test_file_reading[samples/utf-8-id3v2.mp3-expected8]", "tinytag/tests/test_all.py::test_file_reading[samples/empty_file.mp3-expected9]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-44khz-56k-mono-1s.mp3-expected10]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-22khz-mono-1s.mp3-expected11]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v24-long-title.mp3-expected12]", "tinytag/tests/test_all.py::test_file_reading[samples/utf16be.mp3-expected13]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22_image.mp3-expected14]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v22.TCO.genre.mp3-expected15]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_comment_utf_16_with_bom.mp3-expected16]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_comment_utf_16_double_bom.mp3-expected17]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_genre_id_out_of_bounds.mp3-expected18]", "tinytag/tests/test_all.py::test_file_reading[samples/image-text-encoding.mp3-expected19]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v1_does_not_overwrite_id3v2.mp3-expected20]", "tinytag/tests/test_all.py::test_file_reading[samples/nicotinetestdata.mp3-expected21]", "tinytag/tests/test_all.py::test_file_reading[samples/chinese_id3.mp3-expected22]", "tinytag/tests/test_all.py::test_file_reading[samples/cut_off_titles.mp3-expected23]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_xxx_lang.mp3-expected24]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr8.mp3-expected25]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr8stereo.mp3-expected26]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr11.mp3-expected27]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr11stereo.mp3-expected28]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr16.mp3-expected29]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr16stereo.mp3-expected30]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr22.mp3-expected31]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr22stereo.mp3-expected32]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr32.mp3-expected33]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr32stereo.mp3-expected34]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr44.mp3-expected35]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr44stereo.mp3-expected36]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr48.mp3-expected37]", "tinytag/tests/test_all.py::test_file_reading[samples/mp3/vbr/vbr48stereo.mp3-expected38]", "tinytag/tests/test_all.py::test_file_reading[samples/id3v24_genre_null_byte.mp3-expected39]", "tinytag/tests/test_all.py::test_file_reading[samples/vbr_xing_header_short.mp3-expected40]", "tinytag/tests/test_all.py::test_file_reading[samples/empty.ogg-expected41]", "tinytag/tests/test_all.py::test_file_reading[samples/multipagecomment.ogg-expected42]", "tinytag/tests/test_all.py::test_file_reading[samples/multipage-setup.ogg-expected43]", "tinytag/tests/test_all.py::test_file_reading[samples/test.ogg-expected44]", "tinytag/tests/test_all.py::test_file_reading[samples/corrupt_metadata.ogg-expected45]", "tinytag/tests/test_all.py::test_file_reading[samples/composer.ogg-expected46]", "tinytag/tests/test_all.py::test_file_reading[samples/test.opus-expected47]", "tinytag/tests/test_all.py::test_file_reading[samples/8khz_5s.opus-expected48]", "tinytag/tests/test_all.py::test_file_reading[samples/test.wav-expected49]", "tinytag/tests/test_all.py::test_file_reading[samples/test3sMono.wav-expected50]", "tinytag/tests/test_all.py::test_file_reading[samples/test-tagged.wav-expected51]", "tinytag/tests/test_all.py::test_file_reading[samples/test-riff-tags.wav-expected52]", "tinytag/tests/test_all.py::test_file_reading[samples/silence-22khz-mono-1s.wav-expected53]", "tinytag/tests/test_all.py::test_file_reading[samples/id3_header_with_a_zero_byte.wav-expected54]", "tinytag/tests/test_all.py::test_file_reading[samples/adpcm.wav-expected55]", "tinytag/tests/test_all.py::test_file_reading[samples/riff_extra_zero.wav-expected56]", "tinytag/tests/test_all.py::test_file_reading[samples/riff_extra_zero_2.wav-expected57]", "tinytag/tests/test_all.py::test_file_reading[samples/flac1sMono.flac-expected58]", "tinytag/tests/test_all.py::test_file_reading[samples/flac453sStereo.flac-expected59]", "tinytag/tests/test_all.py::test_file_reading[samples/flac1.5sStereo.flac-expected60]", "tinytag/tests/test_all.py::test_file_reading[samples/flac_application.flac-expected61]", "tinytag/tests/test_all.py::test_file_reading[samples/no-tags.flac-expected62]", "tinytag/tests/test_all.py::test_file_reading[samples/variable-block.flac-expected63]", "tinytag/tests/test_all.py::test_file_reading[samples/106-invalid-streaminfo.flac-expected64]", "tinytag/tests/test_all.py::test_file_reading[samples/106-short-picture-block-size.flac-expected65]", "tinytag/tests/test_all.py::test_file_reading[samples/with_id3_header.flac-expected66]", "tinytag/tests/test_all.py::test_file_reading[samples/with_padded_id3_header.flac-expected67]", "tinytag/tests/test_all.py::test_file_reading[samples/with_padded_id3_header2.flac-expected68]", "tinytag/tests/test_all.py::test_file_reading[samples/flac_with_image.flac-expected69]", "tinytag/tests/test_all.py::test_file_reading[samples/test2.wma-expected70]", "tinytag/tests/test_all.py::test_file_reading[samples/lossless.wma-expected71]", "tinytag/tests/test_all.py::test_file_reading[samples/test.m4a-expected72]", "tinytag/tests/test_all.py::test_file_reading[samples/test2.m4a-expected73]", "tinytag/tests/test_all.py::test_file_reading[samples/iso8859_with_image.m4a-expected74]", "tinytag/tests/test_all.py::test_file_reading[samples/alac_file.m4a-expected75]", "tinytag/tests/test_all.py::test_file_reading[samples/mpeg4_desc_cmt.m4a-expected76]", "tinytag/tests/test_all.py::test_file_reading[samples/mpeg4_xa9des.m4a-expected77]", "tinytag/tests/test_all.py::test_file_reading[samples/test-tagged.aiff-expected78]", "tinytag/tests/test_all.py::test_file_reading[samples/test.aiff-expected79]", "tinytag/tests/test_all.py::test_file_reading[samples/pluck-pcm8.aiff-expected80]", "tinytag/tests/test_all.py::test_file_reading[samples/M1F1-mulawC-AFsp.afc-expected81]", "tinytag/tests/test_all.py::test_file_reading[samples/invalid_sample_rate.aiff-expected82]", "tinytag/tests/test_all.py::test_pathlib_compatibility", "tinytag/tests/test_all.py::test_binary_path_compatibility", "tinytag/tests/test_all.py::test_override_encoding", "tinytag/tests/test_all.py::test_mp3_length_estimation", "tinytag/tests/test_all.py::test_unpad", "tinytag/tests/test_all.py::test_mp3_image_loading", "tinytag/tests/test_all.py::test_mp3_id3v22_image_loading", "tinytag/tests/test_all.py::test_mp3_image_loading_without_description", "tinytag/tests/test_all.py::test_mp3_image_loading_with_utf8_description", "tinytag/tests/test_all.py::test_mp3_image_loading2", "tinytag/tests/test_all.py::test_mp3_utf_8_invalid_string_raises_exception", "tinytag/tests/test_all.py::test_mp3_utf_8_invalid_string_can_be_ignored", "tinytag/tests/test_all.py::test_mp4_image_loading", "tinytag/tests/test_all.py::test_flac_image_loading", "tinytag/tests/test_all.py::test_ogg_image_loading", "tinytag/tests/test_all.py::test_aiff_image_loading", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp3_id3.x-ID3]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp3_fffb.x-ID3]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_ogg.x-Ogg]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_wav.x-Wave]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_flac.x-Flac]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_wma.x-Wma]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_mp4_m4a.x-MP4]", "tinytag/tests/test_all.py::test_detect_magic_headers[samples/detect_aiff.x-Aiff]", "tinytag/tests/test_all.py::test_show_hint_for_wrong_usage", "tinytag/tests/test_all.py::test_to_str" ]
{ "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false }
2023-06-02 19:58:04+00:00
mit
1,897
dfm__emcee-295
diff --git a/.travis.yml b/.travis.yml index fa02161..4aa919c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,7 @@ install: - travis_retry python setup.py develop script: - - py.test -v emcee/tests --cov emcee + - pytest -v emcee/tests --cov emcee after_success: - coveralls diff --git a/emcee/ensemble.py b/emcee/ensemble.py index ae6a976..7d30afc 100644 --- a/emcee/ensemble.py +++ b/emcee/ensemble.py @@ -478,8 +478,8 @@ class EnsembleSampler(object): @property @deprecated("get_log_prob()") def lnprobability(self): # pragma: no cover - return self.get_log_prob() - + log_prob = self.get_log_prob() + return np.swapaxes(log_prob, 0, 1) @property @deprecated("get_log_prob(flat=True)") def flatlnprobability(self): # pragma: no cover
dfm/emcee
593a6b134170c47af6e31106244df78b6fb194db
diff --git a/emcee/tests/unit/test_sampler.py b/emcee/tests/unit/test_sampler.py index 48a351a..ca38a56 100644 --- a/emcee/tests/unit/test_sampler.py +++ b/emcee/tests/unit/test_sampler.py @@ -47,11 +47,15 @@ def test_shapes(backend, moves, nwalkers=32, ndim=3, nsteps=10, seed=1234): assert tau.shape == (ndim,) # Check the shapes. - assert sampler.chain.shape == (nwalkers, nsteps, ndim), \ - "incorrect coordinate dimensions" + with pytest.warns(DeprecationWarning): + assert sampler.chain.shape == (nwalkers, nsteps, ndim), \ + "incorrect coordinate dimensions" + with pytest.warns(DeprecationWarning): + assert sampler.lnprobability.shape == (nwalkers, nsteps), \ + "incorrect probability dimensions" assert sampler.get_chain().shape == (nsteps, nwalkers, ndim), \ "incorrect coordinate dimensions" - assert sampler.lnprobability.shape == (nsteps, nwalkers), \ + assert sampler.get_log_prob().shape == (nsteps, nwalkers), \ "incorrect probability dimensions" assert sampler.acceptance_fraction.shape == (nwalkers,), \ @@ -77,14 +81,14 @@ def test_errors(backend, nwalkers=32, ndim=3, nsteps=5, seed=1234): # Test for not running. with pytest.raises(AttributeError): - sampler.chain + sampler.get_chain() with pytest.raises(AttributeError): - sampler.lnprobability + sampler.get_log_prob() # What about not storing the chain. sampler.run_mcmc(coords, nsteps, store=False) with pytest.raises(AttributeError): - sampler.chain + sampler.get_chain() # Now what about if we try to continue using the sampler with an # ensemble of a different shape. @@ -121,12 +125,15 @@ def run_sampler(backend, nwalkers=32, ndim=3, nsteps=25, seed=1234, def test_thin(backend): with backend() as be: with pytest.raises(ValueError): - run_sampler(be, thin=-1) + with pytest.warns(DeprecationWarning): + run_sampler(be, thin=-1) with pytest.raises(ValueError): - run_sampler(be, thin=0.1) + with pytest.warns(DeprecationWarning): + run_sampler(be, thin=0.1) thinby = 3 sampler1 = run_sampler(None) - sampler2 = run_sampler(be, thin=thinby) + with pytest.warns(DeprecationWarning): + sampler2 = run_sampler(be, thin=thinby) for k in ["get_chain", "get_log_prob"]: a = getattr(sampler1, k)()[thinby-1::thinby] b = getattr(sampler2, k)()
sampler.lnprobability is transposed in emcee3? tl;dr it looks like `sampler.lnprobability` is transposed in emcee 3 from what I would expect from emcee 2. Sample code (copy pasta'd from the old docs): ```python import numpy as np import emcee def lnprob(x, ivar): return -0.5 * np.sum(ivar * x ** 2) ndim, nwalkers = 10, 100 ivar = 1. / np.random.rand(ndim) p0 = [np.random.rand(ndim) for i in range(nwalkers)] sampler = emcee.EnsembleSampler(nwalkers, ndim, lnprob, args=[ivar]) _ = sampler.run_mcmc(p0, 1000) print(emcee.__version__) print(sampler.chain.shape, sampler.lnprobability.shape) ``` ## Output from emcee 2.2.1 ``` 2.2.1 (100, 1000, 10) (100, 1000) ``` ## Output from emcee 3.0rc2 ``` 3.0rc2 (100, 1000, 10) (1000, 100) ```
0.0
593a6b134170c47af6e31106244df78b6fb194db
[ "emcee/tests/unit/test_sampler.py::test_shapes[Backend-None]", "emcee/tests/unit/test_sampler.py::test_shapes[Backend-moves1]", "emcee/tests/unit/test_sampler.py::test_shapes[Backend-moves2]", "emcee/tests/unit/test_sampler.py::test_shapes[Backend-moves3]" ]
[ "emcee/tests/unit/test_sampler.py::test_thin[Backend]", "emcee/tests/unit/test_sampler.py::test_thin_by[Backend-True]", "emcee/tests/unit/test_sampler.py::test_thin_by[Backend-False]", "emcee/tests/unit/test_sampler.py::test_restart[Backend]", "emcee/tests/unit/test_sampler.py::test_vectorize", "emcee/tests/unit/test_sampler.py::test_pickle[Backend]" ]
{ "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2019-04-11 00:18:44+00:00
mit
1,898
dfm__emcee-354
diff --git a/src/emcee/autocorr.py b/src/emcee/autocorr.py index 5156372..4a804ff 100644 --- a/src/emcee/autocorr.py +++ b/src/emcee/autocorr.py @@ -49,7 +49,7 @@ def integrated_time(x, c=5, tol=50, quiet=False): """Estimate the integrated autocorrelation time of a time series. This estimate uses the iterative procedure described on page 16 of - `Sokal's notes <http://www.stat.unc.edu/faculty/cji/Sokal.pdf>`_ to + `Sokal's notes <https://www.semanticscholar.org/paper/Monte-Carlo-Methods-in-Statistical-Mechanics%3A-and-Sokal/0bfe9e3db30605fe2d4d26e1a288a5e2997e7225>`_ to determine a reasonable window size. Args: diff --git a/src/emcee/backends/hdf.py b/src/emcee/backends/hdf.py index d4e6d6c..9503512 100644 --- a/src/emcee/backends/hdf.py +++ b/src/emcee/backends/hdf.py @@ -2,7 +2,7 @@ from __future__ import division, print_function -__all__ = ["HDFBackend", "TempHDFBackend"] +__all__ = ["HDFBackend", "TempHDFBackend", "does_hdf5_support_longdouble"] import os from tempfile import NamedTemporaryFile @@ -19,6 +19,25 @@ except ImportError: h5py = None +def does_hdf5_support_longdouble(): + if h5py is None: + return False + with NamedTemporaryFile(prefix="emcee-temporary-hdf5", + suffix=".hdf5", + delete=False) as f: + f.close() + + with h5py.File(f.name, "w") as hf: + g = hf.create_group("group") + g.create_dataset("data", data=np.ones(1, dtype=np.longdouble)) + if g["data"].dtype != np.longdouble: + return False + with h5py.File(f.name, "r") as hf: + if hf["group"]["data"].dtype != np.longdouble: + return False + return True + + class HDFBackend(Backend): """A backend that stores the chain in an HDF5 file using h5py diff --git a/tox.ini b/tox.ini index 6c09ae3..9f72a99 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py{36,37} +envlist = py{36,37,38} [testenv] description = Unit tests
dfm/emcee
c14b212964cfc1543c41f0bd186cafb399e847f7
diff --git a/src/emcee/tests/integration/test_longdouble.py b/src/emcee/tests/integration/test_longdouble.py index a2142d5..b8d2c7a 100644 --- a/src/emcee/tests/integration/test_longdouble.py +++ b/src/emcee/tests/integration/test_longdouble.py @@ -2,6 +2,7 @@ import numpy as np import pytest import emcee +from emcee.backends.hdf import does_hdf5_support_longdouble, TempHDFBackend def test_longdouble_doesnt_crash_bug_312(): @@ -17,9 +18,11 @@ def test_longdouble_doesnt_crash_bug_312(): sampler.run_mcmc(p0, 100) [email protected]("cls", [emcee.backends.Backend, - emcee.backends.TempHDFBackend]) [email protected]("cls", emcee.backends.get_test_backends()) def test_longdouble_actually_needed(cls): + if (issubclass(cls, TempHDFBackend) + and not does_hdf5_support_longdouble()): + pytest.xfail("HDF5 does not support long double on this platform") mjd = np.longdouble(58000.) sigma = 100*np.finfo(np.longdouble).eps*mjd diff --git a/src/emcee/tests/unit/test_backends.py b/src/emcee/tests/unit/test_backends.py index e5466ec..370008e 100644 --- a/src/emcee/tests/unit/test_backends.py +++ b/src/emcee/tests/unit/test_backends.py @@ -2,12 +2,18 @@ import os from itertools import product +from tempfile import NamedTemporaryFile -import h5py import numpy as np import pytest from emcee import EnsembleSampler, backends, State +from emcee.backends.hdf import does_hdf5_support_longdouble + +try: + import h5py +except ImportError: + h5py = None __all__ = ["test_backend", "test_reload"] @@ -55,6 +61,7 @@ def _custom_allclose(a, b): assert np.allclose(a[n], b[n]) [email protected](h5py is None, reason="HDF5 not available") def test_uninit(tmpdir): fn = str(tmpdir.join("EMCEE_TEST_FILE_DO_NOT_USE.h5")) if os.path.exists(fn): @@ -208,6 +215,7 @@ def test_restart(backend, dtype): assert np.allclose(a, b), "inconsistent acceptance fraction" [email protected](h5py is None, reason="HDF5 not available") def test_multi_hdf5(): with backends.TempHDFBackend() as backend1: run_sampler(backend1) @@ -227,6 +235,9 @@ def test_multi_hdf5(): @pytest.mark.parametrize("backend", all_backends) def test_longdouble_preserved(backend): + if (issubclass(backend, backends.TempHDFBackend) + and not does_hdf5_support_longdouble()): + pytest.xfail("HDF5 does not support long double on this platform") nwalkers = 10 ndim = 2 nsteps = 5 @@ -252,14 +263,3 @@ def test_longdouble_preserved(backend): assert s.log_prob.dtype == np.longdouble assert np.all(s.log_prob == lp) - - -def test_hdf5_dtypes(): - nwalkers = 10 - ndim = 2 - with backends.TempHDFBackend(dtype=np.longdouble) as b: - assert b.dtype == np.longdouble - b.reset(nwalkers, ndim) - with h5py.File(b.filename, "r") as f: - g = f["test"] - assert g["chain"].dtype == np.longdouble
long double tests fail on ppc64el **General information:** - emcee version: 3.0.2 - platform: ppc64el - installation method (pip/conda/source/other?): Ubuntu/Debian package **Problem description:** Version 3.0.2 of emcee is not migrating to the release pocket of Ubuntu because tests are failing on ppc64el: https://autopkgtest.ubuntu.com/packages/e/emcee/groovy/ppc64el ### Expected behavior tests pass ### Actual behavior: test_longdouble_actually_needed[TempHDFBackend] and test_longdouble_preserved[TempHDFBackend] fail: ``` _______________ test_longdouble_actually_needed[TempHDFBackend] ________________ cls = <class 'emcee.backends.hdf.TempHDFBackend'> @pytest.mark.parametrize("cls", [emcee.backends.Backend, emcee.backends.TempHDFBackend]) def test_longdouble_actually_needed(cls): mjd = np.longdouble(58000.) sigma = 100*np.finfo(np.longdouble).eps*mjd def log_prob(x): assert x.dtype == np.longdouble return -0.5 * np.sum(((x-mjd)/sigma) ** 2) ndim, nwalkers = 1, 20 steps = 1000 p0 = sigma*np.random.randn(nwalkers, ndim).astype(np.longdouble) + mjd assert not all(p0 == mjd) with cls(dtype=np.longdouble) as backend: sampler = emcee.EnsembleSampler(nwalkers, ndim, log_prob, backend=backend) sampler.run_mcmc(p0, steps) samples = sampler.get_chain().reshape((-1,)) > assert samples.dtype == np.longdouble E AssertionError: assert dtype('<f8') == <class 'numpy.float128'> E + where dtype('<f8') = array([ 5.80000000e+04, -4.60105223e-27, 5.80000000e+04, ...,\n -6.24580733e-26, 5.80000000e+04, -7.38930048e-27]).dtype E + and <class 'numpy.float128'> = np.longdouble ``` (the other failure is similar) ### What have you tried so far? Googling and getting a headache :) I know that "long double" on PowerPC / POWER is a strange pair-of-64-bit-doubles type so I'm not surprised that it's on POWER that I see the problem. I also see from searching that hd5/h5py/numpy have a history of problems in this area (e.g. https://github.com/h5py/h5py/issues/817) so I'm not sure what the resolution should be. Skipping these tests on ppc64el for now (maybe in an Ubuntu specific patch) might make sense -- it's not like the failure of these new tests indicates any kind of regression.
0.0
c14b212964cfc1543c41f0bd186cafb399e847f7
[ "src/emcee/tests/integration/test_longdouble.py::test_longdouble_actually_needed[Backend]", "src/emcee/tests/unit/test_backends.py::test_longdouble_preserved[Backend]" ]
[]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2020-08-18 14:48:36+00:00
mit
1,899
dfm__emcee-386
diff --git a/src/emcee/ensemble.py b/src/emcee/ensemble.py index 45cc4ba..24faba3 100644 --- a/src/emcee/ensemble.py +++ b/src/emcee/ensemble.py @@ -1,9 +1,10 @@ # -*- coding: utf-8 -*- import warnings +from itertools import count +from typing import Dict, List, Optional, Union import numpy as np -from itertools import count from .backends import Backend from .model import Model @@ -61,6 +62,10 @@ class EnsembleSampler(object): to accept a list of position vectors instead of just one. Note that ``pool`` will be ignored if this is ``True``. (default: ``False``) + parameter_names (Optional[Union[List[str], Dict[str, List[int]]]]): + names of individual parameters or groups of parameters. If + specified, the ``log_prob_fn`` will recieve a dictionary of + parameters, rather than a ``np.ndarray``. """ @@ -76,6 +81,7 @@ class EnsembleSampler(object): backend=None, vectorize=False, blobs_dtype=None, + parameter_names: Optional[Union[Dict[str, int], List[str]]] = None, # Deprecated... a=None, postargs=None, @@ -157,6 +163,49 @@ class EnsembleSampler(object): # ``args`` and ``kwargs`` pickleable. self.log_prob_fn = _FunctionWrapper(log_prob_fn, args, kwargs) + # Save the parameter names + self.params_are_named: bool = parameter_names is not None + if self.params_are_named: + assert isinstance(parameter_names, (list, dict)) + + # Don't support vectorizing yet + msg = "named parameters with vectorization unsupported for now" + assert not self.vectorize, msg + + # Check for duplicate names + dupes = set() + uniq = [] + for name in parameter_names: + if name not in dupes: + uniq.append(name) + dupes.add(name) + msg = f"duplicate paramters: {dupes}" + assert len(uniq) == len(parameter_names), msg + + if isinstance(parameter_names, list): + # Check for all named + msg = "name all parameters or set `parameter_names` to `None`" + assert len(parameter_names) == ndim, msg + # Convert a list to a dict + parameter_names: Dict[str, int] = { + name: i for i, name in enumerate(parameter_names) + } + + # Check not too many names + msg = "too many names" + assert len(parameter_names) <= ndim, msg + + # Check all indices appear + values = [ + v if isinstance(v, list) else [v] + for v in parameter_names.values() + ] + values = [item for sublist in values for item in sublist] + values = set(values) + msg = f"not all values appear -- set should be 0 to {ndim-1}" + assert values == set(np.arange(ndim)), msg + self.parameter_names = parameter_names + @property def random_state(self): """ @@ -251,8 +300,9 @@ class EnsembleSampler(object): raise ValueError("'store' must be False when 'iterations' is None") # Interpret the input as a walker state and check the dimensions. state = State(initial_state, copy=True) - if np.shape(state.coords) != (self.nwalkers, self.ndim): - raise ValueError("incompatible input dimensions") + state_shape = np.shape(state.coords) + if state_shape != (self.nwalkers, self.ndim): + raise ValueError(f"incompatible input dimensions {state_shape}") if (not skip_initial_state_check) and ( not walkers_independent(state.coords) ): @@ -416,6 +466,10 @@ class EnsembleSampler(object): if np.any(np.isnan(p)): raise ValueError("At least one parameter value was NaN") + # If the parmaeters are named, then switch to dictionaries + if self.params_are_named: + p = ndarray_to_list_of_dicts(p, self.parameter_names) + # Run the log-probability calculations (optionally in parallel). if self.vectorize: results = self.log_prob_fn(p) @@ -427,9 +481,7 @@ class EnsembleSampler(object): map_func = self.pool.map else: map_func = map - results = list( - map_func(self.log_prob_fn, (p[i] for i in range(len(p)))) - ) + results = list(map_func(self.log_prob_fn, p)) try: log_prob = np.array([float(l[0]) for l in results]) @@ -444,8 +496,9 @@ class EnsembleSampler(object): else: try: with warnings.catch_warnings(record=True): - warnings.simplefilter("error", - np.VisibleDeprecationWarning) + warnings.simplefilter( + "error", np.VisibleDeprecationWarning + ) try: dt = np.atleast_1d(blob[0]).dtype except Warning: @@ -455,7 +508,8 @@ class EnsembleSampler(object): "placed in an object array. Numpy has " "deprecated this automatic detection, so " "please specify " - "blobs_dtype=np.dtype('object')") + "blobs_dtype=np.dtype('object')" + ) dt = np.dtype("object") except ValueError: dt = np.dtype("object") @@ -557,8 +611,8 @@ class _FunctionWrapper(object): def __init__(self, f, args, kwargs): self.f = f - self.args = [] if args is None else args - self.kwargs = {} if kwargs is None else kwargs + self.args = args or [] + self.kwargs = kwargs or {} def __call__(self, x): try: @@ -605,3 +659,22 @@ def _scaled_cond(a): return np.inf c = b / bsum return np.linalg.cond(c.astype(float)) + + +def ndarray_to_list_of_dicts( + x: np.ndarray, + key_map: Dict[str, Union[int, List[int]]], +) -> List[Dict[str, Union[np.number, np.ndarray]]]: + """ + A helper function to convert a ``np.ndarray`` into a list + of dictionaries of parameters. Used when parameters are named. + + Args: + x (np.ndarray): parameter array of shape ``(N, n_dim)``, where + ``N`` is an integer + key_map (Dict[str, Union[int, List[int]]): + + Returns: + list of dictionaries of parameters + """ + return [{key: xi[val] for key, val in key_map.items()} for xi in x]
dfm/emcee
f0489d74250e2034d76c3a812b9afae74c9ca191
diff --git a/src/emcee/tests/unit/test_ensemble.py b/src/emcee/tests/unit/test_ensemble.py new file mode 100644 index 0000000..f6f5ad2 --- /dev/null +++ b/src/emcee/tests/unit/test_ensemble.py @@ -0,0 +1,184 @@ +""" +Unit tests of some functionality in ensemble.py when the parameters are named +""" +import string +from unittest import TestCase + +import numpy as np +import pytest + +from emcee.ensemble import EnsembleSampler, ndarray_to_list_of_dicts + + +class TestNP2ListOfDicts(TestCase): + def test_ndarray_to_list_of_dicts(self): + # Try different numbers of keys + for n_keys in [1, 2, 10, 26]: + keys = list(string.ascii_lowercase[:n_keys]) + key_set = set(keys) + key_dict = {key: i for i, key in enumerate(keys)} + # Try different number of walker/procs + for N in [1, 2, 3, 10, 100]: + x = np.random.rand(N, n_keys) + + LOD = ndarray_to_list_of_dicts(x, key_dict) + assert len(LOD) == N, "need 1 dict per row" + for i, dct in enumerate(LOD): + assert dct.keys() == key_set, "keys are missing" + for j, key in enumerate(keys): + assert dct[key] == x[i, j], f"wrong value at {(i, j)}" + + +class TestNamedParameters(TestCase): + """ + Test that a keyword-based log-probability function instead of + a positional. + """ + + # Keyword based lnpdf + def lnpdf(self, pars) -> np.float64: + mean = pars["mean"] + var = pars["var"] + if var <= 0: + return -np.inf + return ( + -0.5 * ((mean - self.x) ** 2 / var + np.log(2 * np.pi * var)).sum() + ) + + def lnpdf_mixture(self, pars) -> np.float64: + mean1 = pars["mean1"] + var1 = pars["var1"] + mean2 = pars["mean2"] + var2 = pars["var2"] + if var1 <= 0 or var2 <= 0: + return -np.inf + return ( + -0.5 + * ( + (mean1 - self.x) ** 2 / var1 + + np.log(2 * np.pi * var1) + + (mean2 - self.x - 3) ** 2 / var2 + + np.log(2 * np.pi * var2) + ).sum() + ) + + def lnpdf_mixture_grouped(self, pars) -> np.float64: + mean1, mean2 = pars["means"] + var1, var2 = pars["vars"] + const = pars["constant"] + if var1 <= 0 or var2 <= 0: + return -np.inf + return ( + -0.5 + * ( + (mean1 - self.x) ** 2 / var1 + + np.log(2 * np.pi * var1) + + (mean2 - self.x - 3) ** 2 / var2 + + np.log(2 * np.pi * var2) + ).sum() + + const + ) + + def setUp(self): + # Draw some data from a unit Gaussian + self.x = np.random.randn(100) + self.names = ["mean", "var"] + + def test_named_parameters(self): + sampler = EnsembleSampler( + nwalkers=10, + ndim=len(self.names), + log_prob_fn=self.lnpdf, + parameter_names=self.names, + ) + assert sampler.params_are_named + assert list(sampler.parameter_names.keys()) == self.names + + def test_asserts(self): + # ndim name mismatch + with pytest.raises(AssertionError): + _ = EnsembleSampler( + nwalkers=10, + ndim=len(self.names) - 1, + log_prob_fn=self.lnpdf, + parameter_names=self.names, + ) + + # duplicate names + with pytest.raises(AssertionError): + _ = EnsembleSampler( + nwalkers=10, + ndim=3, + log_prob_fn=self.lnpdf, + parameter_names=["a", "b", "a"], + ) + + # vectorize turned on + with pytest.raises(AssertionError): + _ = EnsembleSampler( + nwalkers=10, + ndim=len(self.names), + log_prob_fn=self.lnpdf, + parameter_names=self.names, + vectorize=True, + ) + + def test_compute_log_prob(self): + # Try different numbers of walkers + for N in [4, 8, 10]: + sampler = EnsembleSampler( + nwalkers=N, + ndim=len(self.names), + log_prob_fn=self.lnpdf, + parameter_names=self.names, + ) + coords = np.random.rand(N, len(self.names)) + lnps, _ = sampler.compute_log_prob(coords) + assert len(lnps) == N + assert lnps.dtype == np.float64 + + def test_compute_log_prob_mixture(self): + names = ["mean1", "var1", "mean2", "var2"] + # Try different numbers of walkers + for N in [8, 10, 20]: + sampler = EnsembleSampler( + nwalkers=N, + ndim=len(names), + log_prob_fn=self.lnpdf_mixture, + parameter_names=names, + ) + coords = np.random.rand(N, len(names)) + lnps, _ = sampler.compute_log_prob(coords) + assert len(lnps) == N + assert lnps.dtype == np.float64 + + def test_compute_log_prob_mixture_grouped(self): + names = {"means": [0, 1], "vars": [2, 3], "constant": 4} + # Try different numbers of walkers + for N in [8, 10, 20]: + sampler = EnsembleSampler( + nwalkers=N, + ndim=5, + log_prob_fn=self.lnpdf_mixture_grouped, + parameter_names=names, + ) + coords = np.random.rand(N, 5) + lnps, _ = sampler.compute_log_prob(coords) + assert len(lnps) == N + assert lnps.dtype == np.float64 + + def test_run_mcmc(self): + # Sort of an integration test + n_walkers = 4 + sampler = EnsembleSampler( + nwalkers=n_walkers, + ndim=len(self.names), + log_prob_fn=self.lnpdf, + parameter_names=self.names, + ) + guess = np.random.rand(n_walkers, len(self.names)) + n_steps = 50 + results = sampler.run_mcmc(guess, n_steps) + assert results.coords.shape == (n_walkers, len(self.names)) + chain = sampler.chain + assert chain.shape == (n_walkers, n_steps, len(self.names))
[ENH] support for dictionaries and/or namedtuples ## Proposal The sampler API shares a lot of features with `scipy.optimize.minimize` -- given a model that can be typed as `Callable(List,...)` keep proposing samples to improve the model. This is fine for many problems, but one can imagine a scenario where it would be useful for model developers to handle samples with more than just a `List`. Handling parameters in a `List` means that writing a posterior *requires defining parameters positionally*. In contrast, in packages like pytorch one can refer to model parameters by name (eg. a `torch.nn.Linear` has a `weight` and `bias` named parameters). This issue proposes enhancing the emcee API to allow for dictionary and/or namedtuple parameter constructs. Looking at the API for the `EnsembleSampler`, this would require an additional constructor argument, since the sampler does not inspect the state of the `log_prob_fn`. Here is a minimum proposed implementation for supporting a dictionary: ```python class EnsembleSampler(object): def __init__( self, nwalkers: int, ndim: int, log_prob_fn: Callable(Union[List, Dict]), parameter_names: Optional[List[str]] = None, ... ): ... # Save the names self.parameter_names = parameter_names self.name_parameters: bool = parameter_names is not None if self.name_parameters: assert len(parameter_names) == ndim, f"names must match dimensions" ... def sample(...): ... with get_progress_bar(progress, total) as pbar: i = 0 for _ in count() if iterations is None else range(iterations): for _ in range(yield_step): ... # If our parameters are named, return them in a named format if self.name_parameters: state = {key: value for key, value in zip(self.parameter_names, state)} yield state ``` This allows for a lot more flexibility downstream for model developers. As a simple example, consider a model composed of two parts, that each can be updated in a way that doesn't affect the higher level model: ```python class PartA: __slots__ = ["param_a"] param_a: float def __call__(self): ... class PartB: __slots__ = ["param_b"] param_b: float def __call__(self): ... class MyModel: def __init__(self, a = PartA(), b = PartB()): self.a = a self.b = b def log_likelihood_fn(self, params: Dict[str, float]): # Update the composed parts of the model for key in self.a.__slots__: setattr(self.a, params[key]) for key in self.b.__slots__: setattr(self.b, params[key]) # Final likelihood uses the results of A and B, but we don't # care how they are implemented return f(self.a(), self.b()) ``` If this sounds like an attractive feature I would be happy to work on a PR.
0.0
f0489d74250e2034d76c3a812b9afae74c9ca191
[ "src/emcee/tests/unit/test_ensemble.py::TestNP2ListOfDicts::test_ndarray_to_list_of_dicts", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_asserts", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_compute_log_prob", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_compute_log_prob_mixture", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_compute_log_prob_mixture_grouped", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_named_parameters", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_run_mcmc" ]
[]
{ "failed_lite_validators": [ "has_many_hunks", "has_pytest_match_arg" ], "has_test_patch": true, "is_lite": false }
2021-04-24 22:21:11+00:00
mit
1,900
dfm__emcee-510
diff --git a/src/emcee/ensemble.py b/src/emcee/ensemble.py index 3212099..cfef4a5 100644 --- a/src/emcee/ensemble.py +++ b/src/emcee/ensemble.py @@ -489,10 +489,19 @@ class EnsembleSampler(object): results = list(map_func(self.log_prob_fn, p)) try: - log_prob = np.array([float(l[0]) for l in results]) - blob = [l[1:] for l in results] + # perhaps log_prob_fn returns blobs? + + # deal with the blobs first + # if l does not have a len attribute (i.e. not a sequence, no blob) + # then a TypeError is raised. However, no error will be raised if + # l is a length-1 array, np.array([1.234]). In that case blob + # will become an empty list. + blob = [l[1:] for l in results if len(l) > 1] + if not len(blob): + raise IndexError + log_prob = np.array([_scalar(l[0]) for l in results]) except (IndexError, TypeError): - log_prob = np.array([float(l) for l in results]) + log_prob = np.array([_scalar(l) for l in results]) blob = None else: # Get the blobs dtype @@ -502,7 +511,7 @@ class EnsembleSampler(object): try: with warnings.catch_warnings(record=True): warnings.simplefilter( - "error", np.VisibleDeprecationWarning + "error", np.exceptions.VisibleDeprecationWarning ) try: dt = np.atleast_1d(blob[0]).dtype @@ -682,3 +691,16 @@ def ndarray_to_list_of_dicts( list of dictionaries of parameters """ return [{key: xi[val] for key, val in key_map.items()} for xi in x] + + +def _scalar(fx): + # Make sure a value is a true scalar + # 1.0, np.float64(1.0), np.array([1.0]), np.array(1.0) + if not np.isscalar(fx): + try: + fx = np.asarray(fx).item() + except (TypeError, ValueError) as e: + raise ValueError("log_prob_fn should return scalar") from e + return float(fx) + else: + return float(fx) diff --git a/tox.ini b/tox.ini index d759fa6..c566174 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,12 @@ [tox] -envlist = py{37,38,39,310}{,-extras},lint +envlist = py{39,310,311,312}{,-extras},lint [gh-actions] python = - 3.7: py37 - 3.8: py38 - 3.9: py39-extras + 3.9: py39 3.10: py310 + 3.11: py311-extras + 3.12: py312 [testenv] deps = coverage[toml]
dfm/emcee
b68933df3df80634cf133cab7e92db0458fffe13
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a3dc22..063f0c0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,7 +16,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10", "3.11", "3.12"] os: ["ubuntu-latest"] include: - python-version: "3.9" @@ -49,6 +49,30 @@ jobs: COVERALLS_PARALLEL: true COVERALLS_FLAG_NAME: ${{ matrix.python-version }}-${{ matrix.os }} + leading_edge: + runs-on: ${{ matrix.os }} + strategy: + matrix: + python-version: ["3.12"] + os: ["ubuntu-latest"] + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install -U pip + python -m pip install pip install pytest "numpy>=2.0.0rc1" + python -m pip install -e. + - name: Run tests + run: pytest + coverage: needs: tests runs-on: ubuntu-latest diff --git a/src/emcee/tests/unit/test_ensemble.py b/src/emcee/tests/unit/test_ensemble.py index f0568b2..e7981c8 100644 --- a/src/emcee/tests/unit/test_ensemble.py +++ b/src/emcee/tests/unit/test_ensemble.py @@ -183,3 +183,37 @@ class TestNamedParameters(TestCase): assert results.coords.shape == (n_walkers, len(self.names)) chain = sampler.chain assert chain.shape == (n_walkers, n_steps, len(self.names)) + + +class TestLnProbFn(TestCase): + # checks that the log_prob_fn can deal with a variety of 'scalar-likes' + def lnpdf(self, x): + v = np.log(np.sqrt(np.pi) * np.exp(-((x / 2.0) ** 2))) + v = float(v[0]) + assert np.isscalar(v) + return v + + def lnpdf_arr1(self, x): + v = self.lnpdf(x) + return np.array([v]) + + def lnpdf_float64(self, x): + v = self.lnpdf(x) + return np.float64(v) + + def lnpdf_arr0D(self, x): + v = self.lnpdf(x) + return np.array(v) + + def test_deal_with_scalar_likes(self): + rng = np.random.default_rng() + fns = [ + self.lnpdf, + self.lnpdf_arr1, + self.lnpdf_float64, + self.lnpdf_arr0D, + ] + for fn in fns: + init = rng.random((50, 1)) + sampler = EnsembleSampler(50, 1, fn) + _ = sampler.run_mcmc(initial_state=init, nsteps=20)
Incompatible with numpy 2.0.0rc1 Numpy 2 is around the corner with having its first release candidate: https://pypi.org/project/numpy/2.0.0rc1 `emcee` at least uses `VisibleDeprecationWarning` from numpy that will be removed with numpy 2: https://numpy.org/devdocs/release/2.0.0-notes.html > Warnings and exceptions present in [numpy.exceptions](https://numpy.org/devdocs/reference/routines.exceptions.html#module-numpy.exceptions) (e.g, [ComplexWarning](https://numpy.org/devdocs/reference/generated/numpy.exceptions.ComplexWarning.html#numpy.exceptions.ComplexWarning), [VisibleDeprecationWarning](https://numpy.org/devdocs/reference/generated/numpy.exceptions.VisibleDeprecationWarning.html#numpy.exceptions.VisibleDeprecationWarning)) are no longer exposed in the main namespace. So with the release of numpy 2, emcee will run into some troubles.
0.0
b68933df3df80634cf133cab7e92db0458fffe13
[ "src/emcee/tests/unit/test_ensemble.py::TestLnProbFn::test_deal_with_scalar_likes" ]
[ "src/emcee/tests/unit/test_ensemble.py::TestNP2ListOfDicts::test_ndarray_to_list_of_dicts", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_asserts", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_compute_log_prob", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_compute_log_prob_mixture", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_compute_log_prob_mixture_grouped", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_named_parameters", "src/emcee/tests/unit/test_ensemble.py::TestNamedParameters::test_run_mcmc" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2024-04-04 22:01:34+00:00
mit
1,901
dfm__tess-atlas-108
diff --git a/setup.py b/setup.py index 0a7c68b..dabe2f7 100644 --- a/setup.py +++ b/setup.py @@ -31,15 +31,17 @@ INSTALL_REQUIRES = [ "lightkurve>=2.0.11", "plotly>=4.9.0", "arviz>=0.10.0", - "corner", + "corner>=2.2.1", "pandas", "jupyter", "ipykernel", - "jupytext", + "jupytext<1.11,>=1.8", # pinned for jypyter-book "kaleido", "aesara-theano-fallback", "theano-pymc>=1.1.2", "jupyter-book", + "seaborn", + "jupyter_client==6.1.12", # pinned beacuse of nbconvert bug https://github.com/jupyter/nbconvert/pull/1549#issuecomment-818734169 ] EXTRA_REQUIRE = {"test": ["pytest>=3.6", "testbook>=0.2.3"]} EXTRA_REQUIRE["dev"] = EXTRA_REQUIRE["test"] + [ @@ -101,6 +103,7 @@ if __name__ == "__main__": "run_tois=tess_atlas.notebook_preprocessors.run_tois:main", "runs_stats_plotter=tess_atlas.analysis.stats_plotter:main", "make_webpages=tess_atlas.webbuilder.build_pages:main", + "make_slurm_job=tess_atlas.batch_job_generator.slurm_job_generator:main", ] }, ) diff --git a/src/tess_atlas/batch_job_generator/__init__.py b/src/tess_atlas/batch_job_generator/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/src/tess_atlas/batch_job_generator/slurm_job_generator.py b/src/tess_atlas/batch_job_generator/slurm_job_generator.py new file mode 100644 index 0000000..a1ed5a4 --- /dev/null +++ b/src/tess_atlas/batch_job_generator/slurm_job_generator.py @@ -0,0 +1,67 @@ +import argparse +import os +import shutil +from typing import List + +import pandas as pd + +TEMPLATE_FILE = os.path.join(os.path.dirname(__file__), "slurm_template.sh") + + +def make_slurm_file(outdir: str, toi_numbers: List[int], module_loads: str): + with open(TEMPLATE_FILE, "r") as f: + file_contents = f.read() + outdir = os.path.abspath(outdir) + logfile_name = os.path.join(outdir, "toi_slurm_jobs.log") + jobfile_name = os.path.join(outdir, "slurm_job.sh") + path_to_python = shutil.which("python") + path_to_env_activate = path_to_python.replace("python", "activate") + file_contents = file_contents.replace( + "{{{TOTAL NUM}}}", str(len(toi_numbers) - 1) + ) + file_contents = file_contents.replace("{{{MODULE LOADS}}}", module_loads) + file_contents = file_contents.replace("{{{OUTDIR}}}", outdir) + file_contents = file_contents.replace( + "{{{LOAD ENV}}}", f"source {path_to_env_activate}" + ) + file_contents = file_contents.replace("{{{LOG FILE}}}", logfile_name) + toi_str = " ".join([str(toi) for toi in toi_numbers]) + file_contents = file_contents.replace("{{{TOI NUMBERS}}}", toi_str) + with open(jobfile_name, "w") as f: + f.write(file_contents) + print(f"Jobfile created, to run job: \nsbatch {jobfile_name}") + + +def get_toi_numbers(toi_csv: str): + df = pd.read_csv(toi_csv) + return list(df.toi_numbers.values) + + +def get_cli_args(): + parser = argparse.ArgumentParser( + description="Create slurm job for analysing TOIs" + ) + parser.add_argument( + "--toi_csv", + help="CSV with the toi numbers to analyse (csv needs a column with `toi_numbers`)", + ) + parser.add_argument( + "--outdir", help="outdir for jobs", default="notebooks" + ) + parser.add_argument( + "--module_loads", + help="String containing all module loads in one line (each module separated by a space)", + ) + args = parser.parse_args() + return args.toi_csv, args.outdir, args.module_loads + + +def main(): + toi_csv, outdir, module_loads = get_cli_args() + os.makedirs(outdir, exist_ok=True) + toi_numbers = get_toi_numbers(toi_csv) + make_slurm_file(outdir, toi_numbers, module_loads) + + +if __name__ == "__main__": + main() diff --git a/src/tess_atlas/batch_job_generator/slurm_template.sh b/src/tess_atlas/batch_job_generator/slurm_template.sh new file mode 100644 index 0000000..250c930 --- /dev/null +++ b/src/tess_atlas/batch_job_generator/slurm_template.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +#SBATCH --job-name=run_tois +#SBATCH --output={{{LOG FILE}}} +# +#SBATCH --ntasks=1 +#SBATCH --time=300:00 +#SBATCH --mem-per-cpu=500MB +# +#SBATCH --array=0-{{{TOTAL NUM}}} + +module load {{{MODULE LOADS}}} +{{{LOAD ENV}}} + + +TOI_NUMBERS=({{{TOI NUMBERS}}}) + +srun run_toi ${TOI_NUMBERS[$SLURM_ARRAY_TASK_ID]} --outdir {{{OUTDIR}}} diff --git a/src/tess_atlas/notebook_preprocessors/run_toi.py b/src/tess_atlas/notebook_preprocessors/run_toi.py index 1f17ba7..a76c4f5 100644 --- a/src/tess_atlas/notebook_preprocessors/run_toi.py +++ b/src/tess_atlas/notebook_preprocessors/run_toi.py @@ -87,7 +87,7 @@ def execute_toi_notebook(notebook_filename): def get_cli_args(): """Get the TOI number from the CLI and return it""" - parser = argparse.ArgumentParser(prog="run_toi_in_pool") + parser = argparse.ArgumentParser(prog="run_toi") default_outdir = os.path.join(os.getcwd(), "notebooks") parser.add_argument( "toi_number", type=int, help="The TOI number to be analysed (e.g. 103)"
dfm/tess-atlas
6274de545082661de3677fb609fa7274f26afb47
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d45d0c3..ca420da 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,7 +26,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install --use-feature=2020-resolver -U -e ".[dev]" + pip install -U -e ".[dev]" # Test the py:light -> ipynb -> py:light round trip conversion - name: roundtrip conversion test diff --git a/tests/test_slurm_job_generator.py b/tests/test_slurm_job_generator.py new file mode 100644 index 0000000..59a582a --- /dev/null +++ b/tests/test_slurm_job_generator.py @@ -0,0 +1,24 @@ +import os +import unittest + +from tess_atlas.batch_job_generator.slurm_job_generator import make_slurm_file + + +class JobgenTest(unittest.TestCase): + def setUp(self): + self.start_dir = os.getcwd() + self.outdir = f"test_jobgen" + os.makedirs(self.outdir, exist_ok=True) + + def tearDown(self): + import shutil + + if os.path.exists(self.outdir): + shutil.rmtree(self.outdir) + + def test_slurmfile(self): + make_slurm_file(self.outdir, [100, 101, 102], "module load 1") + + +if __name__ == "__main__": + unittest.main()
Cluster jobs failing to pre-process notebooks: TypeError: 'coroutine' object is not subscriptable
0.0
6274de545082661de3677fb609fa7274f26afb47
[ "tests/test_slurm_job_generator.py::JobgenTest::test_slurmfile" ]
[]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_added_files", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2021-10-06 02:54:35+00:00
mit
1,902
dgasmith__opt_einsum-11
diff --git a/README.md b/README.md index a792df7..9e4ed20 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,35 @@ True By contracting terms in the correct order we can see that this expression can be computed with N^4 scaling. Even with the overhead of finding the best order or 'path' and small dimensions, opt_einsum is roughly 900 times faster than pure einsum for this expression. + +## Reusing paths using ``contract_expression`` + +If you expect to repeatedly use a particular contraction it can make things simpler and more efficient to not compute the path each time. Instead, supplying ``contract_expression`` with the contraction string and the shapes of the tensors generates a ``ContractExpression`` which can then be repeatedly called with any matching set of arrays. For example: + +```python +>>> my_expr = oe.contract_expression("abc,cd,dbe->ea", (2, 3, 4), (4, 5), (5, 3, 6)) +>>> print(my_expr) +<ContractExpression> for 'abc,cd,dbe->ea': + 1. 'dbe,cd->bce' [GEMM] + 2. 'bce,abc->ea' [GEMM] +``` + +Now we can call this expression with 3 arrays that match the original shapes without having to compute the path again: + +```python +>>> x, y, z = (np.random.rand(*s) for s in [(2, 3, 4), (4, 5), (5, 3, 6)]) +>>> my_expr(x, y, z) +array([[ 3.08331541, 4.13708916], + [ 2.92793729, 4.57945185], + [ 3.55679457, 5.56304115], + [ 2.6208398 , 4.39024187], + [ 3.66736543, 5.41450334], + [ 3.67772272, 5.46727192]]) +``` + +Note that few checks are performed when calling the expression, and while it will work for a set of arrays with the same ranks as the original shapes but differing sizes, it might no longer be optimal. + + ## More details on paths Finding the optimal order of contraction is not an easy problem and formally scales factorially with respect to the number of terms in the expression. First, lets discuss what a path looks like in opt_einsum: diff --git a/opt_einsum/__init__.py b/opt_einsum/__init__.py index 2b3430f..16c844a 100644 --- a/opt_einsum/__init__.py +++ b/opt_einsum/__init__.py @@ -1,4 +1,4 @@ -from .contract import contract, contract_path +from .contract import contract, contract_path, contract_expression from . import paths from . import blas from . import helpers diff --git a/opt_einsum/contract.py b/opt_einsum/contract.py index 43b78e9..4efb1a9 100644 --- a/opt_einsum/contract.py +++ b/opt_einsum/contract.py @@ -259,7 +259,7 @@ def contract_path(*operands, **kwargs): def contract(*operands, **kwargs): """ contract(subscripts, *operands, out=None, dtype=None, order='K', - casting='safe', use_blas=False, optimize=True, memory_limit=None) + casting='safe', use_blas=True, optimize=True, memory_limit=None) Evaluates the Einstein summation convention on the operands. A drop in replacment for NumPy's einsum function that optimizes the order of contraction @@ -323,14 +323,10 @@ def contract(*operands, **kwargs): See opt_einsum.contract_path or numpy.einsum """ - - # Grab non-einsum kwargs optimize_arg = kwargs.pop('optimize', True) if optimize_arg is True: optimize_arg = 'greedy' - use_blas = kwargs.pop('use_blas', True) - valid_einsum_kwargs = ['out', 'dtype', 'order', 'casting'] einsum_kwargs = {k: v for (k, v) in kwargs.items() if k in valid_einsum_kwargs} @@ -338,25 +334,38 @@ def contract(*operands, **kwargs): if optimize_arg is False: return np.einsum(*operands, **einsum_kwargs) - # Make sure all keywords are valid - valid_contract_kwargs = ['memory_limit', 'use_blas'] + valid_einsum_kwargs - unknown_kwargs = [k for (k, v) in kwargs.items() if k not in valid_contract_kwargs] + # Grab non-einsum kwargs + use_blas = kwargs.pop('use_blas', True) + memory_limit = kwargs.pop('memory_limit', None) + gen_expression = kwargs.pop('gen_expression', False) + + # Make sure remaining keywords are valid for einsum + unknown_kwargs = [k for (k, v) in kwargs.items() if k not in valid_einsum_kwargs] if len(unknown_kwargs): raise TypeError("Did not understand the following kwargs: %s" % unknown_kwargs) - # Special handeling if out is specified - specified_out = False - out_array = einsum_kwargs.pop('out', None) - if out_array is not None: - specified_out = True + if gen_expression: + full_str = operands[0] # Build the contraction list and operand - memory_limit = kwargs.pop('memory_limit', None) - operands, contraction_list = contract_path( *operands, path=optimize_arg, memory_limit=memory_limit, einsum_call=True, use_blas=use_blas) - handle_out = False + # check if performing contraction or just building expression + if gen_expression: + return ContractExpression(full_str, contraction_list, **einsum_kwargs) + + return _core_contract(operands, contraction_list, **einsum_kwargs) + + +def _core_contract(operands, contraction_list, **einsum_kwargs): + """Inner loop used to perform an actual contraction given the output + from a ``contract_path(..., einsum_call=True)`` call. + """ + + # Special handeling if out is specified + out_array = einsum_kwargs.pop('out', None) + specified_out = out_array is not None # Start contraction loop for num, contraction in enumerate(contraction_list): @@ -366,8 +375,7 @@ def contract(*operands, **kwargs): tmp_operands.append(operands.pop(x)) # Do we need to deal with the output? - if specified_out and ((num + 1) == len(contraction_list)): - handle_out = True + handle_out = specified_out and ((num + 1) == len(contraction_list)) # Call tensordot if blas: @@ -412,3 +420,104 @@ def contract(*operands, **kwargs): return out_array else: return operands[0] + + +class ContractExpression: + """Helper class for storing an explicit ``contraction_list`` which can + then be repeatedly called solely with the array arguments. + """ + + def __init__(self, contraction, contraction_list, **einsum_kwargs): + self.contraction = contraction + self.contraction_list = contraction_list + self.einsum_kwargs = einsum_kwargs + self.num_args = len(contraction.split('->')[0].split(',')) + + def __call__(self, *arrays, **kwargs): + if len(arrays) != self.num_args: + raise ValueError("This `ContractExpression` takes exactly %s array arguments " + "but received %s." % (self.num_args, len(arrays))) + + out = kwargs.pop('out', None) + if kwargs: + raise ValueError("The only valid keyword argument to a `ContractExpression` " + "call is `out=`. Got: %s." % kwargs) + + try: + return _core_contract(list(arrays), self.contraction_list, out=out, **self.einsum_kwargs) + except ValueError as err: + original_msg = "".join(err.args) if err.args else "" + msg = ("Internal error while evaluating `ContractExpression`. Note that few checks are performed" + " - the number and rank of the array arguments must match the original expression. " + "The internal error was: '%s'" % original_msg, ) + err.args = msg + raise + + def __repr__(self): + return "ContractExpression('%s')" % self.contraction + + def __str__(self): + s = "<ContractExpression> for '%s':" % self.contraction + for i, c in enumerate(self.contraction_list): + s += "\n %i. " % (i + 1) + s += "'%s'" % c[2] + (" [%s]" % c[-1] if c[-1] else "") + if self.einsum_kwargs: + s += "\neinsum_kwargs=%s" % self.einsum_kwargs + return s + + +class _ShapeOnly(np.ndarray): + """Dummy ``numpy.ndarray`` which has a shape only - for generating + contract expressions. + """ + + def __init__(self, shape): + self.shape = shape + + +def contract_expression(subscripts, *shapes, **kwargs): + """Generate an reusable expression for a given contraction with + specific shapes, which can for example be cached. + + Parameters + ---------- + subscripts : str + Specifies the subscripts for summation. + shapes : sequence of integer tuples + Shapes of the arrays to optimize the contraction for. + kwargs : + Passed on to ``contract_path`` or ``einsum``. See ``contract``. + + Returns + ------- + expr : ContractExpression + Callable with signature ``expr(*arrays)`` where the array's shapes + should match ``shapes``. + + Notes + ----- + - The `out` keyword argument should be supplied to the generated expression + rather than this function. + - The generated expression will work with any arrays which have + the same rank (number of dimensions) as the original shapes, however, if + the actual sizes are different, the expression may no longer be optimal. + + Examples + -------- + + >>> expr = contract_expression("ab,bc->ac", (3, 4), (4, 5)) + >>> a, b = np.random.rand(3, 4), np.random.rand(4, 5) + >>> c = expr(a, b) + >>> np.allclose(c, a @ b) + True + + """ + if not kwargs.get('optimize', True): + raise ValueError("Can only generate expressions for optimized contractions.") + + if kwargs.get('out', None) is not None: + raise ValueError("`out` should only be specified when calling a `ContractExpression`, not when building it.") + + dummy_arrays = [_ShapeOnly(s) for s in shapes] + + return contract(subscripts, *dummy_arrays, gen_expression=True, **kwargs)
dgasmith/opt_einsum
fd612f0966a555f8a9783669ad3842f2dbfd1462
diff --git a/tests/test_contract.py b/tests/test_contract.py index 016d784..6885522 100644 --- a/tests/test_contract.py +++ b/tests/test_contract.py @@ -5,7 +5,7 @@ Tets a series of opt_einsum contraction paths to ensure the results are the same from __future__ import division, absolute_import, print_function import numpy as np -from opt_einsum import contract, contract_path, helpers +from opt_einsum import contract, contract_path, helpers, contract_expression import pytest tests = [ @@ -127,3 +127,73 @@ def test_printing(): ein = contract_path(string, *views) assert len(ein[1]) == 729 + + [email protected]("string", tests) [email protected]("optimize", ['greedy', 'optimal']) [email protected]("use_blas", [False, True]) [email protected]("out_spec", [False, True]) +def test_contract_expressions(string, optimize, use_blas, out_spec): + views = helpers.build_views(string) + shapes = [view.shape for view in views] + expected = contract(string, *views, optimize=False, use_blas=False) + + expr = contract_expression( + string, *shapes, optimize=optimize, use_blas=use_blas) + + if out_spec and ("->" in string) and (string[-2:] != "->"): + out, = helpers.build_views(string.split('->')[1]) + expr(*views, out=out) + else: + out = expr(*views) + + assert np.allclose(out, expected) + + # check representations + assert string in expr.__repr__() + assert string in expr.__str__() + + +def test_contract_expression_checks(): + # check optimize needed + with pytest.raises(ValueError): + contract_expression("ab,bc->ac", (2, 3), (3, 4), optimize=False) + + # check sizes are still checked + with pytest.raises(ValueError): + contract_expression("ab,bc->ac", (2, 3), (3, 4), (42, 42)) + + # check if out given + out = np.empty((2, 4)) + with pytest.raises(ValueError): + contract_expression("ab,bc->ac", (2, 3), (3, 4), out=out) + + # check still get errors when wrong ranks supplied to expression + expr = contract_expression("ab,bc->ac", (2, 3), (3, 4)) + + # too few arguments + with pytest.raises(ValueError) as err: + expr(np.random.rand(2, 3)) + assert "`ContractExpression` takes exactly 2" in str(err) + + # too many arguments + with pytest.raises(ValueError) as err: + expr(np.random.rand(2, 3), np.random.rand(2, 3), np.random.rand(2, 3)) + assert "`ContractExpression` takes exactly 2" in str(err) + + # wrong shapes + with pytest.raises(ValueError) as err: + expr(np.random.rand(2, 3, 4), np.random.rand(3, 4)) + assert "Internal error while evaluating `ContractExpression`" in str(err) + with pytest.raises(ValueError) as err: + expr(np.random.rand(2, 4), np.random.rand(3, 4, 5)) + assert "Internal error while evaluating `ContractExpression`" in str(err) + with pytest.raises(ValueError) as err: + expr(np.random.rand(2, 3), np.random.rand(3, 4), + out=np.random.rand(2, 4, 6)) + assert "Internal error while evaluating `ContractExpression`" in str(err) + + # should only be able to specify out + with pytest.raises(ValueError) as err: + expr(np.random.rand(2, 3), np.random.rand(3, 4), order='F') + assert "only valid keyword argument to a `ContractExpression`" in str(err)
reusable einsum expressions Essentially, I'm using ``opt_einsum`` for some tensor network calculations, and a significant proportion of time is spent in ``contract_path``, even for relatively large sized tensors and pre-calculated paths. Specifically, a huge number of contractions with the same indices and shapes are performed over and over again and I already cache these using the path from ``contract_path``. However, it seems even with the path supplied, a large amount of time is spent parsing the input, in ``can_blas``, ``parse_einsum_input`` etc. My suggestion would be something like: ```python shapes = [(2, 3), (3, 4), (4, 5)] my_expr = einsum_expression("ab,bc,cd->ad", *shapes) for _ in many_repeats: ... x, y, z = (rand(s) for s in shapes) out = my_expr(x, y, z) ... ``` I.e. it would only accept arrays of the same dimensions (and probably an ``out`` argument) and would otherwise skip all parsing, using a ``contraction_list`` stored within the function. Anyway, I'm about to knock something up to test for myself, but thought it might be of more general interest.
0.0
fd612f0966a555f8a9783669ad3842f2dbfd1462
[ "tests/test_contract.py::test_compare[a,ab,abc->abc]", "tests/test_contract.py::test_compare[a,b,ab->ab]", "tests/test_contract.py::test_compare[ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_compare[ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_compare[abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_compare[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_compare[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_compare[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_compare[abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_compare[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_compare[chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_compare[chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_compare[bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_compare[ab,ab,c->]", "tests/test_contract.py::test_compare[ab,ab,c->c]", "tests/test_contract.py::test_compare[ab,ab,cd,cd->]", "tests/test_contract.py::test_compare[ab,ab,cd,cd->ac]", "tests/test_contract.py::test_compare[ab,ab,cd,cd->cd]", "tests/test_contract.py::test_compare[ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_compare[ab,cd,ef->abcdef]", "tests/test_contract.py::test_compare[ab,cd,ef->acdf]", "tests/test_contract.py::test_compare[ab,cd,de->abcde]", "tests/test_contract.py::test_compare[ab,cd,de->be]", "tests/test_contract.py::test_compare[ab,bcd,cd->abcd]", "tests/test_contract.py::test_compare[ab,bcd,cd->abd]", "tests/test_contract.py::test_compare[eb,cb,fb->cef]", "tests/test_contract.py::test_compare[dd,fb,be,cdb->cef]", "tests/test_contract.py::test_compare[bca,cdb,dbf,afc->]", "tests/test_contract.py::test_compare[dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_compare[fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_compare[abcd,ad]", "tests/test_contract.py::test_compare[ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_compare[baa,dcf,af,cde->be]", "tests/test_contract.py::test_compare[bd,db,eac->ace]", "tests/test_contract.py::test_compare[fff,fae,bef,def->abd]", "tests/test_contract.py::test_compare[efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_compare[ab,ab]", "tests/test_contract.py::test_compare[ab,ba]", "tests/test_contract.py::test_compare[abc,abc]", "tests/test_contract.py::test_compare[abc,bac]", "tests/test_contract.py::test_compare[abc,cba]", "tests/test_contract.py::test_compare[ab,bc]", "tests/test_contract.py::test_compare[ab,cb]", "tests/test_contract.py::test_compare[ba,bc]", "tests/test_contract.py::test_compare[ba,cb]", "tests/test_contract.py::test_compare[abcd,cd]", "tests/test_contract.py::test_compare[abcd,ab]", "tests/test_contract.py::test_compare[abcd,cdef]", "tests/test_contract.py::test_compare[abcd,cdef->feba]", "tests/test_contract.py::test_compare[abcd,efdc]", "tests/test_contract.py::test_compare[aab,bc->ac]", "tests/test_contract.py::test_compare[ab,bcc->ac]", "tests/test_contract.py::test_compare[aab,bcc->ac]", "tests/test_contract.py::test_compare[baa,bcc->ac]", "tests/test_contract.py::test_compare[aab,ccb->ac]", "tests/test_contract.py::test_compare[aab,fa,df,ecc->bde]", "tests/test_contract.py::test_compare[ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_compare[bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_compare[bb,ff,be->e]", "tests/test_contract.py::test_compare[bcb,bb,fc,fff->]", "tests/test_contract.py::test_compare[fbb,dfd,fc,fc->]", "tests/test_contract.py::test_compare[afd,ba,cc,dc->bf]", "tests/test_contract.py::test_compare[adb,bc,fa,cfc->d]", "tests/test_contract.py::test_compare[bbd,bda,fc,db->acf]", "tests/test_contract.py::test_compare[dba,ead,cad->bce]", "tests/test_contract.py::test_compare[aef,fbc,dca->bde]", "tests/test_contract.py::test_compare_blas[a,ab,abc->abc]", "tests/test_contract.py::test_compare_blas[a,b,ab->ab]", "tests/test_contract.py::test_compare_blas[ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_compare_blas[ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_compare_blas[abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_compare_blas[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_compare_blas[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_compare_blas[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_compare_blas[abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_compare_blas[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_compare_blas[chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_compare_blas[chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_compare_blas[bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_compare_blas[ab,ab,c->]", "tests/test_contract.py::test_compare_blas[ab,ab,c->c]", "tests/test_contract.py::test_compare_blas[ab,ab,cd,cd->]", "tests/test_contract.py::test_compare_blas[ab,ab,cd,cd->ac]", "tests/test_contract.py::test_compare_blas[ab,ab,cd,cd->cd]", "tests/test_contract.py::test_compare_blas[ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_compare_blas[ab,cd,ef->abcdef]", "tests/test_contract.py::test_compare_blas[ab,cd,ef->acdf]", "tests/test_contract.py::test_compare_blas[ab,cd,de->abcde]", "tests/test_contract.py::test_compare_blas[ab,cd,de->be]", "tests/test_contract.py::test_compare_blas[ab,bcd,cd->abcd]", "tests/test_contract.py::test_compare_blas[ab,bcd,cd->abd]", "tests/test_contract.py::test_compare_blas[eb,cb,fb->cef]", "tests/test_contract.py::test_compare_blas[dd,fb,be,cdb->cef]", "tests/test_contract.py::test_compare_blas[bca,cdb,dbf,afc->]", "tests/test_contract.py::test_compare_blas[dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_compare_blas[fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_compare_blas[abcd,ad]", "tests/test_contract.py::test_compare_blas[ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_compare_blas[baa,dcf,af,cde->be]", "tests/test_contract.py::test_compare_blas[bd,db,eac->ace]", "tests/test_contract.py::test_compare_blas[fff,fae,bef,def->abd]", "tests/test_contract.py::test_compare_blas[efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_compare_blas[ab,ab]", "tests/test_contract.py::test_compare_blas[ab,ba]", "tests/test_contract.py::test_compare_blas[abc,abc]", "tests/test_contract.py::test_compare_blas[abc,bac]", "tests/test_contract.py::test_compare_blas[abc,cba]", "tests/test_contract.py::test_compare_blas[ab,bc]", "tests/test_contract.py::test_compare_blas[ab,cb]", "tests/test_contract.py::test_compare_blas[ba,bc]", "tests/test_contract.py::test_compare_blas[ba,cb]", "tests/test_contract.py::test_compare_blas[abcd,cd]", "tests/test_contract.py::test_compare_blas[abcd,ab]", "tests/test_contract.py::test_compare_blas[abcd,cdef]", "tests/test_contract.py::test_compare_blas[abcd,cdef->feba]", "tests/test_contract.py::test_compare_blas[abcd,efdc]", "tests/test_contract.py::test_compare_blas[aab,bc->ac]", "tests/test_contract.py::test_compare_blas[ab,bcc->ac]", "tests/test_contract.py::test_compare_blas[aab,bcc->ac]", "tests/test_contract.py::test_compare_blas[baa,bcc->ac]", "tests/test_contract.py::test_compare_blas[aab,ccb->ac]", "tests/test_contract.py::test_compare_blas[aab,fa,df,ecc->bde]", "tests/test_contract.py::test_compare_blas[ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_compare_blas[bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_compare_blas[bb,ff,be->e]", "tests/test_contract.py::test_compare_blas[bcb,bb,fc,fff->]", "tests/test_contract.py::test_compare_blas[fbb,dfd,fc,fc->]", "tests/test_contract.py::test_compare_blas[afd,ba,cc,dc->bf]", "tests/test_contract.py::test_compare_blas[adb,bc,fa,cfc->d]", "tests/test_contract.py::test_compare_blas[bbd,bda,fc,db->acf]", "tests/test_contract.py::test_compare_blas[dba,ead,cad->bce]", "tests/test_contract.py::test_compare_blas[aef,fbc,dca->bde]", "tests/test_contract.py::test_printing", "tests/test_contract.py::test_contract_expressions[False-False-greedy-a,ab,abc->abc]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-a,b,ab->ab]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->c]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->ac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->cd]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->abcdef]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->acdf]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->abcde]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->be]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abcd]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abd]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-eb,cb,fb->cef]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-dd,fb,be,cdb->cef]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-bca,cdb,dbf,afc->]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ad]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,dcf,af,cde->be]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-bd,db,eac->ace]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-fff,fae,bef,def->abd]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ba]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,abc]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,bac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,cba]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bc]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cb]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,bc]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,cb]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cd]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ab]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef->feba]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,efdc]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bc->ac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,ccb->ac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,fa,df,ecc->bde]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-bb,ff,be->e]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-bcb,bb,fc,fff->]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-fbb,dfd,fc,fc->]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-afd,ba,cc,dc->bf]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-adb,bc,fa,cfc->d]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-bbd,bda,fc,db->acf]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-dba,ead,cad->bce]", "tests/test_contract.py::test_contract_expressions[False-False-greedy-aef,fbc,dca->bde]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-a,ab,abc->abc]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-a,b,ab->ab]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->c]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->ac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->cd]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->abcdef]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->acdf]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->abcde]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->be]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abcd]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abd]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-eb,cb,fb->cef]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-dd,fb,be,cdb->cef]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-bca,cdb,dbf,afc->]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ad]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,dcf,af,cde->be]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-bd,db,eac->ace]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-fff,fae,bef,def->abd]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ba]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,abc]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,bac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,cba]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bc]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cb]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,bc]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,cb]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cd]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ab]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef->feba]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,efdc]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bc->ac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,ccb->ac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,fa,df,ecc->bde]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-bb,ff,be->e]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-bcb,bb,fc,fff->]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-fbb,dfd,fc,fc->]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-afd,ba,cc,dc->bf]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-adb,bc,fa,cfc->d]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-bbd,bda,fc,db->acf]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-dba,ead,cad->bce]", "tests/test_contract.py::test_contract_expressions[False-False-optimal-aef,fbc,dca->bde]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-a,ab,abc->abc]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-a,b,ab->ab]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->c]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->ac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->cd]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->abcdef]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->acdf]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->abcde]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->be]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abcd]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abd]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-eb,cb,fb->cef]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-dd,fb,be,cdb->cef]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-bca,cdb,dbf,afc->]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ad]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,dcf,af,cde->be]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-bd,db,eac->ace]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-fff,fae,bef,def->abd]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ba]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,abc]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,bac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,cba]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bc]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cb]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,bc]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,cb]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cd]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ab]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef->feba]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,efdc]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bc->ac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,ccb->ac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,fa,df,ecc->bde]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-bb,ff,be->e]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-bcb,bb,fc,fff->]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-fbb,dfd,fc,fc->]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-afd,ba,cc,dc->bf]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-adb,bc,fa,cfc->d]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-bbd,bda,fc,db->acf]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-dba,ead,cad->bce]", "tests/test_contract.py::test_contract_expressions[False-True-greedy-aef,fbc,dca->bde]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-a,ab,abc->abc]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-a,b,ab->ab]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->c]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->ac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->cd]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->abcdef]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->acdf]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->abcde]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->be]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abcd]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abd]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-eb,cb,fb->cef]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-dd,fb,be,cdb->cef]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-bca,cdb,dbf,afc->]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ad]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,dcf,af,cde->be]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-bd,db,eac->ace]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-fff,fae,bef,def->abd]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ba]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,abc]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,bac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,cba]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bc]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cb]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,bc]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,cb]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cd]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ab]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef->feba]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,efdc]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bc->ac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,bcc->ac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,ccb->ac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,fa,df,ecc->bde]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-bb,ff,be->e]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-bcb,bb,fc,fff->]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-fbb,dfd,fc,fc->]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-afd,ba,cc,dc->bf]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-adb,bc,fa,cfc->d]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-bbd,bda,fc,db->acf]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-dba,ead,cad->bce]", "tests/test_contract.py::test_contract_expressions[False-True-optimal-aef,fbc,dca->bde]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-a,ab,abc->abc]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-a,b,ab->ab]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->c]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->ac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->cd]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->abcdef]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->acdf]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->abcde]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->be]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abcd]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abd]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-eb,cb,fb->cef]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-dd,fb,be,cdb->cef]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-bca,cdb,dbf,afc->]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ad]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,dcf,af,cde->be]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-bd,db,eac->ace]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-fff,fae,bef,def->abd]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ba]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,abc]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,bac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,cba]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bc]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cb]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,bc]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,cb]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cd]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ab]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef->feba]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,efdc]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bc->ac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,ccb->ac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,fa,df,ecc->bde]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-bb,ff,be->e]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-bcb,bb,fc,fff->]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-fbb,dfd,fc,fc->]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-afd,ba,cc,dc->bf]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-adb,bc,fa,cfc->d]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-bbd,bda,fc,db->acf]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-dba,ead,cad->bce]", "tests/test_contract.py::test_contract_expressions[True-False-greedy-aef,fbc,dca->bde]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-a,ab,abc->abc]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-a,b,ab->ab]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->c]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->ac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->cd]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->abcdef]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->acdf]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->abcde]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->be]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abcd]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abd]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-eb,cb,fb->cef]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-dd,fb,be,cdb->cef]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-bca,cdb,dbf,afc->]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ad]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,dcf,af,cde->be]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-bd,db,eac->ace]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-fff,fae,bef,def->abd]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ba]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,abc]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,bac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,cba]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bc]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cb]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,bc]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,cb]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cd]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ab]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef->feba]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,efdc]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bc->ac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,ccb->ac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,fa,df,ecc->bde]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-bb,ff,be->e]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-bcb,bb,fc,fff->]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-fbb,dfd,fc,fc->]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-afd,ba,cc,dc->bf]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-adb,bc,fa,cfc->d]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-bbd,bda,fc,db->acf]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-dba,ead,cad->bce]", "tests/test_contract.py::test_contract_expressions[True-False-optimal-aef,fbc,dca->bde]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-a,ab,abc->abc]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-a,b,ab->ab]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->c]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->ac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->cd]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->abcdef]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->acdf]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->abcde]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->be]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abcd]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abd]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-eb,cb,fb->cef]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-dd,fb,be,cdb->cef]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-bca,cdb,dbf,afc->]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ad]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,dcf,af,cde->be]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-bd,db,eac->ace]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-fff,fae,bef,def->abd]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ba]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,abc]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,bac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,cba]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bc]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cb]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,bc]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,cb]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cd]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ab]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef->feba]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,efdc]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bc->ac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,ccb->ac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,fa,df,ecc->bde]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-bb,ff,be->e]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-bcb,bb,fc,fff->]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-fbb,dfd,fc,fc->]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-afd,ba,cc,dc->bf]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-adb,bc,fa,cfc->d]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-bbd,bda,fc,db->acf]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-dba,ead,cad->bce]", "tests/test_contract.py::test_contract_expressions[True-True-greedy-aef,fbc,dca->bde]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-a,ab,abc->abc]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-a,b,ab->ab]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,gc,hd,abcd->efgh]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,abcd,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ea,fb,gc,hd->efgh]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abhe,hidj,jgba,hiab,gab]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-bdhe,acad,hiab,agac,hibd]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->c]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->ac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->cd]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd,ef,ef->]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->abcdef]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->acdf]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->abcde]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->be]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abcd]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abd]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-eb,cb,fb->cef]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-dd,fb,be,cdb->cef]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-bca,cdb,dbf,afc->]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-dcc,fce,ea,dbf->ab]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-fdf,cdd,ccd,afe->ae]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ad]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ed,fcd,ff,bcf->be]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,dcf,af,cde->be]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-bd,db,eac->ace]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-fff,fae,bef,def->abd]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-efc,dbc,acf,fd->abe]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ba]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,abc]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,bac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,cba]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bc]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cb]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,bc]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,cb]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cd]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ab]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef->feba]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,efdc]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bc->ac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,bcc->ac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,ccb->ac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,fa,df,ecc->bde]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-ecb,fef,bad,ed->ac]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-bcf,bbb,fbf,fc->]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-bb,ff,be->e]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-bcb,bb,fc,fff->]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-fbb,dfd,fc,fc->]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-afd,ba,cc,dc->bf]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-adb,bc,fa,cfc->d]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-bbd,bda,fc,db->acf]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-dba,ead,cad->bce]", "tests/test_contract.py::test_contract_expressions[True-True-optimal-aef,fbc,dca->bde]", "tests/test_contract.py::test_contract_expression_checks" ]
[]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2017-12-04 01:27:21+00:00
mit
1,903
dgasmith__opt_einsum-141
diff --git a/opt_einsum/contract.py b/opt_einsum/contract.py index b837b21..6e7550a 100644 --- a/opt_einsum/contract.py +++ b/opt_einsum/contract.py @@ -214,7 +214,7 @@ def contract_path(*operands, **kwargs): indices = set(input_subscripts.replace(',', '')) # Get length of each unique dimension and ensure all dimensions are correct - dimension_dict = {} + size_dict = {} for tnum, term in enumerate(input_list): sh = input_shps[tnum] @@ -224,18 +224,18 @@ def contract_path(*operands, **kwargs): for cnum, char in enumerate(term): dim = int(sh[cnum]) - if char in dimension_dict: + if char in size_dict: # For broadcasting cases we always want the largest dim size - if dimension_dict[char] == 1: - dimension_dict[char] = dim - elif dim not in (1, dimension_dict[char]): + if size_dict[char] == 1: + size_dict[char] = dim + elif dim not in (1, size_dict[char]): raise ValueError("Size of label '{}' for operand {} ({}) does not match previous " - "terms ({}).".format(char, tnum, dimension_dict[char], dim)) + "terms ({}).".format(char, tnum, size_dict[char], dim)) else: - dimension_dict[char] = dim + size_dict[char] = dim # Compute size of each input array plus the output array - size_list = [helpers.compute_size_by_dict(term, dimension_dict) for term in input_list + [output_subscript]] + size_list = [helpers.compute_size_by_dict(term, size_dict) for term in input_list + [output_subscript]] memory_arg = _choose_memory_arg(memory_limit, size_list) num_ops = len(input_list) @@ -245,7 +245,7 @@ def contract_path(*operands, **kwargs): # indices_in_input = input_subscripts.replace(',', '') inner_product = (sum(len(x) for x in input_sets) - len(indices)) > 0 - naive_cost = helpers.flop_count(indices, inner_product, num_ops, dimension_dict) + naive_cost = helpers.flop_count(indices, inner_product, num_ops, size_dict) # Compute the path if not isinstance(path_type, (str, paths.PathOptimizer)): @@ -256,10 +256,10 @@ def contract_path(*operands, **kwargs): path = [tuple(range(num_ops))] elif isinstance(path_type, paths.PathOptimizer): # Custom path optimizer supplied - path = path_type(input_sets, output_set, dimension_dict, memory_arg) + path = path_type(input_sets, output_set, size_dict, memory_arg) else: path_optimizer = paths.get_path_fn(path_type) - path = path_optimizer(input_sets, output_set, dimension_dict, memory_arg) + path = path_optimizer(input_sets, output_set, size_dict, memory_arg) cost_list = [] scale_list = [] @@ -275,10 +275,10 @@ def contract_path(*operands, **kwargs): out_inds, input_sets, idx_removed, idx_contract = contract_tuple # Compute cost, scale, and size - cost = helpers.flop_count(idx_contract, idx_removed, len(contract_inds), dimension_dict) + cost = helpers.flop_count(idx_contract, idx_removed, len(contract_inds), size_dict) cost_list.append(cost) scale_list.append(len(idx_contract)) - size_list.append(helpers.compute_size_by_dict(out_inds, dimension_dict)) + size_list.append(helpers.compute_size_by_dict(out_inds, size_dict)) tmp_inputs = [input_list.pop(x) for x in contract_inds] tmp_shapes = [input_shps.pop(x) for x in contract_inds] @@ -312,7 +312,7 @@ def contract_path(*operands, **kwargs): return operands, contraction_list path_print = PathInfo(contraction_list, input_subscripts, output_subscript, indices, path, scale_list, naive_cost, - opt_cost, size_list, dimension_dict) + opt_cost, size_list, size_dict) return path, path_print @@ -393,15 +393,26 @@ def contract(*operands, **kwargs): - ``'optimal'`` An algorithm that explores all possible ways of contracting the listed tensors. Scales factorially with the number of terms in the contraction. + - ``'dp'`` A faster (but essentially optimal) algorithm that uses + dynamic programming to exhaustively search all contraction paths + without outer-products. + - ``'greedy'`` An cheap algorithm that heuristically chooses the best + pairwise contraction at each step. Scales linearly in the number of + terms in the contraction. + - ``'random-greedy'`` Run a randomized version of the greedy algorithm + 32 times and pick the best path. + - ``'random-greedy-128'`` Run a randomized version of the greedy + algorithm 128 times and pick the best path. - ``'branch-all'`` An algorithm like optimal but that restricts itself to searching 'likely' paths. Still scales factorially. - ``'branch-2'`` An even more restricted version of 'branch-all' that only searches the best two options at each step. Scales exponentially with the number of terms in the contraction. - - ``'greedy'`` An algorithm that heuristically chooses the best pair - contraction at each step. - ``'auto'`` Choose the best of the above algorithms whilst aiming to keep the path finding time below 1ms. + - ``'auto-hq'`` Aim for a high quality contraction, choosing the best + of the above algorithms whilst aiming to keep the path finding time + below 1sec. memory_limit : {None, int, 'max_input'} (default: None) Give the upper bound of the largest intermediate tensor contract will build. @@ -412,7 +423,7 @@ def contract(*operands, **kwargs): The default is None. Note that imposing a limit can make contractions exponentially slower to perform. - backend : str, optional (default: ``numpy``) + backend : str, optional (default: ``auto``) Which library to use to perform the required ``tensordot``, ``transpose`` and ``einsum`` calls. Should match the types of arrays supplied, See :func:`contract_expression` for generating expressions which convert diff --git a/opt_einsum/path_random.py b/opt_einsum/path_random.py index a49c06c..94b29a8 100644 --- a/opt_einsum/path_random.py +++ b/opt_einsum/path_random.py @@ -163,6 +163,8 @@ class RandomOptimizer(paths.PathOptimizer): raise NotImplementedError def __call__(self, inputs, output, size_dict, memory_limit): + self._check_args_against_first_call(inputs, output, size_dict) + # start a timer? if self.max_time is not None: t0 = time.time() diff --git a/opt_einsum/paths.py b/opt_einsum/paths.py index 4103224..b952bc2 100644 --- a/opt_einsum/paths.py +++ b/opt_einsum/paths.py @@ -43,6 +43,19 @@ class PathOptimizer(object): where ``path`` is a list of int-tuples specifiying a contraction order. """ + + def _check_args_against_first_call(self, inputs, output, size_dict): + """Utility that stateful optimizers can use to ensure they are not + called with different contractions across separate runs. + """ + args = (inputs, output, size_dict) + if not hasattr(self, '_first_call_args'): + # simply set the attribute as currently there is no global PathOptimizer init + self._first_call_args = args + elif args != self._first_call_args: + raise ValueError("The arguments specifiying the contraction that this path optimizer " + "instance was called with have changed - try creating a new instance.") + def __call__(self, inputs, output, size_dict, memory_limit=None): raise NotImplementedError @@ -336,6 +349,7 @@ class BranchBound(PathOptimizer): >>> optimal(isets, oset, idx_sizes, 5000) [(0, 2), (0, 1)] """ + self._check_args_against_first_call(inputs, output, size_dict) inputs = tuple(map(frozenset, inputs)) output = frozenset(output)
dgasmith/opt_einsum
95c1c80b081cce3f50b55422511d362e6fe1f0cd
diff --git a/opt_einsum/tests/test_paths.py b/opt_einsum/tests/test_paths.py index 5105bbe..04769f6 100644 --- a/opt_einsum/tests/test_paths.py +++ b/opt_einsum/tests/test_paths.py @@ -299,6 +299,12 @@ def test_custom_random_greedy(): assert path_info.largest_intermediate == optimizer.best['size'] assert path_info.opt_cost == optimizer.best['flops'] + # check error if we try and reuse the optimizer on a different expression + eq, shapes = oe.helpers.rand_equation(10, 4, seed=41) + views = list(map(np.ones, shapes)) + with pytest.raises(ValueError): + path, path_info = oe.contract_path(eq, *views, optimize=optimizer) + def test_custom_branchbound(): eq, shapes = oe.helpers.rand_equation(8, 4, seed=42) @@ -320,6 +326,12 @@ def test_custom_branchbound(): assert path_info.largest_intermediate == optimizer.best['size'] assert path_info.opt_cost == optimizer.best['flops'] + # check error if we try and reuse the optimizer on a different expression + eq, shapes = oe.helpers.rand_equation(8, 4, seed=41) + views = list(map(np.ones, shapes)) + with pytest.raises(ValueError): + path, path_info = oe.contract_path(eq, *views, optimize=optimizer) + @pytest.mark.skipif(sys.version_info < (3, 2), reason="requires python3.2 or higher") def test_parallel_random_greedy():
Possible bug in RandomGreedy path I have found an interesting quirk of the RandomGreedy optimizer that may not have been intended. In my application, I need to repeat two contractions several times. I use the same optimizer to compute the paths in advance and cache the result. If I use RandomGreedy, then I get the wrong shape for the second contraction, which leads me to believe that there's some internal state of RandomGreedy that persists into computing the second path. Below is a MWE. ```python import torch import opt_einsum as oe eqn1 = 'abc,bef,ahi,ehk,uvc,vwf,uxi,wxk->' eqn2 = 'abd,beg,ahj,ehl,mndo,npgq,mrjs,prlt,uvo,vwq,uxs,wxt->' shapes1 = [(1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2)] shapes2 = [(1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2, 2), (1, 1, 2, 2), (1, 1, 2, 2), (1, 1, 2, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2), (1, 1, 2)] tens1 = [torch.randn(*sh) for sh in shapes1] tens2 = [torch.randn(*sh) for sh in shapes2] for Opt in [oe.DynamicProgramming, oe.RandomGreedy]: opt = Opt(minimize='flops') expr1 = oe.contract_expression(eqn1, *[ten.shape for ten in tens1], optimize=opt) expr2 = oe.contract_expression(eqn2, *[ten.shape for ten in tens2], optimize=opt) print(expr1(*tens1)) print(expr2(*tens2)) ``` The output of this program, using the latest PyPI release, is: ``` tensor(-0.0187) tensor(0.4303) tensor(-0.0187) tensor([[[[[-0.4418]], [[ 1.2737]]]]]) ``` Lines 1 and 3 should match (and do), but so should 2 and 4 (and don't).
0.0
95c1c80b081cce3f50b55422511d362e6fe1f0cd
[ "opt_einsum/tests/test_paths.py::test_custom_random_greedy", "opt_einsum/tests/test_paths.py::test_custom_branchbound" ]
[ "opt_einsum/tests/test_paths.py::test_size_by_dict", "opt_einsum/tests/test_paths.py::test_flop_cost", "opt_einsum/tests/test_paths.py::test_bad_path_option", "opt_einsum/tests/test_paths.py::test_explicit_path", "opt_einsum/tests/test_paths.py::test_path_optimal", "opt_einsum/tests/test_paths.py::test_path_greedy", "opt_einsum/tests/test_paths.py::test_memory_paths", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-eb,cb,fb->cef-order0]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-eb,cb,fb->cef-order1]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-eb,cb,fb->cef-order2]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-eb,cb,fb->cef-order3]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[dp-eb,cb,fb->cef-order4]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-dd,fb,be,cdb->cef-order5]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-dd,fb,be,cdb->cef-order6]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-dd,fb,be,cdb->cef-order7]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dd,fb,be,cdb->cef-order8]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dd,fb,be,cdb->cef-order9]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[dp-dd,fb,be,cdb->cef-order10]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-bca,cdb,dbf,afc->-order11]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-bca,cdb,dbf,afc->-order12]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-bca,cdb,dbf,afc->-order13]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-bca,cdb,dbf,afc->-order14]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[dp-bca,cdb,dbf,afc->-order15]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-dcc,fce,ea,dbf->ab-order16]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-dcc,fce,ea,dbf->ab-order17]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-dcc,fce,ea,dbf->ab-order18]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dcc,fce,ea,dbf->ab-order19]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[dp-dcc,fce,ea,dbf->ab-order20]", "opt_einsum/tests/test_paths.py::test_optimal_edge_cases", "opt_einsum/tests/test_paths.py::test_greedy_edge_cases", "opt_einsum/tests/test_paths.py::test_dp_edge_cases_dimension_1", "opt_einsum/tests/test_paths.py::test_dp_edge_cases_all_singlet_indices", "opt_einsum/tests/test_paths.py::test_custom_dp_can_optimize_for_outer_products", "opt_einsum/tests/test_paths.py::test_custom_dp_can_optimize_for_size", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_cost_cap", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[greedy]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[branch-2]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[branch-all]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[optimal]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[dp]", "opt_einsum/tests/test_paths.py::test_large_path[2]", "opt_einsum/tests/test_paths.py::test_large_path[3]", "opt_einsum/tests/test_paths.py::test_large_path[26]", "opt_einsum/tests/test_paths.py::test_large_path[52]", "opt_einsum/tests/test_paths.py::test_large_path[116]", "opt_einsum/tests/test_paths.py::test_large_path[300]", "opt_einsum/tests/test_paths.py::test_parallel_random_greedy", "opt_einsum/tests/test_paths.py::test_custom_path_optimizer", "opt_einsum/tests/test_paths.py::test_custom_random_optimizer", "opt_einsum/tests/test_paths.py::test_optimizer_registration" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2020-05-12 21:47:13+00:00
mit
1,904
dgasmith__opt_einsum-145
diff --git a/docs/source/backends.rst b/docs/source/backends.rst index d297b19..7e48678 100644 --- a/docs/source/backends.rst +++ b/docs/source/backends.rst @@ -325,3 +325,47 @@ so again just the ``backend`` keyword needs to be supplied: [-462.52362 , -121.12659 , -67.84769 , 624.5455 ], [ 5.2839584, 36.44155 , 81.62852 , 703.15784 ]], dtype=float32) + + +Contracting arbitrary objects +============================= + +There is one more explicit backend that can handle arbitrary arrays of objects, +so long the *objects themselves* just support multiplication and addition ( +``__mul__`` and ``__add__`` dunder methods respectively). Use it by supplying +``backend='object'``. + +For example, imagine we want to perform a contraction of arrays made up of +`sympy <www.sympy.org>`_ symbols: + +.. code-block:: python + + >>> import opt_einsum as oe + >>> import numpy as np + >>> import sympy + + >>> # define the symbols + >>> a, b, c, d, e, f, g, h, i, j, k, l = [sympy.symbols(oe.get_symbol(i)) for i in range(12)] + >>> a * b + c * d + 𝑎𝑏+𝑐𝑑 + + >>> # define the tensors (you might explicitly specify ``dtype=object``) + >>> X = np.array([[a, b], [c, d]]) + >>> Y = np.array([[e, f], [g, h]]) + >>> Z = np.array([[i, j], [k, l]]) + + >>> # contract the tensors! + >>> oe.contract('uv,vw,wu->u', X, Y, Z, backend='object') + array([i*(a*e + b*g) + k*(a*f + b*h), j*(c*e + d*g) + l*(c*f + d*h)], + dtype=object) + +There are a few things to note here: + +* The returned array is a ``numpy.ndarray`` but since it has ``dtype=object`` + it can really hold *any* python objects +* We had to explicitly use ``backend='object'``, since :func:`numpy.einsum` + would have otherwise been dispatched to, which can't handle ``dtype=object`` + (though :func:`numpy.tensordot` in fact can) +* Although an optimized pairwise contraction order is used, the looping in each + single contraction is **performed in python so performance will be + drastically lower than for numeric dtypes!** diff --git a/opt_einsum/backends/dispatch.py b/opt_einsum/backends/dispatch.py index 85a6ceb..f5777ae 100644 --- a/opt_einsum/backends/dispatch.py +++ b/opt_einsum/backends/dispatch.py @@ -8,6 +8,7 @@ import importlib import numpy +from . import object_arrays from . import cupy as _cupy from . import jax as _jax from . import tensorflow as _tensorflow @@ -49,6 +50,10 @@ _cached_funcs = { ('tensordot', 'numpy'): numpy.tensordot, ('transpose', 'numpy'): numpy.transpose, ('einsum', 'numpy'): numpy.einsum, + # also pre-populate with the arbitrary object backend + ('tensordot', 'object'): numpy.tensordot, + ('transpose', 'object'): numpy.transpose, + ('einsum', 'object'): object_arrays.object_einsum, } diff --git a/opt_einsum/backends/object_arrays.py b/opt_einsum/backends/object_arrays.py new file mode 100644 index 0000000..3b394e1 --- /dev/null +++ b/opt_einsum/backends/object_arrays.py @@ -0,0 +1,60 @@ +""" +Functions for performing contractions with array elements which are objects. +""" + +import numpy as np +import functools +import operator + + +def object_einsum(eq, *arrays): + """A ``einsum`` implementation for ``numpy`` arrays with object dtype. + The loop is performed in python, meaning the objects themselves need + only to implement ``__mul__`` and ``__add__`` for the contraction to be + computed. This may be useful when, for example, computing expressions of + tensors with symbolic elements, but note it will be very slow when compared + to ``numpy.einsum`` and numeric data types! + + Parameters + ---------- + eq : str + The contraction string, should specify output. + arrays : sequence of arrays + These can be any indexable arrays as long as addition and + multiplication is defined on the elements. + + Returns + ------- + out : numpy.ndarray + The output tensor, with ``dtype=object``. + """ + + # when called by ``opt_einsum`` we will always be given a full eq + lhs, output = eq.split('->') + inputs = lhs.split(',') + + sizes = {} + for term, array in zip(inputs, arrays): + for k, d in zip(term, array.shape): + sizes[k] = d + + out_size = tuple(sizes[k] for k in output) + out = np.empty(out_size, dtype=object) + + inner = tuple(k for k in sizes if k not in output) + inner_size = tuple(sizes[k] for k in inner) + + for coo_o in np.ndindex(*out_size): + + coord = dict(zip(output, coo_o)) + + def gen_inner_sum(): + for coo_i in np.ndindex(*inner_size): + coord.update(dict(zip(inner, coo_i))) + locs = (tuple(coord[k] for k in term) for term in inputs) + elements = (array[loc] for array, loc in zip(arrays, locs)) + yield functools.reduce(operator.mul, elements) + + out[coo_o] = functools.reduce(operator.add, gen_inner_sum()) + + return out
dgasmith/opt_einsum
e88983faeb1221cc802ca8cefe2b425cfebe4880
diff --git a/opt_einsum/tests/test_backends.py b/opt_einsum/tests/test_backends.py index 905d2ba..2c05f35 100644 --- a/opt_einsum/tests/test_backends.py +++ b/opt_einsum/tests/test_backends.py @@ -431,3 +431,25 @@ def test_auto_backend_custom_array_no_tensordot(): # Shaped is an array-like object defined by opt_einsum - which has no TDOT assert infer_backend(x) == 'opt_einsum' assert parse_backend([x], 'auto') == 'numpy' + + [email protected]("string", tests) +def test_object_arrays_backend(string): + views = helpers.build_views(string) + ein = contract(string, *views, optimize=False, use_blas=False) + assert ein.dtype != object + + shps = [v.shape for v in views] + expr = contract_expression(string, *shps, optimize=True) + + obj_views = [view.astype(object) for view in views] + + # try raw contract + obj_opt = contract(string, *obj_views, backend='object') + assert obj_opt.dtype == object + assert np.allclose(ein, obj_opt.astype(float)) + + # test expression + obj_opt = expr(*obj_views, backend='object') + assert obj_opt.dtype == object + assert np.allclose(ein, obj_opt.astype(float))
Potential bug (outer tensor product) This works...: ```python >>> import mpmath >>> import numpy >>> m0 = numpy.eye(2) >>> opt_einsum.contract('bc,ad->abcd', m0, m0) array([[[[1., 0.], ...) ``` ...but this breaks: ```python >>> m1 = m0 + mpmath.mpc(0) >>> opt_einsum.contract('bc,ad->abcd', m1, m1) Traceback (most recent call last): (...) TypeError: invalid data type for einsum ``` However, using opt_einsum with mpmath is otherwise OK in principle: ```python >>> opt_einsum.contract('bc,cd->bd', m1, m1) array([[mpc(real='1.0', imag='0.0'), mpc(real='0.0', imag='0.0')], [mpc(real='0.0', imag='0.0'), mpc(real='1.0', imag='0.0')]], dtype=object) ```
0.0
e88983faeb1221cc802ca8cefe2b425cfebe4880
[ "opt_einsum/tests/test_backends.py::test_object_arrays_backend[ab,bc->ca]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[abc,bcd,dea]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[abc,def->fedcba]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[abc,bcd,df->fa]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[ijk,ikj]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[i,j->ij]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[ijk,k->ij]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[AB,BC->CA]" ]
[ "opt_einsum/tests/test_backends.py::test_auto_backend_custom_array_no_tensordot" ]
{ "failed_lite_validators": [ "has_added_files", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2020-07-02 04:12:10+00:00
mit
1,905
dgasmith__opt_einsum-149
diff --git a/opt_einsum/backends/jax.py b/opt_einsum/backends/jax.py index 6bc1a1f..aefd941 100644 --- a/opt_einsum/backends/jax.py +++ b/opt_einsum/backends/jax.py @@ -13,18 +13,18 @@ _JAX = None def _get_jax_and_to_jax(): - global _JAX - if _JAX is None: - import jax + global _JAX + if _JAX is None: + import jax - @to_backend_cache_wrap - @jax.jit - def to_jax(x): - return x + @to_backend_cache_wrap + @jax.jit + def to_jax(x): + return x - _JAX = jax, to_jax + _JAX = jax, to_jax - return _JAX + return _JAX def build_expression(_, expr): # pragma: no cover diff --git a/opt_einsum/contract.py b/opt_einsum/contract.py index 6e7550a..1403f98 100644 --- a/opt_einsum/contract.py +++ b/opt_einsum/contract.py @@ -51,16 +51,22 @@ class PathInfo(object): " Complete contraction: {}\n".format(self.eq), " Naive scaling: {}\n".format(len(self.indices)), " Optimized scaling: {}\n".format(max(self.scale_list)), " Naive FLOP count: {:.3e}\n".format( self.naive_cost), " Optimized FLOP count: {:.3e}\n".format(self.opt_cost), - " Theoretical speedup: {:3.3f}\n".format(self.speedup), + " Theoretical speedup: {:.3e}\n".format(self.speedup), " Largest intermediate: {:.3e} elements\n".format(self.largest_intermediate), "-" * 80 + "\n", "{:>6} {:>11} {:>22} {:>37}\n".format(*header), "-" * 80 ] for n, contraction in enumerate(self.contraction_list): inds, idx_rm, einsum_str, remaining, do_blas = contraction - remaining_str = ",".join(remaining) + "->" + self.output_subscript - path_run = (self.scale_list[n], do_blas, einsum_str, remaining_str) - path_print.append("\n{:>4} {:>14} {:>22} {:>37}".format(*path_run)) + + if remaining is not None: + remaining_str = ",".join(remaining) + "->" + self.output_subscript + else: + remaining_str = "..." + size_remaining = max(0, 56 - max(22, len(einsum_str))) + + path_run = (self.scale_list[n], do_blas, einsum_str, remaining_str, size_remaining) + path_print.append("\n{:>4} {:>14} {:>22} {:>{}}".format(*path_run)) return "".join(path_print) @@ -303,7 +309,14 @@ def contract_path(*operands, **kwargs): einsum_str = ",".join(tmp_inputs) + "->" + idx_result - contraction = (contract_inds, idx_removed, einsum_str, input_list[:], do_blas) + # for large expressions saving the remaining terms at each step can + # incur a large memory footprint - and also be messy to print + if len(input_list) <= 20: + remaining = tuple(input_list) + else: + remaining = None + + contraction = (contract_inds, idx_removed, einsum_str, remaining, do_blas) contraction_list.append(contraction) opt_cost = sum(cost_list) @@ -529,7 +542,7 @@ def _core_contract(operands, contraction_list, backend='auto', evaluate_constant # Start contraction loop for num, contraction in enumerate(contraction_list): - inds, idx_rm, einsum_str, remaining, blas_flag = contraction + inds, idx_rm, einsum_str, _, blas_flag = contraction # check if we are performing the pre-pass of an expression with constants, # if so, break out upon finding first non-constant (None) operand
dgasmith/opt_einsum
2cbd28e612ff0af54656c34d7f6c239efe524b12
diff --git a/opt_einsum/tests/test_contract.py b/opt_einsum/tests/test_contract.py index e6dfb04..8268e88 100644 --- a/opt_einsum/tests/test_contract.py +++ b/opt_einsum/tests/test_contract.py @@ -171,7 +171,7 @@ def test_printing(): views = helpers.build_views(string) ein = contract_path(string, *views) - assert len(str(ein[1])) == 726 + assert len(str(ein[1])) == 728 @pytest.mark.parametrize("string", tests) diff --git a/opt_einsum/tests/test_input.py b/opt_einsum/tests/test_input.py index e5c1677..f3b6c06 100644 --- a/opt_einsum/tests/test_input.py +++ b/opt_einsum/tests/test_input.py @@ -34,7 +34,8 @@ def test_type_errors(): contract("", 0, out='test') # order parameter must be a valid order - with pytest.raises(TypeError): + # changed in Numpy 1.19, see https://github.com/numpy/numpy/commit/35b0a051c19265f5643f6011ee11e31d30c8bc4c + with pytest.raises((TypeError, ValueError)): contract("", 0, order='W') # casting parameter must be a valid casting
Remove 'remaining' from PathInfo? (incurs n^2 memory overhead) When building the ``contraction_list``, ``opt_einsum`` handles a list of 'remaining' terms, and at each new step these are copied (``input_list`` below): https://github.com/dgasmith/opt_einsum/blob/2cbd28e612ff0af54656c34d7f6c239efe524b12/opt_einsum/contract.py#L306 A single, consumed version of this list is needed for constructing the items in the contraction list. However all the copies at each stage are not needed in the actual contraction (``_core_contract``) function - they are just for printing in the ``PathInfo`` object. The problem is that each copied list of remaining terms is of average length `n / 2` and there are generally `n - 1` of them, incurring a `n^2` memory overhead, which caused problems for us (10s of gigabytes of problems!) in some large contractions. Here's an extreme sample of such a gigantic ``PathInfo``: ![Screenshot from 2020-07-15 19-11-55](https://user-images.githubusercontent.com/8982598/87640894-486a1400-c73f-11ea-98a1-dab04d3e02f8.png) With 50 contractions each of several thousand tensors there was a total of nearly 100,000,000 'remaining' lists of strings. I'd suggest either: * a) *Easiest* - we just remove the 'remaining' terms from the ``PathInfo`` object, I'd be fine with this but possibly its useful information for others? * b) *Medium* - the 'remaining' terms are only accumulated below a certain threshold size * c) *Hardest* - they are generated lazily (and maybe optionally) by the ``PathInfo`` object upon request only (e.g. printing)
0.0
2cbd28e612ff0af54656c34d7f6c239efe524b12
[ "opt_einsum/tests/test_contract.py::test_printing" ]
[ "opt_einsum/tests/test_contract.py::test_compare[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ad]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,abc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,bac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,cba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ba,bc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ba,cb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_some_non_alphabet_maintains_order", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expression_interleaved_input", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants0]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[bdef,cdkj,ji,ikeh,hbc,lfo-constants1]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants2]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants3]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ijab,acd,bce,df,ef->ji-constants4]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ab,cd,ad,cb-constants5]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ab,bc,cd-constants6]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ad]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,abc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,bac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,cba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ba,bc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ba,cb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_path_supply_shapes", "opt_einsum/tests/test_input.py::test_type_errors", "opt_einsum/tests/test_input.py::test_value_errors", "opt_einsum/tests/test_input.py::test_contract_inputs", "opt_einsum/tests/test_input.py::test_compare[...a->...]", "opt_einsum/tests/test_input.py::test_compare[a...->...]", "opt_einsum/tests/test_input.py::test_compare[a...a->...a]", "opt_einsum/tests/test_input.py::test_compare[...,...]", "opt_einsum/tests/test_input.py::test_compare[a,b]", "opt_einsum/tests/test_input.py::test_compare[...a,...b]", "opt_einsum/tests/test_input.py::test_ellipse_input1", "opt_einsum/tests/test_input.py::test_ellipse_input2", "opt_einsum/tests/test_input.py::test_ellipse_input3", "opt_einsum/tests/test_input.py::test_ellipse_input4", "opt_einsum/tests/test_input.py::test_singleton_dimension_broadcast", "opt_einsum/tests/test_input.py::test_large_int_input_format", "opt_einsum/tests/test_input.py::test_hashable_object_input_format" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_media", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2020-07-16 19:23:46+00:00
mit
1,906
dgasmith__opt_einsum-196
diff --git a/opt_einsum/contract.py b/opt_einsum/contract.py index 0df94d0..0f70379 100644 --- a/opt_einsum/contract.py +++ b/opt_einsum/contract.py @@ -4,6 +4,7 @@ Contains the primary optimization and contraction routines. from collections import namedtuple from decimal import Decimal +from functools import lru_cache from typing import Any, Dict, Iterable, List, Optional, Sequence, Tuple from . import backends, blas, helpers, parser, paths, sharing @@ -542,15 +543,20 @@ def contract(*operands_: Any, **kwargs: Any) -> ArrayType: return _core_contract(operands, contraction_list, backend=backend, **einsum_kwargs) +@lru_cache(None) +def _infer_backend_class_cached(cls: type) -> str: + return cls.__module__.split(".")[0] + + def infer_backend(x: Any) -> str: - return x.__class__.__module__.split(".")[0] + return _infer_backend_class_cached(x.__class__) -def parse_backend(arrays: Sequence[ArrayType], backend: str) -> str: +def parse_backend(arrays: Sequence[ArrayType], backend: Optional[str]) -> str: """Find out what backend we should use, dipatching based on the first array if ``backend='auto'`` is specified. """ - if backend != "auto": + if (backend != "auto") and (backend is not None): return backend backend = infer_backend(arrays[0]) @@ -565,7 +571,7 @@ def parse_backend(arrays: Sequence[ArrayType], backend: str) -> str: def _core_contract( operands_: Sequence[ArrayType], contraction_list: ContractionListType, - backend: str = "auto", + backend: Optional[str] = "auto", evaluate_constants: bool = False, **einsum_kwargs: Any, ) -> ArrayType: @@ -703,7 +709,7 @@ class ContractExpression: self._evaluated_constants: Dict[str, Any] = {} self._backend_expressions: Dict[str, Any] = {} - def evaluate_constants(self, backend: str = "auto") -> None: + def evaluate_constants(self, backend: Optional[str] = "auto") -> None: """Convert any constant operands to the correct backend form, and perform as many contractions as possible to create a new list of operands, stored in ``self._evaluated_constants[backend]``. This also @@ -746,7 +752,7 @@ class ContractExpression: self, arrays: Sequence[ArrayType], out: Optional[ArrayType] = None, - backend: str = "auto", + backend: Optional[str] = "auto", evaluate_constants: bool = False, ) -> ArrayType: """The normal, core contraction.""" diff --git a/opt_einsum/paths.py b/opt_einsum/paths.py index eac3630..ac8ccd5 100644 --- a/opt_einsum/paths.py +++ b/opt_einsum/paths.py @@ -1217,7 +1217,7 @@ class DynamicProgramming(PathOptimizer): output = frozenset(symbol2int[c] for c in output_) size_dict_canonical = {symbol2int[c]: v for c, v in size_dict_.items() if c in symbol2int} size_dict = [size_dict_canonical[j] for j in range(len(size_dict_canonical))] - naive_cost = naive_scale * len(inputs) * functools.reduce(operator.mul, size_dict) + naive_cost = naive_scale * len(inputs) * functools.reduce(operator.mul, size_dict, 1) inputs, inputs_done, inputs_contractions = _dp_parse_out_single_term_ops(inputs, all_inds, ind_counts)
dgasmith/opt_einsum
a274599c87c6224382e2ce328c7439b7b713e363
diff --git a/opt_einsum/tests/test_backends.py b/opt_einsum/tests/test_backends.py index 87d2ba2..7c81c67 100644 --- a/opt_einsum/tests/test_backends.py +++ b/opt_einsum/tests/test_backends.py @@ -443,6 +443,7 @@ def test_auto_backend_custom_array_no_tensordot(): # Shaped is an array-like object defined by opt_einsum - which has no TDOT assert infer_backend(x) == "opt_einsum" assert parse_backend([x], "auto") == "numpy" + assert parse_backend([x], None) == "numpy" @pytest.mark.parametrize("string", tests) diff --git a/opt_einsum/tests/test_contract.py b/opt_einsum/tests/test_contract.py index 453a779..ef3ee5d 100644 --- a/opt_einsum/tests/test_contract.py +++ b/opt_einsum/tests/test_contract.py @@ -13,6 +13,7 @@ tests = [ "a,->a", "ab,->ab", ",ab,->ab", + ",,->", # Test hadamard-like products "a,ab,abc->abc", "a,b,ab->ab", diff --git a/opt_einsum/tests/test_paths.py b/opt_einsum/tests/test_paths.py index c6fef4f..eb4b18b 100644 --- a/opt_einsum/tests/test_paths.py +++ b/opt_einsum/tests/test_paths.py @@ -58,6 +58,7 @@ path_scalar_tests = [ ["ab,->ab", 1], [",a,->a", 2], [",,a,->a", 3], + [",,->", 2], ]
allow `backend=None` as shorthand for 'auto' A couple of times I've be caught out (e.g. https://github.com/jcmgray/quimb/issues/130) that the special value for inferring the backend is not `backend=None`. Might be nice to allow both? If so would just require a simple: ```python if backend not in ("auto", None): return backend ``` in `parse_backend` of `contract.py`.
0.0
a274599c87c6224382e2ce328c7439b7b713e363
[ "opt_einsum/tests/test_backends.py::test_auto_backend_custom_array_no_tensordot", "opt_einsum/tests/test_contract.py::test_compare[dp-,,->]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-,,->]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dp-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dynamic-programming-,,->-2]" ]
[ "opt_einsum/tests/test_backends.py::test_object_arrays_backend[ab,bc->ca]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[abc,bcd,dea]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[abc,def->fedcba]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[abc,bcd,df->fa]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[ijk,ikj]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[i,j->ij]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[ijk,k->ij]", "opt_einsum/tests/test_backends.py::test_object_arrays_backend[AB,BC->CA]", "opt_einsum/tests/test_contract.py::test_compare[auto-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-,,->]", "opt_einsum/tests/test_contract.py::test_compare[auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-,,->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[optimal-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-,,->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-,,->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-,,->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-,,->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-,,->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[eager-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[eager-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[eager-,,->]", "opt_einsum/tests/test_contract.py::test_compare[eager-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[eager-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[eager-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[eager-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[eager-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[eager-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[eager-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[eager-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[eager-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[eager-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[eager-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[eager-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[eager-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[eager-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[eager-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[eager-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[eager-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[eager-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[eager-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[eager-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[eager-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[eager-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[eager-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[eager-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[eager-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[eager-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[eager-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[eager-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[eager-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[eager-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[eager-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[eager-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[eager-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[eager-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[eager-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[eager-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[eager-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[eager-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[eager-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[eager-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[eager-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[eager-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[eager-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[eager-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[eager-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[eager-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[eager-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[eager-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-,,->]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[opportunistic-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[dp-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[dynamic-programming-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-a,->a]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-,,->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,->a]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[,ab,->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[,,->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ad]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,abc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,bac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,cba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ba,bc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ba,cb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[eager-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[opportunistic-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[dynamic-programming-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-,,->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[eager-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[opportunistic-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[dynamic-programming-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eager-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[opportunistic-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dynamic-programming-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-a,->a]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-,,->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_some_non_alphabet_maintains_order", "opt_einsum/tests/test_contract.py::test_printing", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-eager-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-opportunistic-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-dynamic-programming-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-eager-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-opportunistic-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-dynamic-programming-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-eager-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-opportunistic-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-dynamic-programming-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-auto-hq-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-eager-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-opportunistic-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dp-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-dynamic-programming-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-a,->a]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-,ab,->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-,,->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-128-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expression_interleaved_input", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants0]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[bdef,cdkj,ji,ikeh,hbc,lfo-constants1]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants2]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants3]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ijab,acd,bce,df,ef->ji-constants4]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ab,cd,ad,cb-constants5]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ab,bc,cd-constants6]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[a,->a]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,->ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[,ab,->ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[,,->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ad]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,abc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,bac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,cba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ba,bc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ba,cb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_path_supply_shapes", "opt_einsum/tests/test_paths.py::test_size_by_dict", "opt_einsum/tests/test_paths.py::test_flop_cost", "opt_einsum/tests/test_paths.py::test_bad_path_option", "opt_einsum/tests/test_paths.py::test_explicit_path", "opt_einsum/tests/test_paths.py::test_path_optimal", "opt_einsum/tests/test_paths.py::test_path_greedy", "opt_einsum/tests/test_paths.py::test_memory_paths", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-eb,cb,fb->cef-order0]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-eb,cb,fb->cef-order1]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-eb,cb,fb->cef-order2]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-eb,cb,fb->cef-order3]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[dp-eb,cb,fb->cef-order4]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-dd,fb,be,cdb->cef-order5]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-dd,fb,be,cdb->cef-order6]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-dd,fb,be,cdb->cef-order7]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dd,fb,be,cdb->cef-order8]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dd,fb,be,cdb->cef-order9]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[dp-dd,fb,be,cdb->cef-order10]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-bca,cdb,dbf,afc->-order11]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-bca,cdb,dbf,afc->-order12]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-bca,cdb,dbf,afc->-order13]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-bca,cdb,dbf,afc->-order14]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[dp-bca,cdb,dbf,afc->-order15]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-dcc,fce,ea,dbf->ab-order16]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-dcc,fce,ea,dbf->ab-order17]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-dcc,fce,ea,dbf->ab-order18]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dcc,fce,ea,dbf->ab-order19]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[dp-dcc,fce,ea,dbf->ab-order20]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-hq-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-hq-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-hq-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-hq-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[auto-hq-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[optimal-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[optimal-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[optimal-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[optimal-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[optimal-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-all-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-all-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-all-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-all-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-all-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-2-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-2-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-2-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-2-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-2-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-1-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-1-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-1-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-1-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[branch-1-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[greedy-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[greedy-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[greedy-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[greedy-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[greedy-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[eager-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[eager-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[eager-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[eager-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[eager-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[opportunistic-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[opportunistic-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[opportunistic-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[opportunistic-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[opportunistic-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dp-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dp-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dp-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dp-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dynamic-programming-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dynamic-programming-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dynamic-programming-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[dynamic-programming-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-,,->-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-128-a,->a-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-128-ab,->ab-1]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-128-,a,->a-2]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-128-,,a,->a-3]", "opt_einsum/tests/test_paths.py::test_path_scalar_cases[random-greedy-128-,,->-2]", "opt_einsum/tests/test_paths.py::test_optimal_edge_cases", "opt_einsum/tests/test_paths.py::test_greedy_edge_cases", "opt_einsum/tests/test_paths.py::test_dp_edge_cases_dimension_1", "opt_einsum/tests/test_paths.py::test_dp_edge_cases_all_singlet_indices", "opt_einsum/tests/test_paths.py::test_custom_dp_can_optimize_for_outer_products", "opt_einsum/tests/test_paths.py::test_custom_dp_can_optimize_for_size", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_cost_cap", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_minimize[flops-663054-18900-path0]", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_minimize[size-1114440-2016-path1]", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_minimize[write-983790-2016-path2]", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_minimize[combo-973518-2016-path3]", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_minimize[limit-983832-2016-path4]", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_minimize[combo-256-983790-2016-path5]", "opt_einsum/tests/test_paths.py::test_custom_dp_can_set_minimize[limit-256-983832-2016-path6]", "opt_einsum/tests/test_paths.py::test_dp_errors_when_no_contractions_found", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[greedy]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[branch-2]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[branch-all]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[optimal]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[dp]", "opt_einsum/tests/test_paths.py::test_large_path[2]", "opt_einsum/tests/test_paths.py::test_large_path[3]", "opt_einsum/tests/test_paths.py::test_large_path[26]", "opt_einsum/tests/test_paths.py::test_large_path[52]", "opt_einsum/tests/test_paths.py::test_large_path[116]", "opt_einsum/tests/test_paths.py::test_large_path[300]", "opt_einsum/tests/test_paths.py::test_custom_random_greedy", "opt_einsum/tests/test_paths.py::test_custom_branchbound", "opt_einsum/tests/test_paths.py::test_branchbound_validation", "opt_einsum/tests/test_paths.py::test_parallel_random_greedy", "opt_einsum/tests/test_paths.py::test_custom_path_optimizer", "opt_einsum/tests/test_paths.py::test_custom_random_optimizer", "opt_einsum/tests/test_paths.py::test_optimizer_registration" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2022-07-06 09:27:11+00:00
mit
1,907
dgasmith__opt_einsum-48
diff --git a/opt_einsum/compat.py b/opt_einsum/compat.py new file mode 100644 index 0000000..38cf55d --- /dev/null +++ b/opt_einsum/compat.py @@ -0,0 +1,10 @@ +# Python 2/3 compatability shim + +try: + # Python 2 + get_chr = unichr + strings = (str, type(get_chr(300))) +except NameError: + # Python 3 + get_chr = chr + strings = str diff --git a/opt_einsum/contract.py b/opt_einsum/contract.py index a7932f0..01998dd 100644 --- a/opt_einsum/contract.py +++ b/opt_einsum/contract.py @@ -6,6 +6,7 @@ import numpy as np from . import backends from . import blas +from . import compat from . import helpers from . import parser from . import paths @@ -176,7 +177,7 @@ def contract_path(*operands, **kwargs): naive_cost = helpers.flop_count(indices, inner_product, num_ops, dimension_dict) # Compute the path - if not isinstance(path_type, str): + if not isinstance(path_type, compat.strings): path = path_type elif num_ops == 1: # Nothing to be optimized @@ -274,7 +275,7 @@ def _einsum(*operands, **kwargs): """ fn = backends.get_func('einsum', kwargs.pop('backend', 'numpy')) - if not isinstance(operands[0], str): + if not isinstance(operands[0], compat.strings): return fn(*operands, **kwargs) einsum_str, operands = operands[0], operands[1:] diff --git a/opt_einsum/parser.py b/opt_einsum/parser.py index c5370b1..adfc19f 100644 --- a/opt_einsum/parser.py +++ b/opt_einsum/parser.py @@ -8,6 +8,8 @@ from collections import OrderedDict import numpy as np +from . import compat + einsum_symbols_base = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -40,7 +42,7 @@ def get_symbol(i): """ if i < 52: return einsum_symbols_base[i] - return chr(i + 140) + return compat.get_chr(i + 140) def gen_unused_symbols(used, n): @@ -133,7 +135,7 @@ def parse_einsum_input(operands): if len(operands) == 0: raise ValueError("No input operands") - if isinstance(operands[0], str): + if isinstance(operands[0], compat.strings): subscripts = operands[0].replace(" ", "") operands = [possibly_convert_to_numpy(x) for x in operands[1:]] diff --git a/opt_einsum/sharing.py b/opt_einsum/sharing.py index 504ba05..54c94bd 100644 --- a/opt_einsum/sharing.py +++ b/opt_einsum/sharing.py @@ -129,7 +129,7 @@ def einsum_cache_wrap(einsum): canonical = sorted(zip(inputs, map(id, operands)), key=lambda x: x[1]) canonical_ids = tuple(id_ for _, id_ in canonical) canonical_inputs = ','.join(input_ for input_, _ in canonical) - canonical_equation = alpha_canonicalize('{}->{}'.format(canonical_inputs, output)) + canonical_equation = alpha_canonicalize(canonical_inputs + "->" + output) key = 'einsum', backend, canonical_equation, canonical_ids return _memoize(key, einsum, equation, *operands, backend=backend)
dgasmith/opt_einsum
9e646be16b0a7be8ee88becefc1bba267956bc3b
diff --git a/opt_einsum/tests/test_contract.py b/opt_einsum/tests/test_contract.py index 43b5061..fdfacc7 100644 --- a/opt_einsum/tests/test_contract.py +++ b/opt_einsum/tests/test_contract.py @@ -7,7 +7,7 @@ import sys import numpy as np import pytest -from opt_einsum import contract, contract_path, helpers, contract_expression +from opt_einsum import compat, contract, contract_path, helpers, contract_expression tests = [ # Test hadamard-like products @@ -117,7 +117,6 @@ def test_drop_in_replacement(string): assert np.allclose(opt, np.einsum(string, *views)) [email protected](sys.version_info[0] < 3, reason='requires python3') @pytest.mark.parametrize("string", tests) def test_compare_greek(string): views = helpers.build_views(string) @@ -125,7 +124,7 @@ def test_compare_greek(string): ein = contract(string, *views, optimize=False, use_blas=False) # convert to greek - string = ''.join(chr(ord(c) + 848) if c not in ',->.' else c for c in string) + string = ''.join(compat.get_chr(ord(c) + 848) if c not in ',->.' else c for c in string) opt = contract(string, *views, optimize='greedy', use_blas=False) assert np.allclose(ein, opt) @@ -146,7 +145,6 @@ def test_compare_blas(string): assert np.allclose(ein, opt) [email protected](sys.version_info[0] < 3, reason='requires python3') @pytest.mark.parametrize("string", tests) def test_compare_blas_greek(string): views = helpers.build_views(string) @@ -154,7 +152,7 @@ def test_compare_blas_greek(string): ein = contract(string, *views, optimize=False) # convert to greek - string = ''.join(chr(ord(c) + 848) if c not in ',->.' else c for c in string) + string = ''.join(compat.get_chr(ord(c) + 848) if c not in ',->.' else c for c in string) opt = contract(string, *views, optimize='greedy') assert np.allclose(ein, opt) @@ -163,10 +161,9 @@ def test_compare_blas_greek(string): assert np.allclose(ein, opt) [email protected](sys.version_info[0] < 3, reason='requires python3') def test_some_non_alphabet_maintains_order(): # 'c beta a' should automatically go to -> 'a c beta' - string = 'c' + chr(ord('b') + 848) + 'a' + string = 'c' + compat.get_chr(ord('b') + 848) + 'a' # but beta will be temporarily replaced with 'b' for which 'cba->abc' # so check manual output kicks in: x = np.random.rand(2, 3, 4) diff --git a/opt_einsum/tests/test_input.py b/opt_einsum/tests/test_input.py index 022a078..311356e 100644 --- a/opt_einsum/tests/test_input.py +++ b/opt_einsum/tests/test_input.py @@ -230,7 +230,6 @@ def test_singleton_dimension_broadcast(): assert np.allclose(res2, np.full((1, 5), 5)) [email protected](sys.version_info.major == 2, reason="Requires python 3.") def test_large_int_input_format(): string = 'ab,bc,cd' x, y, z = build_views(string) diff --git a/opt_einsum/tests/test_paths.py b/opt_einsum/tests/test_paths.py index 8087dd2..da39e23 100644 --- a/opt_einsum/tests/test_paths.py +++ b/opt_einsum/tests/test_paths.py @@ -3,6 +3,8 @@ Tests the accuracy of the opt_einsum paths in addition to unit tests for the various path helper functions. """ +import itertools + import numpy as np import pytest @@ -174,3 +176,14 @@ def test_can_optimize_outer_products(): a, b, c = [np.random.randn(10, 10) for _ in range(3)] d = np.random.randn(10, 2) assert oe.contract_path("ab,cd,ef,fg", a, b, c, d, path='greedy')[0] == [(2, 3), (0, 2), (0, 1)] + + [email protected]('num_symbols', [2, 3, 26, 26 + 26, 256 - 140, 300]) +def test_large_path(num_symbols): + symbols = ''.join(oe.get_symbol(i) for i in range(num_symbols)) + dimension_dict = dict(zip(symbols, itertools.cycle([2, 3, 4]))) + expression = ','.join(symbols[t:t+2] for t in range(num_symbols - 1)) + tensors = oe.helpers.build_views(expression, dimension_dict=dimension_dict) + + # Check that path construction does not crash + oe.contract_path(expression, *tensors, path='greedy')
Support for get_symbol(116) in Python 2 `get_symbol(x)` currently fails in Python 2 for any `x >= 116`: ``` i = 116 def get_symbol(i): """Get the symbol corresponding to int ``i`` - runs through the usual 52 letters before resorting to unicode characters, starting at ``chr(192)``. Examples -------- >>> get_symbol(2) 'c' >>> oe.get_symbol(200) 'Ŕ' >>> oe.get_symbol(20000) '京' """ if i < 52: return einsum_symbols_base[i] > return chr(i + 140) E ValueError: chr() arg not in range(256) ``` Can we fix this by use `unichr()` and unicode strings in Python 2?
0.0
9e646be16b0a7be8ee88becefc1bba267956bc3b
[ "opt_einsum/tests/test_contract.py::test_compare[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ad]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,abc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,bac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,cba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ba,bc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ba,cb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_some_non_alphabet_maintains_order", "opt_einsum/tests/test_contract.py::test_printing", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants0]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[bdef,cdkj,ji,ikeh,hbc,lfo-constants1]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants2]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants3]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ijab,acd,bce,df,ef->ji-constants4]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ab,cd,ad,cb-constants5]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ab,bc,cd-constants6]", "opt_einsum/tests/test_input.py::test_value_errors", "opt_einsum/tests/test_input.py::test_compare[...a->...]", "opt_einsum/tests/test_input.py::test_compare[a...->...]", "opt_einsum/tests/test_input.py::test_compare[a...a->...a]", "opt_einsum/tests/test_input.py::test_compare[...,...]", "opt_einsum/tests/test_input.py::test_compare[a,b]", "opt_einsum/tests/test_input.py::test_compare[...a,...b]", "opt_einsum/tests/test_input.py::test_ellipse_input1", "opt_einsum/tests/test_input.py::test_ellipse_input2", "opt_einsum/tests/test_input.py::test_ellipse_input3", "opt_einsum/tests/test_input.py::test_ellipse_input4", "opt_einsum/tests/test_input.py::test_singleton_dimension_broadcast", "opt_einsum/tests/test_input.py::test_large_int_input_format", "opt_einsum/tests/test_paths.py::test_size_by_dict", "opt_einsum/tests/test_paths.py::test_flop_cost", "opt_einsum/tests/test_paths.py::test_path_optimal", "opt_einsum/tests/test_paths.py::test_path_greedy", "opt_einsum/tests/test_paths.py::test_memory_paths", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-eb,cb,fb->cef-order0]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-eb,cb,fb->cef-order1]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-dd,fb,be,cdb->cef-order2]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dd,fb,be,cdb->cef-order3]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-bca,cdb,dbf,afc->-order4]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-bca,cdb,dbf,afc->-order5]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-dcc,fce,ea,dbf->ab-order6]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dcc,fce,ea,dbf->ab-order7]", "opt_einsum/tests/test_paths.py::test_optimal_edge_cases", "opt_einsum/tests/test_paths.py::test_greedy_edge_cases", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products", "opt_einsum/tests/test_paths.py::test_large_path[2]", "opt_einsum/tests/test_paths.py::test_large_path[3]", "opt_einsum/tests/test_paths.py::test_large_path[26]", "opt_einsum/tests/test_paths.py::test_large_path[52]", "opt_einsum/tests/test_paths.py::test_large_path[116]", "opt_einsum/tests/test_paths.py::test_large_path[300]" ]
[]
{ "failed_lite_validators": [ "has_added_files", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-08-23 19:50:31+00:00
mit
1,908
dgasmith__opt_einsum-53
diff --git a/opt_einsum/sharing.py b/opt_einsum/sharing.py index 54c94bd..038309f 100644 --- a/opt_einsum/sharing.py +++ b/opt_einsum/sharing.py @@ -3,11 +3,43 @@ import contextlib import functools import numbers -from collections import Counter +from collections import Counter, defaultdict +import threading from .parser import alpha_canonicalize, parse_einsum_input -_SHARING_STACK = [] + +_SHARING_STACK = defaultdict(list) + + +try: + get_thread_id = threading.get_ident +except AttributeError: + def get_thread_id(): + return threading.current_thread().ident + + +def currently_sharing(): + """Check if we are currently sharing a cache -- thread specific. + """ + return get_thread_id() in _SHARING_STACK + + +def get_sharing_cache(): + """Return the most recent sharing cache -- thread specific. + """ + return _SHARING_STACK[get_thread_id()][-1] + + +def _add_sharing_cache(cache): + _SHARING_STACK[get_thread_id()].append(cache) + + +def _remove_sharing_cache(): + tid = get_thread_id() + _SHARING_STACK[tid].pop() + if not _SHARING_STACK[tid]: + del _SHARING_STACK[tid] @contextlib.contextmanager @@ -34,11 +66,11 @@ def shared_intermediates(cache=None): """ if cache is None: cache = {} + _add_sharing_cache(cache) try: - _SHARING_STACK.append(cache) yield cache finally: - _SHARING_STACK.pop() + _remove_sharing_cache() def count_cached_ops(cache): @@ -52,7 +84,7 @@ def _save_tensors(*tensors): """Save tensors in the cache to prevent their ids from being recycled. This is needed to prevent false cache lookups. """ - cache = _SHARING_STACK[-1] + cache = get_sharing_cache() for tensor in tensors: cache['tensor', id(tensor)] = tensor @@ -62,7 +94,7 @@ def _memoize(key, fn, *args, **kwargs): Results will be stored in the innermost ``cache`` yielded by :func:`shared_intermediates`. """ - cache = _SHARING_STACK[-1] + cache = get_sharing_cache() if key in cache: return cache[key] result = fn(*args, **kwargs) @@ -77,7 +109,7 @@ def transpose_cache_wrap(transpose): @functools.wraps(transpose) def cached_transpose(a, axes, backend='numpy'): - if not _SHARING_STACK: + if not currently_sharing(): return transpose(a, axes, backend=backend) # hash by axes @@ -96,7 +128,7 @@ def tensordot_cache_wrap(tensordot): @functools.wraps(tensordot) def cached_tensordot(x, y, axes=2, backend='numpy'): - if not _SHARING_STACK: + if not currently_sharing(): return tensordot(x, y, axes, backend=backend) # hash based on the (axes_x,axes_y) form of axes @@ -117,7 +149,7 @@ def einsum_cache_wrap(einsum): @functools.wraps(einsum) def cached_einsum(*args, **kwargs): - if not _SHARING_STACK: + if not currently_sharing(): return einsum(*args, **kwargs) # hash modulo commutativity by computing a canonical ordering and names @@ -143,7 +175,7 @@ def to_backend_cache_wrap(to_backend): @functools.wraps(to_backend) def cached_to_backend(array): - if not _SHARING_STACK: + if not currently_sharing(): return to_backend(array) # hash by id
dgasmith/opt_einsum
284f233a4057e57ba8a3c1eef28e6bb6b8bfe2b1
diff --git a/opt_einsum/tests/test_sharing.py b/opt_einsum/tests/test_sharing.py index b0b860a..ea7f00e 100644 --- a/opt_einsum/tests/test_sharing.py +++ b/opt_einsum/tests/test_sharing.py @@ -6,11 +6,11 @@ import numpy as np import pytest from opt_einsum import (contract_expression, contract_path, get_symbol, - helpers, shared_intermediates) + contract, helpers, shared_intermediates) from opt_einsum.backends import to_cupy, to_torch from opt_einsum.contract import _einsum from opt_einsum.parser import parse_einsum_input -from opt_einsum.sharing import count_cached_ops +from opt_einsum.sharing import count_cached_ops, currently_sharing, get_sharing_cache try: import cupy @@ -362,3 +362,23 @@ def test_chain_sharing(size, backend): print('Without sharing: {} expressions'.format(num_exprs_nosharing)) print('With sharing: {} expressions'.format(num_exprs_sharing)) assert num_exprs_nosharing > num_exprs_sharing + + +def test_multithreaded_sharing(): + from multiprocessing.pool import ThreadPool + + def fn(): + X, Y, Z = helpers.build_views('ab,bc,cd') + + with shared_intermediates(): + contract('ab,bc,cd->a', X, Y, Z) + contract('ab,bc,cd->b', X, Y, Z) + + return len(get_sharing_cache()) + + expected = fn() + pool = ThreadPool(8) + fs = [pool.apply_async(fn) for _ in range(16)] + assert not currently_sharing() + assert [f.get() for f in fs] == [expected] * 16 + pool.close()
Support multi-threading in shared_intermediates Following up on https://github.com/dgasmith/opt_einsum/pull/43#issuecomment-414661988, the `shared_intermediates` cache is currently not locked. One option would be to assign the thread id of a unique owner of the cache, such that at least thread conflicts could be detected and reported, rather than mere silent performance degradation.
0.0
284f233a4057e57ba8a3c1eef28e6bb6b8bfe2b1
[ "opt_einsum/tests/test_sharing.py::test_sharing_value[numpy-ab,bc->ca]", "opt_einsum/tests/test_sharing.py::test_sharing_value[numpy-abc,bcd,dea]", "opt_einsum/tests/test_sharing.py::test_sharing_value[numpy-abc,def->fedcba]", "opt_einsum/tests/test_sharing.py::test_sharing_value[numpy-abc,bcd,df->fa]", "opt_einsum/tests/test_sharing.py::test_sharing_value[numpy-ijk,ikj]", "opt_einsum/tests/test_sharing.py::test_sharing_value[numpy-i,j->ij]", "opt_einsum/tests/test_sharing.py::test_sharing_value[numpy-ijk,k->ij]", "opt_einsum/tests/test_sharing.py::test_sharing_value[numpy-AB,BC->CA]", "opt_einsum/tests/test_sharing.py::test_complete_sharing[numpy]", "opt_einsum/tests/test_sharing.py::test_sharing_reused_cache[numpy]", "opt_einsum/tests/test_sharing.py::test_no_sharing_separate_cache[numpy]", "opt_einsum/tests/test_sharing.py::test_sharing_nesting[numpy]", "opt_einsum/tests/test_sharing.py::test_sharing_modulo_commutativity[numpy-ab,bc->ca]", "opt_einsum/tests/test_sharing.py::test_sharing_modulo_commutativity[numpy-abc,bcd,dea]", "opt_einsum/tests/test_sharing.py::test_sharing_modulo_commutativity[numpy-abc,def->fedcba]", "opt_einsum/tests/test_sharing.py::test_sharing_modulo_commutativity[numpy-abc,bcd,df->fa]", "opt_einsum/tests/test_sharing.py::test_sharing_modulo_commutativity[numpy-ijk,ikj]", "opt_einsum/tests/test_sharing.py::test_sharing_modulo_commutativity[numpy-i,j->ij]", "opt_einsum/tests/test_sharing.py::test_sharing_modulo_commutativity[numpy-ijk,k->ij]", "opt_einsum/tests/test_sharing.py::test_sharing_modulo_commutativity[numpy-AB,BC->CA]", "opt_einsum/tests/test_sharing.py::test_partial_sharing[numpy]", "opt_einsum/tests/test_sharing.py::test_sharing_with_constants[numpy]", "opt_einsum/tests/test_sharing.py::test_chain[numpy-3]", "opt_einsum/tests/test_sharing.py::test_chain[numpy-4]", "opt_einsum/tests/test_sharing.py::test_chain[numpy-5]", "opt_einsum/tests/test_sharing.py::test_chain_2[numpy-3]", "opt_einsum/tests/test_sharing.py::test_chain_2[numpy-4]", "opt_einsum/tests/test_sharing.py::test_chain_2[numpy-5]", "opt_einsum/tests/test_sharing.py::test_chain_2[numpy-10]", "opt_einsum/tests/test_sharing.py::test_chain_2_growth[numpy]", "opt_einsum/tests/test_sharing.py::test_chain_sharing[numpy-3]", "opt_einsum/tests/test_sharing.py::test_chain_sharing[numpy-4]", "opt_einsum/tests/test_sharing.py::test_chain_sharing[numpy-5]", "opt_einsum/tests/test_sharing.py::test_multithreaded_sharing" ]
[]
{ "failed_lite_validators": [ "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2018-08-24 18:55:58+00:00
mit
1,909
dgasmith__opt_einsum-84
diff --git a/opt_einsum/__init__.py b/opt_einsum/__init__.py index 3d8b47b..0ec9eb6 100644 --- a/opt_einsum/__init__.py +++ b/opt_einsum/__init__.py @@ -6,15 +6,18 @@ from . import blas from . import helpers from . import paths from . import path_random -# Handle versioneer -from ._version import get_versions from .contract import contract, contract_path, contract_expression from .parser import get_symbol from .sharing import shared_intermediates from .paths import BranchBound from .path_random import RandomGreedy +# Handle versioneer +from ._version import get_versions versions = get_versions() __version__ = versions['version'] __git_revision__ = versions['full-revisionid'] del get_versions, versions + + +paths.register_path_fn('random-greedy', path_random.random_greedy) diff --git a/opt_einsum/contract.py b/opt_einsum/contract.py index 2f2d262..f7d2d91 100644 --- a/opt_einsum/contract.py +++ b/opt_einsum/contract.py @@ -13,10 +13,9 @@ from . import compat from . import helpers from . import parser from . import paths -from . import path_random from . import sharing -__all__ = ["contract_path", "contract", "format_const_einsum_str", "ContractExpression", "shape_only", "shape_only"] +__all__ = ["contract_path", "contract", "format_const_einsum_str", "ContractExpression", "shape_only"] class PathInfo(object): @@ -93,6 +92,9 @@ def _choose_memory_arg(memory_limit, size_list): return int(memory_limit) +_VALID_CONTRACT_KWARGS = {'optimize', 'path', 'memory_limit', 'einsum_call', 'use_blas', 'shapes'} + + def contract_path(*operands, **kwargs): """ Find a contraction order 'path', without performing the contraction. @@ -124,6 +126,9 @@ def contract_path(*operands, **kwargs): Use BLAS functions or not memory_limit : int, optional (default: None) Maximum number of elements allowed in intermediate arrays. + shapes : bool, optional + Whether ``contract_path`` should assume arrays (the default) or array + shapes have been supplied. Returns ------- @@ -193,8 +198,7 @@ def contract_path(*operands, **kwargs): """ # Make sure all keywords are valid - valid_contract_kwargs = ['optimize', 'path', 'memory_limit', 'einsum_call', 'use_blas'] - unknown_kwargs = [k for (k, v) in kwargs.items() if k not in valid_contract_kwargs] + unknown_kwargs = set(kwargs) - _VALID_CONTRACT_KWARGS if len(unknown_kwargs): raise TypeError("einsum_path: Did not understand the following kwargs: {}".format(unknown_kwargs)) @@ -206,6 +210,7 @@ def contract_path(*operands, **kwargs): path_type = kwargs.pop('optimize', 'auto') memory_limit = kwargs.pop('memory_limit', None) + shapes = kwargs.pop('shapes', False) # Hidden option, only einsum should call this einsum_call_arg = kwargs.pop("einsum_call", False) @@ -217,7 +222,10 @@ def contract_path(*operands, **kwargs): # Build a few useful list and sets input_list = input_subscripts.split(',') input_sets = [set(x) for x in input_list] - input_shps = [x.shape for x in operands] + if shapes: + input_shps = operands + else: + input_shps = [x.shape for x in operands] output_set = set(output_subscript) indices = set(input_subscripts.replace(',', '')) @@ -257,29 +265,17 @@ def contract_path(*operands, **kwargs): # Compute the path if not isinstance(path_type, (compat.strings, paths.PathOptimizer)): + # Custom path supplied path = path_type - elif num_ops == 1: - # Nothing to be optimized - path = [(0, )] - elif num_ops == 2: + elif num_ops <= 2: # Nothing to be optimized - path = [(0, 1)] + path = [tuple(range(num_ops))] elif isinstance(path_type, paths.PathOptimizer): + # Custom path optimizer supplied path = path_type(input_sets, output_set, dimension_dict, memory_arg) - elif path_type == "optimal" or (path_type == "auto" and num_ops <= 4): - path = paths.optimal(input_sets, output_set, dimension_dict, memory_arg) - elif path_type == 'branch-all' or (path_type == "auto" and num_ops <= 6): - path = paths.branch(input_sets, output_set, dimension_dict, memory_arg, nbranch=None) - elif path_type == 'branch-2' or (path_type == "auto" and num_ops <= 8): - path = paths.branch(input_sets, output_set, dimension_dict, memory_arg, nbranch=2) - elif path_type == 'branch-1' or (path_type == "auto" and num_ops <= 14): - path = paths.branch(input_sets, output_set, dimension_dict, memory_arg, nbranch=1) - elif path_type == 'random-greedy': - path = path_random.random_greedy(input_sets, output_set, dimension_dict, memory_arg) - elif path_type in ("auto", "greedy", "eager", "opportunistic"): - path = paths.greedy(input_sets, output_set, dimension_dict, memory_arg) else: - raise KeyError("Path name '{}' not found".format(path_type)) + path_optimizer = paths.get_path_fn(path_type) + path = path_optimizer(input_sets, output_set, dimension_dict, memory_arg) cost_list = [] scale_list = [] diff --git a/opt_einsum/path_random.py b/opt_einsum/path_random.py index 5f40cc8..49bf95e 100644 --- a/opt_einsum/path_random.py +++ b/opt_einsum/path_random.py @@ -11,13 +11,13 @@ import functools from collections import deque from . import helpers -from .paths import PathOptimizer, ssa_greedy_optimize, get_better_fn, ssa_to_linear, calc_k12_flops +from . import paths __all__ = ["RandomGreedy", "random_greedy"] -class RandomOptimizer(PathOptimizer): +class RandomOptimizer(paths.PathOptimizer): """Base class for running any random path finder that benefits from repeated calling, possibly in a parallel fashion. Custom random optimizers should subclass this, and the ``setup`` method should be @@ -81,7 +81,7 @@ class RandomOptimizer(PathOptimizer): self.max_repeats = max_repeats self.max_time = max_time self.minimize = minimize - self.better = get_better_fn(minimize) + self.better = paths.get_better_fn(minimize) self.parallel = parallel self.pre_dispatch = pre_dispatch @@ -95,7 +95,7 @@ class RandomOptimizer(PathOptimizer): def path(self): """The best path found so far. """ - return ssa_to_linear(self.best['ssa_path']) + return paths.ssa_to_linear(self.best['ssa_path']) @property def parallel(self): @@ -256,7 +256,7 @@ def thermal_chooser(queue, remaining, nbranch=8, temperature=1, rel_temperature= # compute relative probability for each potential contraction if temperature == 0.0: - energies = [1 if cost == cmin else 0 for cost in costs] + energies = [1 if c == cmin else 0 for c in costs] else: # shift by cmin for numerical reasons energies = [math.exp(-(c - cmin) / temperature) for c in costs] @@ -282,7 +282,7 @@ def ssa_path_compute_cost(ssa_path, inputs, output, size_dict): max_size = 0 for i, j in ssa_path: - k12, flops12 = calc_k12_flops(inputs, output, remaining, i, j, size_dict) + k12, flops12 = paths.calc_k12_flops(inputs, output, remaining, i, j, size_dict) remaining.discard(i) remaining.discard(j) remaining.add(len(inputs)) @@ -302,7 +302,7 @@ def _trial_greedy_ssa_path_and_cost(r, inputs, output, size_dict, choose_fn, cos else: random.seed(r) - ssa_path = ssa_greedy_optimize(inputs, output, size_dict, choose_fn, cost_fn) + ssa_path = paths.ssa_greedy_optimize(inputs, output, size_dict, choose_fn, cost_fn) cost, size = ssa_path_compute_cost(ssa_path, inputs, output, size_dict) return ssa_path, cost, size diff --git a/opt_einsum/paths.py b/opt_einsum/paths.py index df800bf..8ce6a67 100644 --- a/opt_einsum/paths.py +++ b/opt_einsum/paths.py @@ -5,6 +5,7 @@ from __future__ import absolute_import, division, print_function import heapq import random +import functools import itertools from collections import defaultdict @@ -12,7 +13,8 @@ import numpy as np from . import helpers -__all__ = ["optimal", "BranchBound", "branch", "greedy"] + +__all__ = ["optimal", "BranchBound", "branch", "greedy", "auto", "get_path_fn"] _UNLIMITED_MEM = {-1, None, float('inf')} @@ -444,6 +446,11 @@ def branch(inputs, output, size_dict, memory_limit=None, **optimizer_kwargs): return optimizer(inputs, output, size_dict, memory_limit) +branch_all = functools.partial(branch, nbranch=None) +branch_2 = functools.partial(branch, nbranch=2) +branch_1 = functools.partial(branch, nbranch=1) + + def _get_candidate(output, sizes, remaining, footprints, dim_ref_counts, k1, k2, cost_fn): either = k1 | k2 two = k1 & k2 @@ -645,3 +652,53 @@ def greedy(inputs, output, size_dict, memory_limit=None, choose_fn=None, cost_fn ssa_path = ssa_greedy_optimize(inputs, output, size_dict, cost_fn=cost_fn, choose_fn=choose_fn) return ssa_to_linear(ssa_path) + + +_AUTO_CHOICES = {} +for i in range(1, 5): + _AUTO_CHOICES[i] = optimal +for i in range(5, 7): + _AUTO_CHOICES[i] = branch_all +for i in range(7, 9): + _AUTO_CHOICES[i] = branch_2 +for i in range(9, 15): + _AUTO_CHOICES[i] = branch_1 + + +def auto(inputs, output, size_dict, memory_limit=None): + """Finds the contraction path by automatically choosing the method based on + how many input arguments there are. + """ + N = len(inputs) + return _AUTO_CHOICES.get(N, greedy)(inputs, output, size_dict, memory_limit) + + +_PATH_OPTIONS = { + 'auto': auto, + 'optimal': optimal, + 'branch-all': branch_all, + 'branch-2': branch_2, + 'branch-1': branch_1, + 'greedy': greedy, + 'eager': greedy, + 'opportunistic': greedy, +} + + +def register_path_fn(name, fn): + """Add path finding function ``fn`` as an option with ``name``. + """ + if name in _PATH_OPTIONS: + raise KeyError("Path optimizer '{}' already exists.".format(name)) + + _PATH_OPTIONS[name.lower()] = fn + + +def get_path_fn(path_type): + """Get the correct path finding function from str ``path_type``. + """ + if path_type not in _PATH_OPTIONS: + raise KeyError("Path optimizer '{}' not found, valid options are {}." + .format(path_type, set(_PATH_OPTIONS.keys()))) + + return _PATH_OPTIONS[path_type]
dgasmith/opt_einsum
ff86c2c9d2bb51d9816b2a92c08787379d512eb2
diff --git a/opt_einsum/tests/test_backends.py b/opt_einsum/tests/test_backends.py index ca046e4..b596cf1 100644 --- a/opt_einsum/tests/test_backends.py +++ b/opt_einsum/tests/test_backends.py @@ -2,6 +2,7 @@ import numpy as np import pytest from opt_einsum import contract, helpers, contract_expression, backends, sharing +from opt_einsum.contract import infer_backend, parse_backend, Shaped try: import cupy @@ -337,3 +338,10 @@ def test_torch_with_constants(): assert isinstance(res_got3, torch.Tensor) res_got3 = res_got3.numpy() if res_got3.device.type == 'cpu' else res_got3.cpu().numpy() assert np.allclose(res_exp, res_got3) + + +def test_auto_backend_custom_array_no_tensordot(): + x = Shaped((1, 2, 3)) + # Shaped is an array-like object defined by opt_einsum - which has no TDOT + assert infer_backend(x) == 'opt_einsum' + assert parse_backend([x], 'auto') == 'numpy' diff --git a/opt_einsum/tests/test_contract.py b/opt_einsum/tests/test_contract.py index 7227e2d..775aac0 100644 --- a/opt_einsum/tests/test_contract.py +++ b/opt_einsum/tests/test_contract.py @@ -257,3 +257,9 @@ def test_linear_vs_ssa(equation): ssa_path = linear_to_ssa(linear_path) linear_path2 = ssa_to_linear(ssa_path) assert linear_path2 == linear_path + + +def test_contract_path_supply_shapes(): + eq = 'ab,bc,cd' + shps = [(2, 3), (3, 4), (4, 5)] + contract_path(eq, *shps, shapes=True) diff --git a/opt_einsum/tests/test_paths.py b/opt_einsum/tests/test_paths.py index a860ee7..33b876b 100644 --- a/opt_einsum/tests/test_paths.py +++ b/opt_einsum/tests/test_paths.py @@ -108,6 +108,16 @@ def test_flop_cost(): assert 2000 == oe.helpers.flop_count("abc", True, 2, size_dict) +def test_bad_path_option(): + with pytest.raises(KeyError): + oe.contract("a,b,c", [1], [2], [3], optimize='optimall') + + +def test_explicit_path(): + x = oe.contract("a,b,c", [1], [2], [3], optimize=[(1, 2), (0, 1)]) + assert x.item() == 6 + + def test_path_optimal(): test_func = oe.paths.optimal @@ -353,3 +363,22 @@ def test_custom_random_optimizer(): assert optimizer.was_used assert len(optimizer.costs) == 16 + + +def test_optimizer_registration(): + + def custom_optimizer(inputs, output, size_dict, memory_limit): + return [(0, 1)] * (len(inputs) - 1) + + with pytest.raises(KeyError): + oe.paths.register_path_fn('optimal', custom_optimizer) + + oe.paths.register_path_fn('custom', custom_optimizer) + assert 'custom' in oe.paths._PATH_OPTIONS + + eq = 'ab,bc,cd' + shapes = [(2, 3), (3, 4), (4, 5)] + path, path_info = oe.contract_path(eq, *shapes, shapes=True, + optimize='custom') + assert path == [(0, 1), (0, 1)] + del oe.paths._PATH_OPTIONS['custom']
FR: separate 'auto' strategy out of contract_path The 'auto' strategy is really nice, but it requires actual arrays because it is based into `contract_path`. Sometimes I want to get a path based merely on shapes. It should be easy to factor out the logic from `contract_path` to a new `paths.auto` that conforms to the standard shape-based path interface.
0.0
ff86c2c9d2bb51d9816b2a92c08787379d512eb2
[ "opt_einsum/tests/test_contract.py::test_contract_path_supply_shapes", "opt_einsum/tests/test_paths.py::test_optimizer_registration" ]
[ "opt_einsum/tests/test_backends.py::test_auto_backend_custom_array_no_tensordot", "opt_einsum/tests/test_contract.py::test_compare[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ad]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,ba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,abc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,bac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abc,cba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,cb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ba,bc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ba,cb]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cd]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,ab]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_drop_in_replacement[aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_greek[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_compare_blas_greek[random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_some_non_alphabet_maintains_order", "opt_einsum/tests/test_contract.py::test_printing", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-False-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[False-True-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-False-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-optimal-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-all-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-2-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-branch-1-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ad]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,ba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,abc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,bac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abc,cba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ba,bc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ba,cb]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cd]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,ab]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cdef]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-abcd,efdc]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_contract_expressions[True-True-random-greedy-aef,fbc,dca->bde]", "opt_einsum/tests/test_contract.py::test_contract_expression_interleaved_input", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants0]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[bdef,cdkj,ji,ikeh,hbc,lfo-constants1]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants2]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[hbc,bdef,cdkj,ji,ikeh,lfo-constants3]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ijab,acd,bce,df,ef->ji-constants4]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ab,cd,ad,cb-constants5]", "opt_einsum/tests/test_contract.py::test_contract_expression_with_constants[ab,bc,cd-constants6]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-0-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-2-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[False-4-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-0-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-2-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-2-5-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-4-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-4-optimal]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-5-greedy]", "opt_einsum/tests/test_contract.py::test_rand_equation[True-4-3-5-optimal]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[a,ab,abc->abc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[a,b,ab->ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ea,fb,gc,hd,abcd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ea,fb,abcd,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ea,fb,gc,hd->efgh]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[acdf,jbje,gihb,hfac,gfac,gifabc,hfac0]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[acdf,jbje,gihb,hfac,gfac,gifabc,hfac1]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[cd,bdhe,aidb,hgca,gc,hgibcd,hgac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abhe,hidj,jgba,hiab,gab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bde,cdh,agdb,hica,ibd,hgicd,hiac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[chd,bde,agbc,hiad,hgc,hgi,hiad]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[chd,bde,agbc,hiad,bdi,cgh,agdb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bdhe,acad,hiab,agac,hibd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,c->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,c->c]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd->cd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab,cd,cd,ef,ef->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,ef->abcdef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,ef->acdf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,de->abcde]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cd,de->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcd,cd->abcd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcd,cd->abd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[eb,cb,fb->cef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dd,fb,be,cdb->cef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bca,cdb,dbf,afc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dcc,fce,ea,dbf->ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fdf,cdd,ccd,afe->ae]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ad]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ed,fcd,ff,bcf->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[baa,dcf,af,cde->be]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bd,db,eac->ace]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fff,fae,bef,def->abd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[efc,dbc,acf,fd->abe]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,ba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,abc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,bac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abc,cba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,cb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ba,bc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ba,cb]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cd]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,ab]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cdef]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,cdef->feba]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[abcd,efdc]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,bc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[baa,bcc->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,ccb->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aab,fa,df,ecc->bde]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[ecb,fef,bad,ed->ac]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bcf,bbb,fbf,fc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bb,ff,be->e]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bcb,bb,fc,fff->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[fbb,dfd,fc,fc->]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[afd,ba,cc,dc->bf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[adb,bc,fa,cfc->d]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[bbd,bda,fc,db->acf]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[dba,ead,cad->bce]", "opt_einsum/tests/test_contract.py::test_linear_vs_ssa[aef,fbc,dca->bde]", "opt_einsum/tests/test_paths.py::test_size_by_dict", "opt_einsum/tests/test_paths.py::test_flop_cost", "opt_einsum/tests/test_paths.py::test_bad_path_option", "opt_einsum/tests/test_paths.py::test_explicit_path", "opt_einsum/tests/test_paths.py::test_path_optimal", "opt_einsum/tests/test_paths.py::test_path_greedy", "opt_einsum/tests/test_paths.py::test_memory_paths", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-eb,cb,fb->cef-order0]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-eb,cb,fb->cef-order1]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-eb,cb,fb->cef-order2]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-eb,cb,fb->cef-order3]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-dd,fb,be,cdb->cef-order4]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-dd,fb,be,cdb->cef-order5]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-dd,fb,be,cdb->cef-order6]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dd,fb,be,cdb->cef-order7]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-bca,cdb,dbf,afc->-order8]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-bca,cdb,dbf,afc->-order9]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-bca,cdb,dbf,afc->-order10]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-bca,cdb,dbf,afc->-order11]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[greedy-dcc,fce,ea,dbf->ab-order12]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-all-dcc,fce,ea,dbf->ab-order13]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[branch-2-dcc,fce,ea,dbf->ab-order14]", "opt_einsum/tests/test_paths.py::test_path_edge_cases[optimal-dcc,fce,ea,dbf->ab-order15]", "opt_einsum/tests/test_paths.py::test_optimal_edge_cases", "opt_einsum/tests/test_paths.py::test_greedy_edge_cases", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[greedy]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[branch-2]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[branch-all]", "opt_einsum/tests/test_paths.py::test_can_optimize_outer_products[optimal]", "opt_einsum/tests/test_paths.py::test_large_path[2]", "opt_einsum/tests/test_paths.py::test_large_path[3]", "opt_einsum/tests/test_paths.py::test_large_path[26]", "opt_einsum/tests/test_paths.py::test_large_path[52]", "opt_einsum/tests/test_paths.py::test_large_path[116]", "opt_einsum/tests/test_paths.py::test_large_path[300]", "opt_einsum/tests/test_paths.py::test_custom_random_greedy", "opt_einsum/tests/test_paths.py::test_custom_branchbound", "opt_einsum/tests/test_paths.py::test_parallel_random_greedy", "opt_einsum/tests/test_paths.py::test_custom_path_optimizer", "opt_einsum/tests/test_paths.py::test_custom_random_optimizer" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2019-02-20 14:10:04+00:00
mit
1,910
dgilland__pydash-164
diff --git a/AUTHORS.rst b/AUTHORS.rst index a1843ad..d167ec9 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -24,3 +24,4 @@ Contributors - Gonzalo Naveira, `gonzalonaveira@github <https://github.com/gonzalonaveira>`_ - Wenbo Zhao, [email protected], `zhaowb@github <https://github.com/zhaowb>`_ - Mervyn Lee, `mervynlee94@github <https://github.com/mervynlee94>`_ +- Weineel Lee, `weineel@github <https://github.com/weineel>`_ diff --git a/src/pydash/objects.py b/src/pydash/objects.py index f3bed2b..6949e8e 100644 --- a/src/pydash/objects.py +++ b/src/pydash/objects.py @@ -934,7 +934,7 @@ def _merge_with(obj, *sources, **kwargs): if _result is not None: result = _result elif all_sequences or all_mappings: - result = _merge_with(obj_value, src_value, _setter=setter) + result = _merge_with(obj_value, src_value, iteratee=iteratee, _setter=setter) else: result = src_value
dgilland/pydash
fa61732c01b39cec0de66f958cef27e7f31bcac2
diff --git a/tests/test_objects.py b/tests/test_objects.py index 2217438..b218043 100644 --- a/tests/test_objects.py +++ b/tests/test_objects.py @@ -573,11 +573,11 @@ def test_merge_no_link_list(): [ ( ( - {"fruits": ["apple"], "vegetables": ["beet"]}, - {"fruits": ["banana"], "vegetables": ["carrot"]}, - lambda a, b: a + b if isinstance(a, list) else b, + {"fruits": ["apple"], "others": {"vegetables": ["beet"]}}, + {"fruits": ["banana"], "others": {"vegetables": ["carrot"]}}, + lambda a, b: a + b if isinstance(a, list) else None, ), - {"fruits": ["apple", "banana"], "vegetables": ["beet", "carrot"]}, + {"fruits": ["apple", "banana"], "others": {"vegetables": ["beet", "carrot"]}}, ), ], )
merge_with: iteratee is lost when _merge_with is recursing. ```python def merge_array(obj_val, src_val): if isinstance(obj_val, list) and isinstance(src_val, list): return difference(obj_val + src_val) merge_with({ 'd': { 'x': [2] } }, { 'd': { 'x': [5] } }, merge_array) ``` ### expect ``` { 'd': { 'x': [2, 5] } } ``` ### actual ``` { 'd': { 'x': [5] } } ```
0.0
fa61732c01b39cec0de66f958cef27e7f31bcac2
[ "tests/test_objects.py::test_merge_with[case0-expected0]" ]
[ "tests/test_objects.py::test_assign[case0-expected0]", "tests/test_objects.py::test_assign[case1-expected1]", "tests/test_objects.py::test_assign_with[case0-expected0]", "tests/test_objects.py::test_callables[case0-expected0]", "tests/test_objects.py::test_callables[case1-expected1]", "tests/test_objects.py::test_clone[case0]", "tests/test_objects.py::test_clone[case1]", "tests/test_objects.py::test_clone_with[case0-<lambda>-expected0]", "tests/test_objects.py::test_clone_with[case1-<lambda>-expected1]", "tests/test_objects.py::test_clone_deep[case0]", "tests/test_objects.py::test_clone_deep[case1]", "tests/test_objects.py::test_clone_deep[case2]", "tests/test_objects.py::test_clone_deep_with[case0-<lambda>-expected0]", "tests/test_objects.py::test_clone_deep_with[case1-<lambda>-expected1]", "tests/test_objects.py::test_clone_deep_with[case2-<lambda>-expected2]", "tests/test_objects.py::test_clone_deep_with[a-<lambda>-a]", "tests/test_objects.py::test_defaults[case0-expected0]", "tests/test_objects.py::test_defaults_deep[case0-expected0]", "tests/test_objects.py::test_defaults_deep[case1-expected1]", "tests/test_objects.py::test_defaults_deep[case2-expected2]", "tests/test_objects.py::test_defaults_deep[case3-expected3]", "tests/test_objects.py::test_defaults_deep[case4-expected4]", "tests/test_objects.py::test_to_dict[case0-expected0]", "tests/test_objects.py::test_to_dict[case1-expected1]", "tests/test_objects.py::test_invert[case0-expected0]", "tests/test_objects.py::test_invert[case1-expected1]", "tests/test_objects.py::test_invert_by[case0-expected0]", "tests/test_objects.py::test_invert_by[case1-expected1]", "tests/test_objects.py::test_invert_by[case2-expected2]", "tests/test_objects.py::test_invoke[case0-1]", "tests/test_objects.py::test_invoke[case1-2]", "tests/test_objects.py::test_invoke[case2-None]", "tests/test_objects.py::test_find_key[case0-expected0]", "tests/test_objects.py::test_find_key[case1-expected1]", "tests/test_objects.py::test_find_key[case2-expected2]", "tests/test_objects.py::test_find_last_key[case0-expected0]", "tests/test_objects.py::test_find_last_key[case1-expected1]", "tests/test_objects.py::test_find_last_key[case2-expected2]", "tests/test_objects.py::test_for_in[case0-expected0]", "tests/test_objects.py::test_for_in[case1-expected1]", "tests/test_objects.py::test_for_in[case2-expected2]", "tests/test_objects.py::test_for_in_right[case0-expected0]", "tests/test_objects.py::test_for_in_right[case1-expected1]", "tests/test_objects.py::test_for_in_right[case2-expected2]", "tests/test_objects.py::test_get[case0-expected0]", "tests/test_objects.py::test_get[case1-4]", "tests/test_objects.py::test_get[case2-expected2]", "tests/test_objects.py::test_get[case3-4]", "tests/test_objects.py::test_get[case4-None]", "tests/test_objects.py::test_get[case5-expected5]", "tests/test_objects.py::test_get[case6-expected6]", "tests/test_objects.py::test_get[case7-expected7]", "tests/test_objects.py::test_get[case8-None]", "tests/test_objects.py::test_get[case9-None]", "tests/test_objects.py::test_get[case10-2]", "tests/test_objects.py::test_get[case11-2]", "tests/test_objects.py::test_get[case12-expected12]", "tests/test_objects.py::test_get[case13-expected13]", "tests/test_objects.py::test_get[case14-haha]", "tests/test_objects.py::test_get[case15-haha]", "tests/test_objects.py::test_get[case16-None]", "tests/test_objects.py::test_get[case17-5]", "tests/test_objects.py::test_get[case18-5]", "tests/test_objects.py::test_get[case19-5]", "tests/test_objects.py::test_get[case20-4]", "tests/test_objects.py::test_get[case21-5]", "tests/test_objects.py::test_get[case22-42]", "tests/test_objects.py::test_get[case23-42]", "tests/test_objects.py::test_get[case24-42]", "tests/test_objects.py::test_get[case25-42]", "tests/test_objects.py::test_get[case26-value]", "tests/test_objects.py::test_get[case27-expected27]", "tests/test_objects.py::test_get[case28-None]", "tests/test_objects.py::test_get[case29-1]", "tests/test_objects.py::test_get[case30-1]", "tests/test_objects.py::test_get[case31-1]", "tests/test_objects.py::test_get[case32-None]", "tests/test_objects.py::test_get[case33-None]", "tests/test_objects.py::test_get[case34-expected34]", "tests/test_objects.py::test_get[case35-3]", "tests/test_objects.py::test_get[case36-1]", "tests/test_objects.py::test_get[case37-1]", "tests/test_objects.py::test_get[case38-John", "tests/test_objects.py::test_get__should_not_populate_defaultdict", "tests/test_objects.py::test_has[case0-True]", "tests/test_objects.py::test_has[case1-True]", "tests/test_objects.py::test_has[case2-True]", "tests/test_objects.py::test_has[case3-False]", "tests/test_objects.py::test_has[case4-True]", "tests/test_objects.py::test_has[case5-True]", "tests/test_objects.py::test_has[case6-True]", "tests/test_objects.py::test_has[case7-False]", "tests/test_objects.py::test_has[case8-True]", "tests/test_objects.py::test_has[case9-True]", "tests/test_objects.py::test_has[case10-True]", "tests/test_objects.py::test_has[case11-True]", "tests/test_objects.py::test_has[case12-False]", "tests/test_objects.py::test_has[case13-False]", "tests/test_objects.py::test_has[case14-False]", "tests/test_objects.py::test_has[case15-False]", "tests/test_objects.py::test_has[case16-True]", "tests/test_objects.py::test_has[case17-True]", "tests/test_objects.py::test_has[case18-True]", "tests/test_objects.py::test_has[case19-True]", "tests/test_objects.py::test_has[case20-True]", "tests/test_objects.py::test_has__should_not_populate_defaultdict", "tests/test_objects.py::test_keys[case0-expected0]", "tests/test_objects.py::test_keys[case1-expected1]", "tests/test_objects.py::test_map_values[case0-expected0]", "tests/test_objects.py::test_map_values[case1-expected1]", "tests/test_objects.py::test_map_values_deep[case0-expected0]", "tests/test_objects.py::test_map_values_deep[case1-expected1]", "tests/test_objects.py::test_merge[case0-expected0]", "tests/test_objects.py::test_merge[case1-expected1]", "tests/test_objects.py::test_merge[case2-expected2]", "tests/test_objects.py::test_merge[case3-expected3]", "tests/test_objects.py::test_merge[case4-expected4]", "tests/test_objects.py::test_merge[case5-expected5]", "tests/test_objects.py::test_merge[case6-expected6]", "tests/test_objects.py::test_merge[case7-expected7]", "tests/test_objects.py::test_merge[case8-expected8]", "tests/test_objects.py::test_merge[case9-expected9]", "tests/test_objects.py::test_merge[case10-None]", "tests/test_objects.py::test_merge[case11-None]", "tests/test_objects.py::test_merge[case12-None]", "tests/test_objects.py::test_merge[case13-expected13]", "tests/test_objects.py::test_merge[case14-expected14]", "tests/test_objects.py::test_merge[case15-expected15]", "tests/test_objects.py::test_merge_no_link_dict", "tests/test_objects.py::test_merge_no_link_list", "tests/test_objects.py::test_omit[case0-expected0]", "tests/test_objects.py::test_omit[case1-expected1]", "tests/test_objects.py::test_omit[case2-expected2]", "tests/test_objects.py::test_omit[case3-expected3]", "tests/test_objects.py::test_omit[case4-expected4]", "tests/test_objects.py::test_omit[case5-expected5]", "tests/test_objects.py::test_omit[case6-expected6]", "tests/test_objects.py::test_omit[case7-expected7]", "tests/test_objects.py::test_omit[case8-expected8]", "tests/test_objects.py::test_omit_by[case0-expected0]", "tests/test_objects.py::test_omit_by[case1-expected1]", "tests/test_objects.py::test_omit_by[case2-expected2]", "tests/test_objects.py::test_omit_by[case3-expected3]", "tests/test_objects.py::test_parse_int[case0-1]", "tests/test_objects.py::test_parse_int[case1-1]", "tests/test_objects.py::test_parse_int[case2-1]", "tests/test_objects.py::test_parse_int[case3-1]", "tests/test_objects.py::test_parse_int[case4-11]", "tests/test_objects.py::test_parse_int[case5-10]", "tests/test_objects.py::test_parse_int[case6-8]", "tests/test_objects.py::test_parse_int[case7-16]", "tests/test_objects.py::test_parse_int[case8-10]", "tests/test_objects.py::test_parse_int[case9-None]", "tests/test_objects.py::test_pick[case0-expected0]", "tests/test_objects.py::test_pick[case1-expected1]", "tests/test_objects.py::test_pick[case2-expected2]", "tests/test_objects.py::test_pick[case3-expected3]", "tests/test_objects.py::test_pick[case4-expected4]", "tests/test_objects.py::test_pick[case5-expected5]", "tests/test_objects.py::test_pick[case6-expected6]", "tests/test_objects.py::test_pick[case7-expected7]", "tests/test_objects.py::test_pick[case8-expected8]", "tests/test_objects.py::test_pick[case9-expected9]", "tests/test_objects.py::test_pick[case10-expected10]", "tests/test_objects.py::test_pick_by[case0-expected0]", "tests/test_objects.py::test_pick_by[case1-expected1]", "tests/test_objects.py::test_pick_by[case2-expected2]", "tests/test_objects.py::test_pick_by[case3-expected3]", "tests/test_objects.py::test_pick_by[case4-expected4]", "tests/test_objects.py::test_pick_by[case5-expected5]", "tests/test_objects.py::test_pick_by[case6-expected6]", "tests/test_objects.py::test_rename_keys[case0-expected0]", "tests/test_objects.py::test_rename_keys[case1-expected1]", "tests/test_objects.py::test_rename_keys[case2-expected2]", "tests/test_objects.py::test_set_[case0-expected0]", "tests/test_objects.py::test_set_[case1-expected1]", "tests/test_objects.py::test_set_[case2-expected2]", "tests/test_objects.py::test_set_[case3-expected3]", "tests/test_objects.py::test_set_[case4-expected4]", "tests/test_objects.py::test_set_[case5-expected5]", "tests/test_objects.py::test_set_[case6-expected6]", "tests/test_objects.py::test_set_[case7-expected7]", "tests/test_objects.py::test_set_[case8-expected8]", "tests/test_objects.py::test_set_[case9-expected9]", "tests/test_objects.py::test_set_[case10-expected10]", "tests/test_objects.py::test_set_[case11-expected11]", "tests/test_objects.py::test_set_[case12-expected12]", "tests/test_objects.py::test_set_[case13-expected13]", "tests/test_objects.py::test_set_[case14-expected14]", "tests/test_objects.py::test_set_with[case0-expected0]", "tests/test_objects.py::test_set_with[case1-expected1]", "tests/test_objects.py::test_set_with[case2-expected2]", "tests/test_objects.py::test_set_with[case3-expected3]", "tests/test_objects.py::test_to_boolean[case0-True]", "tests/test_objects.py::test_to_boolean[case1-False]", "tests/test_objects.py::test_to_boolean[case2-True]", "tests/test_objects.py::test_to_boolean[case3-True]", "tests/test_objects.py::test_to_boolean[case4-False]", "tests/test_objects.py::test_to_boolean[case5-False]", "tests/test_objects.py::test_to_boolean[case6-None]", "tests/test_objects.py::test_to_boolean[case7-None]", "tests/test_objects.py::test_to_boolean[case8-False]", "tests/test_objects.py::test_to_boolean[case9-True]", "tests/test_objects.py::test_to_boolean[case10-False]", "tests/test_objects.py::test_to_boolean[case11-True]", "tests/test_objects.py::test_to_boolean[case12-False]", "tests/test_objects.py::test_to_boolean[case13-False]", "tests/test_objects.py::test_to_boolean[case14-True]", "tests/test_objects.py::test_to_boolean[case15-False]", "tests/test_objects.py::test_to_boolean[case16-True]", "tests/test_objects.py::test_to_boolean[case17-None]", "tests/test_objects.py::test_to_boolean[case18-False]", "tests/test_objects.py::test_to_boolean[case19-None]", "tests/test_objects.py::test_to_integer[1.4-1_0]", "tests/test_objects.py::test_to_integer[1.9-1_0]", "tests/test_objects.py::test_to_integer[1.4-1_1]", "tests/test_objects.py::test_to_integer[1.9-1_1]", "tests/test_objects.py::test_to_integer[foo-0]", "tests/test_objects.py::test_to_integer[None-0]", "tests/test_objects.py::test_to_integer[True-1]", "tests/test_objects.py::test_to_integer[False-0]", "tests/test_objects.py::test_to_integer[case8-0]", "tests/test_objects.py::test_to_integer[case9-0]", "tests/test_objects.py::test_to_integer[case10-0]", "tests/test_objects.py::test_to_number[case0-3.0]", "tests/test_objects.py::test_to_number[case1-2.6]", "tests/test_objects.py::test_to_number[case2-990.0]", "tests/test_objects.py::test_to_number[case3-None]", "tests/test_objects.py::test_to_pairs[case0-expected0]", "tests/test_objects.py::test_to_pairs[case1-expected1]", "tests/test_objects.py::test_to_string[1-1]", "tests/test_objects.py::test_to_string[1.25-1.25]", "tests/test_objects.py::test_to_string[True-True]", "tests/test_objects.py::test_to_string[case3-[1]]", "tests/test_objects.py::test_to_string[d\\xc3\\xa9j\\xc3\\xa0", "tests/test_objects.py::test_to_string[-]", "tests/test_objects.py::test_to_string[None-]", "tests/test_objects.py::test_to_string[case7-2024-08-02]", "tests/test_objects.py::test_transform[case0-expected0]", "tests/test_objects.py::test_transform[case1-expected1]", "tests/test_objects.py::test_transform[case2-expected2]", "tests/test_objects.py::test_update[case0-expected0]", "tests/test_objects.py::test_update[case1-expected1]", "tests/test_objects.py::test_update[case2-expected2]", "tests/test_objects.py::test_update_with[case0-expected0]", "tests/test_objects.py::test_update_with[case1-expected1]", "tests/test_objects.py::test_update_with[case2-expected2]", "tests/test_objects.py::test_unset[obj0-a.0.b.c-True-new_obj0]", "tests/test_objects.py::test_unset[obj1-1-True-new_obj1]", "tests/test_objects.py::test_unset[obj2-1-True-new_obj2]", "tests/test_objects.py::test_unset[obj3-path3-True-new_obj3]", "tests/test_objects.py::test_unset[obj4-[0][0]-False-new_obj4]", "tests/test_objects.py::test_unset[obj5-[0][0][0]-False-new_obj5]", "tests/test_objects.py::test_values[case0-expected0]", "tests/test_objects.py::test_values[case1-expected1]" ]
{ "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2021-06-26 09:07:43+00:00
mit
1,911
dgilland__pydash-222
diff --git a/src/pydash/arrays.py b/src/pydash/arrays.py index d9540a5..03b1847 100644 --- a/src/pydash/arrays.py +++ b/src/pydash/arrays.py @@ -98,6 +98,9 @@ __all__ = ( T = t.TypeVar("T") T2 = t.TypeVar("T2") +T3 = t.TypeVar("T3") +T4 = t.TypeVar("T4") +T5 = t.TypeVar("T5") SequenceT = t.TypeVar("SequenceT", bound=t.Sequence) MutableSequenceT = t.TypeVar("MutableSequenceT", bound=t.MutableSequence) @@ -2387,9 +2390,34 @@ def unshift(array: t.List[T], *items: T2) -> t.List[t.Union[T, T2]]: return array # type: ignore -def unzip(array: t.Iterable[t.Iterable[T]]) -> t.List[t.List[T]]: [email protected] +def unzip(array: t.Iterable[t.Tuple[T, T2]]) -> t.List[t.Tuple[T, T2]]: + ... + + [email protected] +def unzip(array: t.Iterable[t.Tuple[T, T2, T3]]) -> t.List[t.Tuple[T, T2, T3]]: + ... + + [email protected] +def unzip(array: t.Iterable[t.Tuple[T, T2, T3, T4]]) -> t.List[t.Tuple[T, T2, T3, T4]]: + ... + + [email protected] +def unzip(array: t.Iterable[t.Tuple[T, T2, T3, T4, T5]]) -> t.List[t.Tuple[T, T2, T3, T4, T5]]: + ... + + [email protected] +def unzip(array: t.Iterable[t.Iterable[t.Any]]) -> t.List[t.Tuple[t.Any, ...]]: + ... + + +def unzip(array): """ - The inverse of :func:`zip_`, this method splits groups of elements into lists composed of + The inverse of :func:`zip_`, this method splits groups of elements into tuples composed of elements from each group at their corresponding indexes. Args: @@ -2400,24 +2428,38 @@ def unzip(array: t.Iterable[t.Iterable[T]]) -> t.List[t.List[T]]: Example: - >>> unzip([[1, 4, 7], [2, 5, 8], [3, 6, 9]]) - [[1, 2, 3], [4, 5, 6], [7, 8, 9]] + >>> unzip([(1, 4, 7), (2, 5, 8), (3, 6, 9)]) + [(1, 2, 3), (4, 5, 6), (7, 8, 9)] .. versionadded:: 1.0.0 + + .. versionchanged:: 8.0.0 + Support list of tuples instead. """ return zip_(*array) @t.overload def unzip_with( - array: t.Iterable[t.Iterable[T]], + array: t.Iterable[t.Tuple[T, T2]], iteratee: t.Union[ - t.Callable[[T, T, int, t.List[T]], T2], - t.Callable[[T, T, int], T2], - t.Callable[[T, T], T2], - t.Callable[[T], T2], + t.Callable[[t.Union[T, T2, T3], t.Union[T, T2], int], T3], + t.Callable[[t.Union[T, T2, T3], t.Union[T, T2]], T3], + t.Callable[[t.Union[T, T2, T3]], T3], ], -) -> t.List[T2]: +) -> t.List[T3]: + ... + + [email protected] +def unzip_with( + array: t.Iterable[t.Iterable[t.Any]], + iteratee: t.Union[ + t.Callable[[t.Any, t.Any, int], T3], + t.Callable[[t.Any, t.Any], T3], + t.Callable[[t.Any], T3], + ], +) -> t.List[T3]: ... @@ -2425,15 +2467,15 @@ def unzip_with( def unzip_with( array: t.Iterable[t.Iterable[T]], iteratee: None = None, -) -> t.List[t.List[T]]: +) -> t.List[t.Tuple[T]]: ... def unzip_with(array, iteratee=None): """ This method is like :func:`unzip` except that it accepts an iteratee to specify how regrouped - values should be combined. The iteratee is invoked with four arguments: ``(accumulator, value, - index, group)``. + values should be combined. The iteratee is invoked with three arguments: ``(accumulator, value, + index)``. Args: array: List to process. @@ -2445,7 +2487,7 @@ def unzip_with(array, iteratee=None): Example: >>> from pydash import add - >>> unzip_with([[1, 10, 100], [2, 20, 200]], add) + >>> unzip_with([(1, 10, 100), (2, 20, 200)], add) [3, 30, 300] .. versionadded:: 3.3.0 @@ -2624,7 +2666,43 @@ def xor_with(array, *lists, **kwargs): ) -def zip_(*arrays: t.Iterable[T]) -> t.List[t.List[T]]: [email protected] +def zip_(array1: t.Iterable[T], array2: t.Iterable[T2], /) -> t.List[t.Tuple[T, T2]]: + ... + + [email protected] +def zip_( + array1: t.Iterable[T], array2: t.Iterable[T2], array3: t.Iterable[T3], / +) -> t.List[t.Tuple[T, T2, T3]]: + ... + + [email protected] +def zip_( + array1: t.Iterable[T], array2: t.Iterable[T2], array3: t.Iterable[T3], array4: t.Iterable[T4], / +) -> t.List[t.Tuple[T, T2, T3, T4]]: + ... + + [email protected] +def zip_( + array1: t.Iterable[T], + array2: t.Iterable[T2], + array3: t.Iterable[T3], + array4: t.Iterable[T4], + array5: t.Iterable[T5], + /, +) -> t.List[t.Tuple[T, T2, T3, T4, T5]]: + ... + + [email protected] +def zip_(*arrays: t.Iterable[t.Any]) -> t.List[t.Tuple[t.Any, ...]]: + ... + + +def zip_(*arrays): """ Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. @@ -2638,12 +2716,14 @@ def zip_(*arrays: t.Iterable[T]) -> t.List[t.List[T]]: Example: >>> zip_([1, 2, 3], [4, 5, 6], [7, 8, 9]) - [[1, 4, 7], [2, 5, 8], [3, 6, 9]] + [(1, 4, 7), (2, 5, 8), (3, 6, 9)] .. versionadded:: 1.0.0 + + .. versionchanged:: 8.0.0 + Return list of tuples instead of list of lists. """ - # zip returns as a list of tuples so convert to list of lists - return [list(item) for item in zip(*arrays)] + return list(zip(*arrays)) @t.overload @@ -2724,40 +2804,47 @@ def zip_object_deep(keys: t.Iterable[t.Any], values: t.Union[t.List[t.Any], None @t.overload def zip_with( - *arrays: t.Iterable[T], + array1: t.Iterable[T], + array2: t.Iterable[T2], + *, iteratee: t.Union[ - t.Callable[[T, T, int, t.List[T]], T2], - t.Callable[[T, T, int], T2], - t.Callable[[T, T], T2], - t.Callable[[T], T2], + t.Callable[[T, T2, int], T3], + t.Callable[[T, T2], T3], + t.Callable[[T], T3], ], -) -> t.List[T2]: +) -> t.List[T3]: ... @t.overload -def zip_with(*arrays: t.Iterable[T]) -> t.List[t.List[T]]: +def zip_with( + *arrays: t.Iterable[t.Any], + iteratee: t.Union[ + t.Callable[[t.Any, t.Any, int], T2], + t.Callable[[t.Any, t.Any], T2], + t.Callable[[t.Any], T2], + ], +) -> t.List[T2]: ... @t.overload def zip_with( *arrays: t.Union[ - t.Iterable[T], - t.Callable[[T, T, int, t.List[T]], T2], - t.Callable[[T, T, int], T2], - t.Callable[[T, T], T2], - t.Callable[[T], T2], + t.Iterable[t.Any], + t.Callable[[t.Any, t.Any, int], T2], + t.Callable[[t.Any, t.Any], T2], + t.Callable[[t.Any], T2], ], -) -> t.List[t.Union[t.List[T], T2]]: +) -> t.List[T2]: ... def zip_with(*arrays, **kwargs): """ This method is like :func:`zip` except that it accepts an iteratee to specify how grouped values - should be combined. The iteratee is invoked with four arguments: ``(accumulator, value, index, - group)``. + should be combined. The iteratee is invoked with three arguments: + ``(accumulator, value, index)``. Args: *arrays: Lists to process. diff --git a/src/pydash/chaining/all_funcs.pyi b/src/pydash/chaining/all_funcs.pyi index c1e3145..3d7f90a 100644 --- a/src/pydash/chaining/all_funcs.pyi +++ b/src/pydash/chaining/all_funcs.pyi @@ -562,23 +562,49 @@ class AllFuncs: def unshift(self: "Chain[t.List[T]]", *items: T2) -> "Chain[t.List[t.Union[T, T2]]]": return self._wrap(pyd.unshift)(*items) - def unzip(self: "Chain[t.Iterable[t.Iterable[T]]]") -> "Chain[t.List[t.List[T]]]": + @t.overload + def unzip(self: "Chain[t.Iterable[t.Tuple[T, T2]]]") -> "Chain[t.List[t.Tuple[T, T2]]]": ... + @t.overload + def unzip( + self: "Chain[t.Iterable[t.Tuple[T, T2, T3]]]", + ) -> "Chain[t.List[t.Tuple[T, T2, T3]]]": ... + @t.overload + def unzip( + self: "Chain[t.Iterable[t.Tuple[T, T2, T3, T4]]]", + ) -> "Chain[t.List[t.Tuple[T, T2, T3, T4]]]": ... + @t.overload + def unzip( + self: "Chain[t.Iterable[t.Tuple[T, T2, T3, T4, T5]]]", + ) -> "Chain[t.List[t.Tuple[T, T2, T3, T4, T5]]]": ... + @t.overload + def unzip( + self: "Chain[t.Iterable[t.Iterable[t.Any]]]", + ) -> "Chain[t.List[t.Tuple[t.Any, ...]]]": ... + def unzip(self): return self._wrap(pyd.unzip)() @t.overload def unzip_with( - self: "Chain[t.Iterable[t.Iterable[T]]]", + self: "Chain[t.Iterable[t.Tuple[T, T2]]]", iteratee: t.Union[ - t.Callable[[T, T, int, t.List[T]], T2], - t.Callable[[T, T, int], T2], - t.Callable[[T, T], T2], - t.Callable[[T], T2], + t.Callable[[t.Union[T, T2, T3], t.Union[T, T2], int], T3], + t.Callable[[t.Union[T, T2, T3], t.Union[T, T2]], T3], + t.Callable[[t.Union[T, T2, T3]], T3], ], - ) -> "Chain[t.List[T2]]": ... + ) -> "Chain[t.List[T3]]": ... + @t.overload + def unzip_with( + self: "Chain[t.Iterable[t.Iterable[t.Any]]]", + iteratee: t.Union[ + t.Callable[[t.Any, t.Any, int], T3], + t.Callable[[t.Any, t.Any], T3], + t.Callable[[t.Any], T3], + ], + ) -> "Chain[t.List[T3]]": ... @t.overload def unzip_with( self: "Chain[t.Iterable[t.Iterable[T]]]", iteratee: None = None - ) -> "Chain[t.List[t.List[T]]]": ... + ) -> "Chain[t.List[t.Tuple[T]]]": ... def unzip_with(self, iteratee=None): return self._wrap(pyd.unzip_with)(iteratee) @@ -612,7 +638,11 @@ class AllFuncs: def xor_with(self, *lists, **kwargs): return self._wrap(pyd.xor_with)(*lists, **kwargs) - def zip_(self: "Chain[t.Iterable[T]]", *arrays: t.Iterable[T]) -> "Chain[t.List[t.List[T]]]": + @t.overload + def zip_( + self: "Chain[t.Iterable[t.Any]]", *arrays: t.Iterable[t.Any] + ) -> "Chain[t.List[t.Tuple[t.Any, ...]]]": ... + def zip_(self, *arrays): return self._wrap(pyd.zip_)(*arrays) zip = zip_ @@ -638,29 +668,32 @@ class AllFuncs: @t.overload def zip_with( self: "Chain[t.Iterable[T]]", - *arrays: t.Iterable[T], + array2: t.Iterable[T2], + *, iteratee: t.Union[ - t.Callable[[T, T, int, t.List[T]], T2], - t.Callable[[T, T, int], T2], - t.Callable[[T, T], T2], - t.Callable[[T], T2], + t.Callable[[T, T2, int], T3], t.Callable[[T, T2], T3], t.Callable[[T], T3] ], - ) -> "Chain[t.List[T2]]": ... + ) -> "Chain[t.List[T3]]": ... @t.overload def zip_with( - self: "Chain[t.Iterable[T]]", *arrays: t.Iterable[T] - ) -> "Chain[t.List[t.List[T]]]": ... + self: "Chain[t.Iterable[t.Any]]", + *arrays: t.Iterable[t.Any], + iteratee: t.Union[ + t.Callable[[t.Any, t.Any, int], T2], + t.Callable[[t.Any, t.Any], T2], + t.Callable[[t.Any], T2], + ], + ) -> "Chain[t.List[T2]]": ... @t.overload def zip_with( - self: "Chain[t.Union[t.Iterable[T], t.Callable[[T, T, int, t.List[T]], T2], t.Callable[[T, T, int], T2], t.Callable[[T, T], T2], t.Callable[[T], T2]]]", + self: "Chain[t.Union[t.Iterable[t.Any], t.Callable[[t.Any, t.Any, int], T2], t.Callable[[t.Any, t.Any], T2], t.Callable[[t.Any], T2]]]", *arrays: t.Union[ - t.Iterable[T], - t.Callable[[T, T, int, t.List[T]], T2], - t.Callable[[T, T, int], T2], - t.Callable[[T, T], T2], - t.Callable[[T], T2], + t.Iterable[t.Any], + t.Callable[[t.Any, t.Any, int], T2], + t.Callable[[t.Any, t.Any], T2], + t.Callable[[t.Any], T2], ], - ) -> "Chain[t.List[t.Union[t.List[T], T2]]]": ... + ) -> "Chain[t.List[T2]]": ... def zip_with(self, *arrays, **kwargs): return self._wrap(pyd.zip_with)(*arrays, **kwargs) @@ -2689,9 +2722,9 @@ class AllFuncs: return self._wrap(pyd.to_number)(precision) @t.overload - def to_pairs(self: "Chain[t.Mapping[T, T2]]") -> "Chain[t.List[t.List[t.Union[T, T2]]]]": ... + def to_pairs(self: "Chain[t.Mapping[T, T2]]") -> "Chain[t.List[t.Tuple[T, T2]]]": ... @t.overload - def to_pairs(self: "Chain[t.Iterable[T]]") -> "Chain[t.List[t.List[t.Union[int, T]]]]": ... + def to_pairs(self: "Chain[t.Iterable[T]]") -> "Chain[t.List[t.Tuple[int, T]]]": ... @t.overload def to_pairs(self: "Chain[t.Any]") -> "Chain[t.List]": ... def to_pairs(self): diff --git a/src/pydash/objects.py b/src/pydash/objects.py index d5a7c66..c325cb9 100644 --- a/src/pydash/objects.py +++ b/src/pydash/objects.py @@ -2114,12 +2114,12 @@ def to_number(obj: t.Any, precision: int = 0) -> t.Union[float, None]: @t.overload -def to_pairs(obj: t.Mapping[T, T2]) -> t.List[t.List[t.Union[T, T2]]]: +def to_pairs(obj: t.Mapping[T, T2]) -> t.List[t.Tuple[T, T2]]: ... @t.overload -def to_pairs(obj: t.Iterable[T]) -> t.List[t.List[t.Union[int, T]]]: +def to_pairs(obj: t.Iterable[T]) -> t.List[t.Tuple[int, T]]: ... @@ -2130,28 +2130,31 @@ def to_pairs(obj: t.Any) -> t.List: def to_pairs(obj): """ - Creates a two-dimensional list of an object's key-value pairs, i.e., ``[[key1, value1], [key2, - value2]]``. + Creates a list of tuples of an object's key-value pairs, i.e., + ``[(key1, value1), (key2, value2)]``. Args: obj: Object to process. Returns: - Two dimensional list of object's key-value pairs. + List of tuples of the object's key-value pairs. Example: >>> to_pairs([1, 2, 3, 4]) - [[0, 1], [1, 2], [2, 3], [3, 4]] + [(0, 1), (1, 2), (2, 3), (3, 4)] >>> to_pairs({"a": 1}) - [['a', 1]] + [('a', 1)] .. versionadded:: 1.0.0 .. versionchanged:: 4.0.0 Renamed from ``pairs`` to ``to_pairs``. + + .. versionchanged:: 8.0.0 + Returning list of tuples instead of list of lists. """ - return [[key, value] for key, value in iterator(obj)] + return [(key, value) for key, value in iterator(obj)] def to_string(obj: t.Any) -> str:
dgilland/pydash
ef48d55fb5eecf5d3da3a69cab337e6345b1fc29
diff --git a/tests/pytest_mypy_testing/test_arrays.py b/tests/pytest_mypy_testing/test_arrays.py index 2e30951..d7d6cb3 100644 --- a/tests/pytest_mypy_testing/test_arrays.py +++ b/tests/pytest_mypy_testing/test_arrays.py @@ -408,8 +408,7 @@ def test_mypy_unshift() -> None: @pytest.mark.mypy_testing def test_mypy_unzip() -> None: - reveal_type(_.unzip([[1, 4, 7], [2, 5, 8], [3, 6, 9]])) # R: builtins.list[builtins.list[builtins.int]] - reveal_type(_.unzip([(1, 4, 7), (2, 5, 8), (3, 6, 9)])) # R: builtins.list[builtins.list[builtins.int]] + reveal_type(_.unzip([(1, 4, 7), (2, 5, 8), (3, 6, 9)])) # R: builtins.list[Tuple[builtins.int, builtins.int, builtins.int]] @pytest.mark.mypy_testing @@ -447,7 +446,8 @@ def test_mypy_xor_with() -> None: @pytest.mark.mypy_testing def test_mypy_zip_() -> None: - reveal_type(_.zip_([1, 2, 3], [4, 5, 6], [7, 8, 9])) # R: builtins.list[builtins.list[builtins.int]] + reveal_type(_.zip_([1, 2, 3], [4, 5, 6], [7, 8, 9])) # R: builtins.list[Tuple[builtins.int, builtins.int, builtins.int]] + reveal_type(_.zip_([1, 2, 3], ["one", "two", "three"])) # R: builtins.list[Tuple[builtins.int, builtins.str]] @pytest.mark.mypy_testing @@ -469,5 +469,10 @@ def test_mypy_zip_with() -> None: def add(x: int, y: int) -> int: return x + y - reveal_type(_.zip_with([1, 2], [10, 20], [100, 200], add)) # R: builtins.list[Union[builtins.list[builtins.int], builtins.int]] + reveal_type(_.zip_with([1, 2], [10, 20], add)) # R: builtins.list[builtins.int] reveal_type(_.zip_with([1, 2], [10, 20], [100, 200], iteratee=add)) # R: builtins.list[builtins.int] + + def more_hello(s: str, n: int) -> str: + return s * n + + reveal_type(_.zip_with(["hello", "hello", "hello"], [1, 2, 3], iteratee=more_hello)) # R: builtins.list[builtins.str] diff --git a/tests/pytest_mypy_testing/test_objects.py b/tests/pytest_mypy_testing/test_objects.py index b4df527..28645e0 100644 --- a/tests/pytest_mypy_testing/test_objects.py +++ b/tests/pytest_mypy_testing/test_objects.py @@ -298,8 +298,8 @@ def test_mypy_to_number() -> None: @pytest.mark.mypy_testing def test_mypy_to_pairs() -> None: - reveal_type(_.to_pairs([1, 2, 3, 4])) # R: builtins.list[builtins.list[builtins.int]] - reveal_type(_.to_pairs({'a': 1})) # R: builtins.list[builtins.list[Union[builtins.str, builtins.int]]] + reveal_type(_.to_pairs([1, 2, 3, 4])) # R: builtins.list[Tuple[builtins.int, builtins.int]] + reveal_type(_.to_pairs({'a': 1})) # R: builtins.list[Tuple[builtins.str, builtins.int]] reveal_type(_.to_pairs(MyClass())) # R: builtins.list[Any] diff --git a/tests/test_arrays.py b/tests/test_arrays.py index cdf6217..a0070cf 100644 --- a/tests/test_arrays.py +++ b/tests/test_arrays.py @@ -853,8 +853,8 @@ def test_unshift(case, expected): "case,expected", [ ( - [["moe", 30, True], ["larry", 40, False], ["curly", 35, True]], - [["moe", "larry", "curly"], [30, 40, 35], [True, False, True]], + [("moe", 30, True), ("larry", 40, False), ("curly", 35, True)], + [("moe", "larry", "curly"), (30, 40, 35), (True, False, True)], ) ], ) @@ -866,7 +866,7 @@ def test_unzip(case, expected): "case,expected", [ (([],), []), - (([[1, 10, 100], [2, 20, 200]],), [[1, 2], [10, 20], [100, 200]]), + (([[1, 10, 100], [2, 20, 200]],), [(1, 2), (10, 20), (100, 200)]), (([[2, 4, 6], [2, 2, 2]], _.power), [4, 16, 36]), ], ) @@ -902,7 +902,7 @@ def test_xor_with(case, expected): [ ( (["moe", "larry", "curly"], [30, 40, 35], [True, False, True]), - [["moe", 30, True], ["larry", 40, False], ["curly", 35, True]], + [("moe", 30, True), ("larry", 40, False), ("curly", 35, True)], ) ], ) @@ -935,7 +935,7 @@ def test_zip_object_deep(case, expected): @parametrize( "case,expected", [ - (([1, 2],), [[1], [2]]), + (([1, 2],), [(1,), (2,)]), (([1, 2], [3, 4], _.add), [4, 6]), ], ) diff --git a/tests/test_objects.py b/tests/test_objects.py index d3328cf..d0f0ea4 100644 --- a/tests/test_objects.py +++ b/tests/test_objects.py @@ -847,8 +847,8 @@ def test_to_number(case, expected): @parametrize( "case,expected", [ - ({"a": 1, "b": 2, "c": 3}, [["a", 1], ["b", 2], ["c", 3]]), - ([1, 2, 3], [[0, 1], [1, 2], [2, 3]]), + ({"a": 1, "b": 2, "c": 3}, [("a", 1), ("b", 2), ("c", 3)]), + ([1, 2, 3], [(0, 1), (1, 2), (2, 3)]), ], ) def test_to_pairs(case, expected):
Embrace the tuple Would you be open to PR that switches `zip_`, `zip_with` and `to_pairs` to return list of tuples instead? Using a list in python is very similar to using a tuple but in static typing having lists is a bit annoying. For example: ```py import pydash d: dict[str, int] = {"key1": 1, "key2": 2} pairs = pydash.to_pairs(d) # this is list[list[str | int]] first_key, first_value = pairs[0] # first_key is `str | int` and first_value is `str | int` ``` This doesn't make much sense, we know `first_key` should be `str` and `first_value` should be `int`. If `to_pairs` returned list of tuples instead we could type it better and not have this problem. Same with `zip_`: ```py import pydash zipped = pydash.zip_([1, 2, 3], ["hello", "hello", "hello"]) ``` `zipped` is a list of lists of `str | int`, we lost the order on the type level, int and str are blend in the lists. And I think the hardest to work with might be `zip_with` ```py import pydash def more_hello(s: str, time: int) -> str: return s.upper() * time zipped = pydash.zip_with( ["hello", "hello", "hello"], [1, 2, 3], iteratee=more_hello # type error here: cannot assign `str | int` to `str` and `str | int` to `int` ) ``` while this is valid at runtime, the type checker doesn't know that the first argument is `str` and second is `int` because it is all blend into the `list[str | int]` This makes them really hard to use in a type checked context. Chaining functions with the result of these functions is very impractical. I think it would make a lot more sense for these functions to return tuples.
0.0
ef48d55fb5eecf5d3da3a69cab337e6345b1fc29
[ "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_unzip", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_zip_", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_zip_with", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_to_pairs", "tests/test_arrays.py::test_unzip[case0-expected0]", "tests/test_arrays.py::test_unzip_with[case1-expected1]", "tests/test_arrays.py::test_zip_[case0-expected0]", "tests/test_arrays.py::test_zip_with[case0-expected0]" ]
[ "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_chunk", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_compact", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_concat", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_difference", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_difference_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_difference_with", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_drop", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_drop_right", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_drop_right_while", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_drop_while", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_duplicates", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_fill", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_find_index", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_find_last_index", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_flatten", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_flatten_deep", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_flatten_depth", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_from_pairs", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_head", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_index_of", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_initial", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_intercalate", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_interleave", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_intersection", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_intersection_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_intersection_with", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_intersperse", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_last", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_last_index_of", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_mapcat", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_nth", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_pop", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_pull", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_pull_all", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_pull_all_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_pull_all_with", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_pull_at", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_push", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_remove", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_reverse", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_shift", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_slice_", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sort", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sorted_index", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sorted_index_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sorted_index_of", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sorted_last_index", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sorted_last_index_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sorted_last_index_of", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sorted_uniq", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_sorted_uniq_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_splice", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_split_at", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_tail", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_take", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_take_right", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_take_right_while", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_take_while", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_union", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_union_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_union_with", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_uniq", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_uniq_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_uniq_with", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_unshift", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_unzip_with", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_without", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_xor", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_xor_by", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_xor_with", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_zip_object", "tests/pytest_mypy_testing/test_arrays.py::[mypy]test_mypy_zip_object_deep", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_chunk", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_compact", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_concat", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_difference", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_difference_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_difference_with", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_drop", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_drop_right", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_drop_right_while", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_drop_while", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_duplicates", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_fill", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_find_index", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_find_last_index", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_flatten", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_flatten_deep", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_flatten_depth", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_from_pairs", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_head", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_index_of", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_initial", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_intercalate", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_interleave", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_intersection", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_intersection_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_intersection_with", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_intersperse", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_last", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_last_index_of", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_mapcat", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_nth", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_pop", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_pull", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_pull_all", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_pull_all_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_pull_all_with", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_pull_at", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_push", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_remove", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_reverse", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_shift", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_slice_", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sort", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sorted_index", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sorted_index_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sorted_index_of", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sorted_last_index", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sorted_last_index_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sorted_last_index_of", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sorted_uniq", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_sorted_uniq_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_splice", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_split_at", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_tail", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_take", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_take_right", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_take_right_while", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_take_while", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_union", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_union_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_union_with", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_uniq", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_uniq_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_uniq_with", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_unshift", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_unzip", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_unzip_with", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_without", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_xor", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_xor_by", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_xor_with", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_zip_", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_zip_object", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_zip_object_deep", "tests/pytest_mypy_testing/test_arrays.py::test_mypy_zip_with", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_assign", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_assign_with", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_callables", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_clone", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_clone_with", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_clone_deep", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_clone_deep_with", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_defaults", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_defaults_deep", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_find_key", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_find_last_key", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_for_in", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_for_in_right", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_get", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_has", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_invert", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_invert_by", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_invoke", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_keys", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_map_keys", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_map_values", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_map_values_deep", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_merge", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_merge_with", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_omit", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_omit_by", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_parse_int", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_pick", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_pick_by", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_rename_keys", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_set_", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_set_with", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_to_boolean", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_to_dict", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_to_integer", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_to_list", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_to_number", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_to_string", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_transform", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_update", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_update_with", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_unset", "tests/pytest_mypy_testing/test_objects.py::[mypy]test_mypy_values", "tests/pytest_mypy_testing/test_objects.py::test_mypy_assign", "tests/pytest_mypy_testing/test_objects.py::test_mypy_assign_with", "tests/pytest_mypy_testing/test_objects.py::test_mypy_callables", "tests/pytest_mypy_testing/test_objects.py::test_mypy_clone", "tests/pytest_mypy_testing/test_objects.py::test_mypy_clone_with", "tests/pytest_mypy_testing/test_objects.py::test_mypy_clone_deep", "tests/pytest_mypy_testing/test_objects.py::test_mypy_clone_deep_with", "tests/pytest_mypy_testing/test_objects.py::test_mypy_defaults", "tests/pytest_mypy_testing/test_objects.py::test_mypy_defaults_deep", "tests/pytest_mypy_testing/test_objects.py::test_mypy_find_key", "tests/pytest_mypy_testing/test_objects.py::test_mypy_find_last_key", "tests/pytest_mypy_testing/test_objects.py::test_mypy_for_in", "tests/pytest_mypy_testing/test_objects.py::test_mypy_for_in_right", "tests/pytest_mypy_testing/test_objects.py::test_mypy_get", "tests/pytest_mypy_testing/test_objects.py::test_mypy_has", "tests/pytest_mypy_testing/test_objects.py::test_mypy_invert", "tests/pytest_mypy_testing/test_objects.py::test_mypy_invert_by", "tests/pytest_mypy_testing/test_objects.py::test_mypy_invoke", "tests/pytest_mypy_testing/test_objects.py::test_mypy_keys", "tests/pytest_mypy_testing/test_objects.py::test_mypy_map_keys", "tests/pytest_mypy_testing/test_objects.py::test_mypy_map_values", "tests/pytest_mypy_testing/test_objects.py::test_mypy_map_values_deep", "tests/pytest_mypy_testing/test_objects.py::test_mypy_merge", "tests/pytest_mypy_testing/test_objects.py::test_mypy_merge_with", "tests/pytest_mypy_testing/test_objects.py::test_mypy_omit", "tests/pytest_mypy_testing/test_objects.py::test_mypy_omit_by", "tests/pytest_mypy_testing/test_objects.py::test_mypy_parse_int", "tests/pytest_mypy_testing/test_objects.py::test_mypy_pick", "tests/pytest_mypy_testing/test_objects.py::test_mypy_pick_by", "tests/pytest_mypy_testing/test_objects.py::test_mypy_rename_keys", "tests/pytest_mypy_testing/test_objects.py::test_mypy_set_", "tests/pytest_mypy_testing/test_objects.py::test_mypy_set_with", "tests/pytest_mypy_testing/test_objects.py::test_mypy_to_boolean", "tests/pytest_mypy_testing/test_objects.py::test_mypy_to_dict", "tests/pytest_mypy_testing/test_objects.py::test_mypy_to_integer", "tests/pytest_mypy_testing/test_objects.py::test_mypy_to_list", "tests/pytest_mypy_testing/test_objects.py::test_mypy_to_number", "tests/pytest_mypy_testing/test_objects.py::test_mypy_to_pairs", "tests/pytest_mypy_testing/test_objects.py::test_mypy_to_string", "tests/pytest_mypy_testing/test_objects.py::test_mypy_transform", "tests/pytest_mypy_testing/test_objects.py::test_mypy_update", "tests/pytest_mypy_testing/test_objects.py::test_mypy_update_with", "tests/pytest_mypy_testing/test_objects.py::test_mypy_unset", "tests/pytest_mypy_testing/test_objects.py::test_mypy_values", "tests/test_arrays.py::test_chunk[case0-expected0]", "tests/test_arrays.py::test_chunk[case1-expected1]", "tests/test_arrays.py::test_chunk[case2-expected2]", "tests/test_arrays.py::test_chunk[case3-expected3]", "tests/test_arrays.py::test_chunk[case4-expected4]", "tests/test_arrays.py::test_chunk[case5-expected5]", "tests/test_arrays.py::test_compact[case0-expected0]", "tests/test_arrays.py::test_compact[case1-expected1]", "tests/test_arrays.py::test_concat[case0-expected0]", "tests/test_arrays.py::test_concat[case1-expected1]", "tests/test_arrays.py::test_concat[case2-expected2]", "tests/test_arrays.py::test_concat[case3-expected3]", "tests/test_arrays.py::test_concat[case4-expected4]", "tests/test_arrays.py::test_concat[case5-expected5]", "tests/test_arrays.py::test_difference[case0-expected0]", "tests/test_arrays.py::test_difference[case1-expected1]", "tests/test_arrays.py::test_difference[case2-expected2]", "tests/test_arrays.py::test_difference[case3-expected3]", "tests/test_arrays.py::test_difference_by[case0-expected0]", "tests/test_arrays.py::test_difference_by[case1-expected1]", "tests/test_arrays.py::test_difference_by[case2-expected2]", "tests/test_arrays.py::test_difference_with[case0-expected0]", "tests/test_arrays.py::test_difference_with[case1-expected1]", "tests/test_arrays.py::test_difference_with[case2-expected2]", "tests/test_arrays.py::test_drop[case0-expected0]", "tests/test_arrays.py::test_drop[case1-expected1]", "tests/test_arrays.py::test_drop[case2-expected2]", "tests/test_arrays.py::test_drop[case3-expected3]", "tests/test_arrays.py::test_drop[case4-expected4]", "tests/test_arrays.py::test_drop_while[case0-expected0]", "tests/test_arrays.py::test_drop_right[case0-expected0]", "tests/test_arrays.py::test_drop_right[case1-expected1]", "tests/test_arrays.py::test_drop_right[case2-expected2]", "tests/test_arrays.py::test_drop_right[case3-expected3]", "tests/test_arrays.py::test_drop_right[case4-expected4]", "tests/test_arrays.py::test_drop_right_while[case0-expected0]", "tests/test_arrays.py::test_duplicates[case0-expected0]", "tests/test_arrays.py::test_duplicates[case1-expected1]", "tests/test_arrays.py::test_fill[case0-expected0]", "tests/test_arrays.py::test_fill[case1-expected1]", "tests/test_arrays.py::test_fill[case2-expected2]", "tests/test_arrays.py::test_fill[case3-expected3]", "tests/test_arrays.py::test_fill[case4-expected4]", "tests/test_arrays.py::test_fill[case5-expected5]", "tests/test_arrays.py::test_find_index[case0-<lambda>-1]", "tests/test_arrays.py::test_find_index[case1-filter_by1-1]", "tests/test_arrays.py::test_find_index[case2-<lambda>--1]", "tests/test_arrays.py::test_find_last_index[case0-<lambda>-2]", "tests/test_arrays.py::test_find_last_index[case1-filter_by1-1]", "tests/test_arrays.py::test_find_last_index[case2-<lambda>--1]", "tests/test_arrays.py::test_flatten[case0-expected0]", "tests/test_arrays.py::test_flatten_deep[case0-expected0]", "tests/test_arrays.py::test_flatten_depth[case0-expected0]", "tests/test_arrays.py::test_flatten_depth[case1-expected1]", "tests/test_arrays.py::test_flatten_depth[case2-expected2]", "tests/test_arrays.py::test_flatten_depth[case3-expected3]", "tests/test_arrays.py::test_from_pairs[case0-expected0]", "tests/test_arrays.py::test_from_pairs[case1-expected1]", "tests/test_arrays.py::test_head[case0-1]", "tests/test_arrays.py::test_head[case1-None]", "tests/test_arrays.py::test_index_of[case0-2-0-1]", "tests/test_arrays.py::test_index_of[case1-2-3-4]", "tests/test_arrays.py::test_index_of[case2-2-True-2]", "tests/test_arrays.py::test_index_of[case3-4-0--1]", "tests/test_arrays.py::test_index_of[case4-2-10--1]", "tests/test_arrays.py::test_index_of[case5-0-0--1]", "tests/test_arrays.py::test_initial[case0-expected0]", "tests/test_arrays.py::test_initial[case1-expected1]", "tests/test_arrays.py::test_intercalate[case0-expected0]", "tests/test_arrays.py::test_intercalate[case1-expected1]", "tests/test_arrays.py::test_interleave[case0-expected0]", "tests/test_arrays.py::test_interleave[case1-expected1]", "tests/test_arrays.py::test_interleave[case2-expected2]", "tests/test_arrays.py::test_interleave[case3-expected3]", "tests/test_arrays.py::test_intersection[case0-expected0]", "tests/test_arrays.py::test_intersection[case1-expected1]", "tests/test_arrays.py::test_intersection[case2-expected2]", "tests/test_arrays.py::test_intersection[case3-expected3]", "tests/test_arrays.py::test_intersection[case4-expected4]", "tests/test_arrays.py::test_intersection[case5-expected5]", "tests/test_arrays.py::test_intersection_by[case0-expected0]", "tests/test_arrays.py::test_intersection_by[case1-expected1]", "tests/test_arrays.py::test_intersection_by[case2-expected2]", "tests/test_arrays.py::test_intersection_by[case3-expected3]", "tests/test_arrays.py::test_intersection_by[case4-expected4]", "tests/test_arrays.py::test_intersection_by[case5-expected5]", "tests/test_arrays.py::test_intersection_by[case6-expected6]", "tests/test_arrays.py::test_intersection_with[case0-expected0]", "tests/test_arrays.py::test_intersection_with[case1-expected1]", "tests/test_arrays.py::test_intersection_with[case2-expected2]", "tests/test_arrays.py::test_intersection_with[case3-expected3]", "tests/test_arrays.py::test_intersection_with[case4-expected4]", "tests/test_arrays.py::test_intersection_with[case5-expected5]", "tests/test_arrays.py::test_intersperse[case0-expected0]", "tests/test_arrays.py::test_intersperse[case1-expected1]", "tests/test_arrays.py::test_intersperse[case2-expected2]", "tests/test_arrays.py::test_last[case0-3]", "tests/test_arrays.py::test_last[case1-None]", "tests/test_arrays.py::test_last_index_of[case0-2-0--1]", "tests/test_arrays.py::test_last_index_of[case1-2-3-1]", "tests/test_arrays.py::test_last_index_of[case2-0-0--1]", "tests/test_arrays.py::test_last_index_of[case3-3-0--1]", "tests/test_arrays.py::test_last_index_of[case4-3-1--1]", "tests/test_arrays.py::test_last_index_of[case5-3-2--1]", "tests/test_arrays.py::test_last_index_of[case6-3-3-3]", "tests/test_arrays.py::test_last_index_of[case7-3-4-3]", "tests/test_arrays.py::test_last_index_of[case8-3-5-3]", "tests/test_arrays.py::test_last_index_of[case9-3-6-3]", "tests/test_arrays.py::test_last_index_of[case10-3--1-3]", "tests/test_arrays.py::test_last_index_of[case11-3--2-3]", "tests/test_arrays.py::test_last_index_of[case12-3--3-3]", "tests/test_arrays.py::test_last_index_of[case13-3--4--1]", "tests/test_arrays.py::test_last_index_of[case14-3--5--1]", "tests/test_arrays.py::test_last_index_of[case15-3--6--1]", "tests/test_arrays.py::test_last_index_of[case16-3-None-3]", "tests/test_arrays.py::test_mapcat[case0-expected0]", "tests/test_arrays.py::test_nth[case0-2-33]", "tests/test_arrays.py::test_nth[case1-0-11]", "tests/test_arrays.py::test_nth[case2--1-33]", "tests/test_arrays.py::test_nth[case3-4-None]", "tests/test_arrays.py::test_pop[case0-3-after0]", "tests/test_arrays.py::test_pop[case1-1-after1]", "tests/test_arrays.py::test_pop[case2-2-after2]", "tests/test_arrays.py::test_pull[case0-values0-expected0]", "tests/test_arrays.py::test_pull_all[case0-values0-expected0]", "tests/test_arrays.py::test_pull_all[case1-values1-expected1]", "tests/test_arrays.py::test_pull_all[case2-values2-expected2]", "tests/test_arrays.py::test_pull_all_by[case0-values0-None-expected0]", "tests/test_arrays.py::test_pull_all_by[case1-values1-<lambda>-expected1]", "tests/test_arrays.py::test_pull_all_with[case0-values0-None-expected0]", "tests/test_arrays.py::test_pull_all_with[case1-values1-<lambda>-expected1]", "tests/test_arrays.py::test_pull_all_with[case2-values2-<lambda>-expected2]", "tests/test_arrays.py::test_pull_at[case0-expected0]", "tests/test_arrays.py::test_pull_at[case1-expected1]", "tests/test_arrays.py::test_pull_at[case2-expected2]", "tests/test_arrays.py::test_push[case0-expected0]", "tests/test_arrays.py::test_push[case1-expected1]", "tests/test_arrays.py::test_push[case2-expected2]", "tests/test_arrays.py::test_remove[case0-<lambda>-expected0]", "tests/test_arrays.py::test_remove[case1-<lambda>-expected1]", "tests/test_arrays.py::test_reverse[case0-expected0]", "tests/test_arrays.py::test_reverse[abcdef-fedcba]", "tests/test_arrays.py::test_shift[case0-1-after0]", "tests/test_arrays.py::test_slice_[case0-expected0]", "tests/test_arrays.py::test_slice_[case1-expected1]", "tests/test_arrays.py::test_slice_[case2-expected2]", "tests/test_arrays.py::test_slice_[case3-expected3]", "tests/test_arrays.py::test_slice_[case4-expected4]", "tests/test_arrays.py::test_slice_[case5-expected5]", "tests/test_arrays.py::test_slice_[case6-expected6]", "tests/test_arrays.py::test_slice_[case7-expected7]", "tests/test_arrays.py::test_slice_[case8-expected8]", "tests/test_arrays.py::test_slice_[case9-expected9]", "tests/test_arrays.py::test_sort[case0-expected0]", "tests/test_arrays.py::test_sort[case1-expected1]", "tests/test_arrays.py::test_sort[case2-expected2]", "tests/test_arrays.py::test_sort[case3-expected3]", "tests/test_arrays.py::test_sort_comparator_key_exception", "tests/test_arrays.py::test_sorted_index[case0-2]", "tests/test_arrays.py::test_sorted_index[case1-2]", "tests/test_arrays.py::test_sorted_index[case2-2]", "tests/test_arrays.py::test_sorted_index[case3-0]", "tests/test_arrays.py::test_sorted_index_by[case0-2]", "tests/test_arrays.py::test_sorted_index_by[case1-2]", "tests/test_arrays.py::test_sorted_index_of[array0-10-3]", "tests/test_arrays.py::test_sorted_index_of[array1-11--1]", "tests/test_arrays.py::test_sorted_last_index[case0-4]", "tests/test_arrays.py::test_sorted_last_index[case1-4]", "tests/test_arrays.py::test_sorted_last_index[case2-0]", "tests/test_arrays.py::test_sorted_last_index_by[case0-2]", "tests/test_arrays.py::test_sorted_last_index_by[case1-2]", "tests/test_arrays.py::test_sorted_last_index_of[array0-10-4]", "tests/test_arrays.py::test_sorted_last_index_of[array1-11--1]", "tests/test_arrays.py::test_sorted_uniq[case0-expected0]", "tests/test_arrays.py::test_sorted_uniq[case1-expected1]", "tests/test_arrays.py::test_sorted_uniq_by[case0-<lambda>-expected0]", "tests/test_arrays.py::test_sorted_uniq_by[case1-<lambda>-expected1]", "tests/test_arrays.py::test_splice[case0-expected0-after0]", "tests/test_arrays.py::test_splice[case1-expected1-after1]", "tests/test_arrays.py::test_splice[case2-expected2-after2]", "tests/test_arrays.py::test_splice[case3-expected3-after3]", "tests/test_arrays.py::test_splice[case4-expected4-after4]", "tests/test_arrays.py::test_splice_string[case0-1splice23]", "tests/test_arrays.py::test_split_at[case0-expected0]", "tests/test_arrays.py::test_split_at[case1-expected1]", "tests/test_arrays.py::test_tail[case0-expected0]", "tests/test_arrays.py::test_tail[case1-expected1]", "tests/test_arrays.py::test_take[case0-expected0]", "tests/test_arrays.py::test_take[case1-expected1]", "tests/test_arrays.py::test_take[case2-expected2]", "tests/test_arrays.py::test_take[case3-expected3]", "tests/test_arrays.py::test_take[case4-expected4]", "tests/test_arrays.py::test_take_while[case0-expected0]", "tests/test_arrays.py::test_take_right[case0-expected0]", "tests/test_arrays.py::test_take_right[case1-expected1]", "tests/test_arrays.py::test_take_right[case2-expected2]", "tests/test_arrays.py::test_take_right[case3-expected3]", "tests/test_arrays.py::test_take_right[case4-expected4]", "tests/test_arrays.py::test_take_right_while[case0-expected0]", "tests/test_arrays.py::test_uniq[case0-expected0]", "tests/test_arrays.py::test_uniq[case1-expected1]", "tests/test_arrays.py::test_uniq_by[case0-<lambda>-expected0]", "tests/test_arrays.py::test_uniq_by[case1-iteratee1-expected1]", "tests/test_arrays.py::test_uniq_by[case2-x-expected2]", "tests/test_arrays.py::test_uniq_by[case3-<lambda>-expected3]", "tests/test_arrays.py::test_uniq_with[case0-<lambda>-expected0]", "tests/test_arrays.py::test_uniq_with[case1-<lambda>-expected1]", "tests/test_arrays.py::test_union[case0-expected0]", "tests/test_arrays.py::test_union[case1-expected1]", "tests/test_arrays.py::test_union_by[case0-<lambda>-expected0]", "tests/test_arrays.py::test_union_by[case1-<lambda>-expected1]", "tests/test_arrays.py::test_union_by[case2-None-expected2]", "tests/test_arrays.py::test_union_by[case3-None-expected3]", "tests/test_arrays.py::test_union_with[case0-expected0]", "tests/test_arrays.py::test_union_with[case1-expected1]", "tests/test_arrays.py::test_union_with[case2-expected2]", "tests/test_arrays.py::test_unshift[case0-expected0]", "tests/test_arrays.py::test_unshift[case1-expected1]", "tests/test_arrays.py::test_unshift[case2-expected2]", "tests/test_arrays.py::test_unzip_with[case0-expected0]", "tests/test_arrays.py::test_unzip_with[case2-expected2]", "tests/test_arrays.py::test_without[case0-expected0]", "tests/test_arrays.py::test_xor[case0-expected0]", "tests/test_arrays.py::test_xor[case1-expected1]", "tests/test_arrays.py::test_xor_by[case0-expected0]", "tests/test_arrays.py::test_xor_with[case0-expected0]", "tests/test_arrays.py::test_zip_object[case0-expected0]", "tests/test_arrays.py::test_zip_object[case1-expected1]", "tests/test_arrays.py::test_zip_object_deep[case0-expected0]", "tests/test_arrays.py::test_zip_object_deep[case1-expected1]", "tests/test_arrays.py::test_zip_with[case1-expected1]", "tests/test_objects.py::test_assign[case0-expected0]", "tests/test_objects.py::test_assign[case1-expected1]", "tests/test_objects.py::test_assign_with[case0-expected0]", "tests/test_objects.py::test_callables[case0-expected0]", "tests/test_objects.py::test_callables[case1-expected1]", "tests/test_objects.py::test_clone[case0]", "tests/test_objects.py::test_clone[case1]", "tests/test_objects.py::test_clone_with[case0-<lambda>-expected0]", "tests/test_objects.py::test_clone_with[case1-<lambda>-expected1]", "tests/test_objects.py::test_clone_deep[case0]", "tests/test_objects.py::test_clone_deep[case1]", "tests/test_objects.py::test_clone_deep[case2]", "tests/test_objects.py::test_clone_deep_with[case0-<lambda>-expected0]", "tests/test_objects.py::test_clone_deep_with[case1-<lambda>-expected1]", "tests/test_objects.py::test_clone_deep_with[case2-<lambda>-expected2]", "tests/test_objects.py::test_clone_deep_with[a-<lambda>-a]", "tests/test_objects.py::test_defaults[case0-expected0]", "tests/test_objects.py::test_defaults_deep[case0-expected0]", "tests/test_objects.py::test_defaults_deep[case1-expected1]", "tests/test_objects.py::test_defaults_deep[case2-expected2]", "tests/test_objects.py::test_defaults_deep[case3-expected3]", "tests/test_objects.py::test_defaults_deep[case4-expected4]", "tests/test_objects.py::test_to_dict[case0-expected0]", "tests/test_objects.py::test_to_dict[case1-expected1]", "tests/test_objects.py::test_invert[case0-expected0]", "tests/test_objects.py::test_invert[case1-expected1]", "tests/test_objects.py::test_invert_by[case0-expected0]", "tests/test_objects.py::test_invert_by[case1-expected1]", "tests/test_objects.py::test_invert_by[case2-expected2]", "tests/test_objects.py::test_invoke[case0-1]", "tests/test_objects.py::test_invoke[case1-2]", "tests/test_objects.py::test_invoke[case2-None]", "tests/test_objects.py::test_find_key[case0-expected0]", "tests/test_objects.py::test_find_key[case1-expected1]", "tests/test_objects.py::test_find_key[case2-expected2]", "tests/test_objects.py::test_find_last_key[case0-expected0]", "tests/test_objects.py::test_find_last_key[case1-expected1]", "tests/test_objects.py::test_find_last_key[case2-expected2]", "tests/test_objects.py::test_for_in[case0-expected0]", "tests/test_objects.py::test_for_in[case1-expected1]", "tests/test_objects.py::test_for_in[case2-expected2]", "tests/test_objects.py::test_for_in_right[case0-expected0]", "tests/test_objects.py::test_for_in_right[case1-expected1]", "tests/test_objects.py::test_for_in_right[case2-expected2]", "tests/test_objects.py::test_get[case0-expected0]", "tests/test_objects.py::test_get[case1-4]", "tests/test_objects.py::test_get[case2-expected2]", "tests/test_objects.py::test_get[case3-4]", "tests/test_objects.py::test_get[case4-None]", "tests/test_objects.py::test_get[case5-expected5]", "tests/test_objects.py::test_get[case6-expected6]", "tests/test_objects.py::test_get[case7-expected7]", "tests/test_objects.py::test_get[case8-None]", "tests/test_objects.py::test_get[case9-None]", "tests/test_objects.py::test_get[case10-2]", "tests/test_objects.py::test_get[case11-2]", "tests/test_objects.py::test_get[case12-expected12]", "tests/test_objects.py::test_get[case13-expected13]", "tests/test_objects.py::test_get[case14-haha]", "tests/test_objects.py::test_get[case15-haha]", "tests/test_objects.py::test_get[case16-None]", "tests/test_objects.py::test_get[case17-5]", "tests/test_objects.py::test_get[case18-5]", "tests/test_objects.py::test_get[case19-5]", "tests/test_objects.py::test_get[case20-4]", "tests/test_objects.py::test_get[case21-5]", "tests/test_objects.py::test_get[case22-5]", "tests/test_objects.py::test_get[case23-42]", "tests/test_objects.py::test_get[case24-49]", "tests/test_objects.py::test_get[case25-42]", "tests/test_objects.py::test_get[case26-42]", "tests/test_objects.py::test_get[case27-42]", "tests/test_objects.py::test_get[case28-value]", "tests/test_objects.py::test_get[case29-expected29]", "tests/test_objects.py::test_get[case30-None]", "tests/test_objects.py::test_get[case31-1]", "tests/test_objects.py::test_get[case32-1]", "tests/test_objects.py::test_get[case33-1]", "tests/test_objects.py::test_get[case34-None]", "tests/test_objects.py::test_get[case35-None]", "tests/test_objects.py::test_get[case36-expected36]", "tests/test_objects.py::test_get[case37-3]", "tests/test_objects.py::test_get[case38-1]", "tests/test_objects.py::test_get[case39-1]", "tests/test_objects.py::test_get[case40-John", "tests/test_objects.py::test_get[case41-None]", "tests/test_objects.py::test_get__should_not_populate_defaultdict", "tests/test_objects.py::test_get__raises_for_objects_when_path_restricted[obj0-__init__.__globals__]", "tests/test_objects.py::test_get__raises_for_objects_when_path_restricted[obj1-__globals__]", "tests/test_objects.py::test_get__raises_for_objects_when_path_restricted[obj2-subobj.__builtins__]", "tests/test_objects.py::test_get__raises_for_objects_when_path_restricted[obj3-__builtins__]", "tests/test_objects.py::test_get__does_not_raise_for_dict_or_list_when_path_restricted[obj0-__globals__]", "tests/test_objects.py::test_get__does_not_raise_for_dict_or_list_when_path_restricted[obj1-__builtins__]", "tests/test_objects.py::test_get__does_not_raise_for_dict_or_list_when_path_restricted[obj2-__globals__]", "tests/test_objects.py::test_get__does_not_raise_for_dict_or_list_when_path_restricted[obj3-__builtins__]", "tests/test_objects.py::test_get__does_not_raise_for_objects_when_path_is_unrestricted[obj0-__name__]", "tests/test_objects.py::test_get__does_not_raise_for_objects_when_path_is_unrestricted[obj1-foo.__dict__]", "tests/test_objects.py::test_get__does_not_raise_for_objects_when_path_is_unrestricted[obj2-__len__]", "tests/test_objects.py::test_has[case0-True]", "tests/test_objects.py::test_has[case1-True]", "tests/test_objects.py::test_has[case2-True]", "tests/test_objects.py::test_has[case3-False]", "tests/test_objects.py::test_has[case4-True]", "tests/test_objects.py::test_has[case5-True]", "tests/test_objects.py::test_has[case6-True]", "tests/test_objects.py::test_has[case7-False]", "tests/test_objects.py::test_has[case8-True]", "tests/test_objects.py::test_has[case9-True]", "tests/test_objects.py::test_has[case10-True]", "tests/test_objects.py::test_has[case11-True]", "tests/test_objects.py::test_has[case12-False]", "tests/test_objects.py::test_has[case13-False]", "tests/test_objects.py::test_has[case14-False]", "tests/test_objects.py::test_has[case15-False]", "tests/test_objects.py::test_has[case16-True]", "tests/test_objects.py::test_has[case17-True]", "tests/test_objects.py::test_has[case18-True]", "tests/test_objects.py::test_has[case19-True]", "tests/test_objects.py::test_has[case20-True]", "tests/test_objects.py::test_has__should_not_populate_defaultdict", "tests/test_objects.py::test_keys[case0-expected0]", "tests/test_objects.py::test_keys[case1-expected1]", "tests/test_objects.py::test_map_values[case0-expected0]", "tests/test_objects.py::test_map_values[case1-expected1]", "tests/test_objects.py::test_map_values_deep[case0-expected0]", "tests/test_objects.py::test_map_values_deep[case1-expected1]", "tests/test_objects.py::test_merge[case0-expected0]", "tests/test_objects.py::test_merge[case1-expected1]", "tests/test_objects.py::test_merge[case2-expected2]", "tests/test_objects.py::test_merge[case3-expected3]", "tests/test_objects.py::test_merge[case4-expected4]", "tests/test_objects.py::test_merge[case5-expected5]", "tests/test_objects.py::test_merge[case6-expected6]", "tests/test_objects.py::test_merge[case7-expected7]", "tests/test_objects.py::test_merge[case8-expected8]", "tests/test_objects.py::test_merge[case9-expected9]", "tests/test_objects.py::test_merge[case10-None]", "tests/test_objects.py::test_merge[case11-None]", "tests/test_objects.py::test_merge[case12-None]", "tests/test_objects.py::test_merge[case13-expected13]", "tests/test_objects.py::test_merge[case14-expected14]", "tests/test_objects.py::test_merge[case15-expected15]", "tests/test_objects.py::test_merge_no_link_dict", "tests/test_objects.py::test_merge_no_link_list", "tests/test_objects.py::test_merge_with[case0-expected0]", "tests/test_objects.py::test_omit[case0-expected0]", "tests/test_objects.py::test_omit[case1-expected1]", "tests/test_objects.py::test_omit[case2-expected2]", "tests/test_objects.py::test_omit[case3-expected3]", "tests/test_objects.py::test_omit[case4-expected4]", "tests/test_objects.py::test_omit[case5-expected5]", "tests/test_objects.py::test_omit[case6-expected6]", "tests/test_objects.py::test_omit[case7-expected7]", "tests/test_objects.py::test_omit[case8-expected8]", "tests/test_objects.py::test_omit_by[case0-expected0]", "tests/test_objects.py::test_omit_by[case1-expected1]", "tests/test_objects.py::test_omit_by[case2-expected2]", "tests/test_objects.py::test_omit_by[case3-expected3]", "tests/test_objects.py::test_parse_int[case0-1]", "tests/test_objects.py::test_parse_int[case1-1]", "tests/test_objects.py::test_parse_int[case2-1]", "tests/test_objects.py::test_parse_int[case3-1]", "tests/test_objects.py::test_parse_int[case4-11]", "tests/test_objects.py::test_parse_int[case5-10]", "tests/test_objects.py::test_parse_int[case6-8]", "tests/test_objects.py::test_parse_int[case7-16]", "tests/test_objects.py::test_parse_int[case8-10]", "tests/test_objects.py::test_parse_int[case9-None]", "tests/test_objects.py::test_pick[case0-expected0]", "tests/test_objects.py::test_pick[case1-expected1]", "tests/test_objects.py::test_pick[case2-expected2]", "tests/test_objects.py::test_pick[case3-expected3]", "tests/test_objects.py::test_pick[case4-expected4]", "tests/test_objects.py::test_pick[case5-expected5]", "tests/test_objects.py::test_pick[case6-expected6]", "tests/test_objects.py::test_pick[case7-expected7]", "tests/test_objects.py::test_pick[case8-expected8]", "tests/test_objects.py::test_pick[case9-expected9]", "tests/test_objects.py::test_pick[case10-expected10]", "tests/test_objects.py::test_pick_by[case0-expected0]", "tests/test_objects.py::test_pick_by[case1-expected1]", "tests/test_objects.py::test_pick_by[case2-expected2]", "tests/test_objects.py::test_pick_by[case3-expected3]", "tests/test_objects.py::test_pick_by[case4-expected4]", "tests/test_objects.py::test_pick_by[case5-expected5]", "tests/test_objects.py::test_pick_by[case6-expected6]", "tests/test_objects.py::test_rename_keys[case0-expected0]", "tests/test_objects.py::test_rename_keys[case1-expected1]", "tests/test_objects.py::test_rename_keys[case2-expected2]", "tests/test_objects.py::test_set_[case0-expected0]", "tests/test_objects.py::test_set_[case1-expected1]", "tests/test_objects.py::test_set_[case2-expected2]", "tests/test_objects.py::test_set_[case3-expected3]", "tests/test_objects.py::test_set_[case4-expected4]", "tests/test_objects.py::test_set_[case5-expected5]", "tests/test_objects.py::test_set_[case6-expected6]", "tests/test_objects.py::test_set_[case7-expected7]", "tests/test_objects.py::test_set_[case8-expected8]", "tests/test_objects.py::test_set_[case9-expected9]", "tests/test_objects.py::test_set_[case10-expected10]", "tests/test_objects.py::test_set_[case11-expected11]", "tests/test_objects.py::test_set_[case12-expected12]", "tests/test_objects.py::test_set_[case13-expected13]", "tests/test_objects.py::test_set_[case14-expected14]", "tests/test_objects.py::test_set_on_class_works_the_same_with_string_and_list", "tests/test_objects.py::test_set_with[case0-expected0]", "tests/test_objects.py::test_set_with[case1-expected1]", "tests/test_objects.py::test_set_with[case2-expected2]", "tests/test_objects.py::test_set_with[case3-expected3]", "tests/test_objects.py::test_to_boolean[case0-True]", "tests/test_objects.py::test_to_boolean[case1-False]", "tests/test_objects.py::test_to_boolean[case2-True]", "tests/test_objects.py::test_to_boolean[case3-True]", "tests/test_objects.py::test_to_boolean[case4-False]", "tests/test_objects.py::test_to_boolean[case5-False]", "tests/test_objects.py::test_to_boolean[case6-None]", "tests/test_objects.py::test_to_boolean[case7-None]", "tests/test_objects.py::test_to_boolean[case8-False]", "tests/test_objects.py::test_to_boolean[case9-True]", "tests/test_objects.py::test_to_boolean[case10-False]", "tests/test_objects.py::test_to_boolean[case11-True]", "tests/test_objects.py::test_to_boolean[case12-False]", "tests/test_objects.py::test_to_boolean[case13-False]", "tests/test_objects.py::test_to_boolean[case14-True]", "tests/test_objects.py::test_to_boolean[case15-False]", "tests/test_objects.py::test_to_boolean[case16-True]", "tests/test_objects.py::test_to_boolean[case17-None]", "tests/test_objects.py::test_to_boolean[case18-False]", "tests/test_objects.py::test_to_boolean[case19-None]", "tests/test_objects.py::test_to_integer[1.4-1_0]", "tests/test_objects.py::test_to_integer[1.9-1_0]", "tests/test_objects.py::test_to_integer[1.4-1_1]", "tests/test_objects.py::test_to_integer[1.9-1_1]", "tests/test_objects.py::test_to_integer[foo-0]", "tests/test_objects.py::test_to_integer[None-0]", "tests/test_objects.py::test_to_integer[True-1]", "tests/test_objects.py::test_to_integer[False-0]", "tests/test_objects.py::test_to_integer[case8-0]", "tests/test_objects.py::test_to_integer[case9-0]", "tests/test_objects.py::test_to_integer[case10-0]", "tests/test_objects.py::test_to_number[case0-3.0]", "tests/test_objects.py::test_to_number[case1-2.6]", "tests/test_objects.py::test_to_number[case2-990.0]", "tests/test_objects.py::test_to_number[case3-None]", "tests/test_objects.py::test_to_pairs[case0-expected0]", "tests/test_objects.py::test_to_pairs[case1-expected1]", "tests/test_objects.py::test_to_string[1-1]", "tests/test_objects.py::test_to_string[1.25-1.25]", "tests/test_objects.py::test_to_string[True-True]", "tests/test_objects.py::test_to_string[case3-[1]]", "tests/test_objects.py::test_to_string[d\\xc3\\xa9j\\xc3\\xa0", "tests/test_objects.py::test_to_string[-]", "tests/test_objects.py::test_to_string[None-]", "tests/test_objects.py::test_to_string[case7-2024-08-08]", "tests/test_objects.py::test_transform[case0-expected0]", "tests/test_objects.py::test_transform[case1-expected1]", "tests/test_objects.py::test_transform[case2-expected2]", "tests/test_objects.py::test_update[case0-expected0]", "tests/test_objects.py::test_update[case1-expected1]", "tests/test_objects.py::test_update[case2-expected2]", "tests/test_objects.py::test_update_with[case0-expected0]", "tests/test_objects.py::test_update_with[case1-expected1]", "tests/test_objects.py::test_update_with[case2-expected2]", "tests/test_objects.py::test_unset[obj0-a.0.b.c-True-new_obj0]", "tests/test_objects.py::test_unset[obj1-1-True-new_obj1]", "tests/test_objects.py::test_unset[obj2-1-True-new_obj2]", "tests/test_objects.py::test_unset[obj3-path3-True-new_obj3]", "tests/test_objects.py::test_unset[obj4-[0][0]-False-new_obj4]", "tests/test_objects.py::test_unset[obj5-[0][0][0]-False-new_obj5]", "tests/test_objects.py::test_values[case0-expected0]", "tests/test_objects.py::test_values[case1-expected1]" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2024-02-20 03:09:03+00:00
mit
1,912
dhatim__python-license-check-75
diff --git a/liccheck/requirements.py b/liccheck/requirements.py index 8bfc446..8c8e106 100644 --- a/liccheck/requirements.py +++ b/liccheck/requirements.py @@ -25,6 +25,10 @@ def parse_requirements(requirement_file): for req in pip_parse_requirements(requirement_file, session=PipSession()): install_req = install_req_from_parsed_requirement(req) if install_req.markers and not pkg_resources.evaluate_marker(str(install_req.markers)): + # req should not installed due to env markers + continue + elif install_req.editable: + # skip editable req as they are failing in the resolve phase continue requirements.append(pkg_resources.Requirement.parse(str(install_req.req))) return requirements
dhatim/python-license-check
6f804d1314997075883a57ce24baa5a8ee4afe98
diff --git a/tests/test_get_packages_info.py b/tests/test_get_packages_info.py index 1ec99b0..8daadbe 100644 --- a/tests/test_get_packages_info.py +++ b/tests/test_get_packages_info.py @@ -11,6 +11,7 @@ def test_license_strip(tmpfile): tmpfh.close() assert get_packages_info(tmppath)[0]["licenses"] == ["MIT"] + def test_requirements_markers(tmpfile): tmpfh, tmppath = tmpfile tmpfh.write( @@ -24,6 +25,19 @@ def test_requirements_markers(tmpfile): assert len(get_packages_info(tmppath)) == 1 +def test_editable_requirements_get_ignored(tmpfile): + tmpfh, tmppath = tmpfile + tmpfh.write( + "-e file:some_editable_req\n" + "pip\n" + ) + tmpfh.close() + + packages_info = get_packages_info(tmppath) + assert len(packages_info) == 1 + assert packages_info[0]["name"] == "pip" + + @pytest.mark.parametrize( ('no_deps', 'expected_packages'), ( pytest.param(
Editable requirements (-e) raises "DistributionNotFound: The 'None' distribution was not found" Editable requirements, i.e: rows like this one `-e file:some_internal_package # via -r requirements.in` Are currently making this library fail with `pkg_resources.DistributionNotFound: The 'None' distribution was not found and is required by the application` This is kind of related to https://github.com/dhatim/python-license-check/issues/33 but although error message is the same, it is actually a different problem as that one relates to `git+https://` construct, and this one, to the `-e` construct
0.0
6f804d1314997075883a57ce24baa5a8ee4afe98
[ "tests/test_get_packages_info.py::test_editable_requirements_get_ignored" ]
[ "tests/test_get_packages_info.py::test_license_strip", "tests/test_get_packages_info.py::test_deps[with", "tests/test_get_packages_info.py::test_deps[without" ]
{ "failed_lite_validators": [ "has_hyperlinks" ], "has_test_patch": true, "is_lite": false }
2021-07-12 08:57:27+00:00
apache-2.0
1,913
dicompyler__dicompyler-core-96
diff --git a/.travis.yml b/.travis.yml index 8de7b4f..d399453 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: python python: - 2.7 - - 3.4 - 3.5 - 3.6 install: diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index e37af2c..048bc4b 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -101,7 +101,7 @@ Before you submit a pull request, check that it meets these guidelines: 2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst. -3. The pull request should work for Python 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check +3. The pull request should work for Python 2.7, 3.5, and 3.6. Check https://travis-ci.org/dicompyler/dicompyler-core/pull_requests and make sure that the tests pass for all supported Python versions. diff --git a/README.rst b/README.rst index cf7c59f..c24a703 100644 --- a/README.rst +++ b/README.rst @@ -15,7 +15,7 @@ Other information - Free software: `BSD license <https://github.com/dicompyler/dicompyler-core/blob/master/LICENSE>`__ - Documentation: `Read the docs <https://dicompyler-core.readthedocs.io>`__ -- Tested on Python 2.7, 3.4, 3.5, 3.6 +- Tested on Python 2.7, 3.5, 3.6 Dependencies ------------ diff --git a/dicompylercore/dicomparser.py b/dicompylercore/dicomparser.py index 3be8daa..2aa8346 100755 --- a/dicompylercore/dicomparser.py +++ b/dicompylercore/dicomparser.py @@ -410,7 +410,7 @@ class DicomParser: if (pixel_array.min() < wmin): wmin = pixel_array.min() # Default window is the range of the data array - window = int(abs(wmax) + abs(wmin)) + window = int(wmax - wmin) # Default level is the range midpoint minus the window minimum level = int(window / 2 - abs(wmin)) return window, level diff --git a/dicompylercore/dvh.py b/dicompylercore/dvh.py index 24155a4..14c2777 100644 --- a/dicompylercore/dvh.py +++ b/dicompylercore/dvh.py @@ -262,7 +262,7 @@ class DVH(object): @property def max(self): """Return the maximum dose.""" - if self.counts.size == 1: + if self.counts.size <= 1 or max(self.counts) == 0: return 0 diff = self.differential # Find the the maximum non-zero dose bin @@ -271,7 +271,7 @@ class DVH(object): @property def min(self): """Return the minimum dose.""" - if self.counts.size == 1: + if self.counts.size <= 1 or max(self.counts) == 0: return 0 diff = self.differential # Find the the minimum non-zero dose bin @@ -280,7 +280,7 @@ class DVH(object): @property def mean(self): """Return the mean dose.""" - if self.counts.size == 1: + if self.counts.size <= 1 or max(self.counts) == 0: return 0 diff = self.differential # Find the area under the differential histogram @@ -462,7 +462,7 @@ class DVH(object): else: volume_counts = self.absolute_volume(self.volume).counts - if volume > volume_counts.max(): + if volume_counts.size == 0 or volume > volume_counts.max(): return DVHValue(0.0, self.dose_units) # D100 case diff --git a/requirements_dev.txt b/requirements_dev.txt index 8193cbd..7af08f4 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,8 +1,8 @@ bumpversion==0.5.3 -wheel==0.32.3 -flake8==3.6.0 -tox==3.6.1 +wheel==0.33.1 +flake8==3.7.7 +tox==3.7.0 coverage==4.5.2 -Sphinx==1.8.3 -sphinx-rtd-theme==0.4.2 -cryptography==2.4.2 +Sphinx==1.8.4 +sphinx-rtd-theme==0.4.3 +cryptography==2.6.1 diff --git a/setup.py b/setup.py index 59ad242..82124af 100644 --- a/setup.py +++ b/setup.py @@ -62,8 +62,6 @@ setup( "Programming Language :: Python :: 2", 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.3', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Topic :: Scientific/Engineering :: Medical Science Apps.',
dicompyler/dicompyler-core
f5f9fa770d0573373510135863fa2933919cdba7
diff --git a/tests/test_dvh.py b/tests/test_dvh.py index 6c9d403..3e64782 100644 --- a/tests/test_dvh.py +++ b/tests/test_dvh.py @@ -204,6 +204,27 @@ class TestDVH(unittest.TestCase): self.dvh.name = "test" self.assertEqual(self.dvh.plot(), self.dvh) + def test_dvh_statistics_with_no_counts(self): + subject = dvh.DVH(array([]), array([0])) + self.assertEqual(subject.max, 0) + self.assertEqual(subject.min, 0) + self.assertEqual(subject.mean, 0) + + def test_dose_constraint_with_no_counts(self): + subject = dvh.DVH(array([]), array([0])) + subject.dose_constraint(1) + + def test_dvh_statistics_with_zero_volume(self): + subject = dvh.DVH(array([0, 0]), array([0, 1])) + self.assertEqual(subject.max, 0) + self.assertEqual(subject.min, 0) + self.assertEqual(subject.mean, 0) + + def test_dose_constraint_with_zero_volume(self): + subject = dvh.DVH(array([0, 0]), array([0, 1])) + subject.dose_constraint(1) + + if __name__ == '__main__': import sys sys.exit(unittest.main())
dvh.max gives IndexError Hello and thank you for the project. I am using dicompyler-core 0.5.4 to extract statistics and I have been running into an exception with certain DCM files. When calculating `dvh.max`, the following error is thrown: ``` File "/home/nico/.local/share/virtualenvs/dcm-extractor-8Y6EYVZw/lib/python3.7/site-packages/dicompylercore/dvh.py", line 269, in max return diff.bins[1:][diff.counts > 0][-1] IndexError: boolean index did not match indexed array along dimension 0; dimension is 0 but corresponding boolean dimension is 1 ``` This seems to happen whenever dvh.counts is either empty, or has all same values (such that dvh.diff.counts is all 0s). Please let me know if I can assist in troubleshooting.
0.0
f5f9fa770d0573373510135863fa2933919cdba7
[ "tests/test_dvh.py::TestDVH::test_dose_constraint_with_no_counts", "tests/test_dvh.py::TestDVH::test_dose_constraint_with_zero_volume", "tests/test_dvh.py::TestDVH::test_dvh_statistics_with_no_counts", "tests/test_dvh.py::TestDVH::test_dvh_statistics_with_zero_volume" ]
[ "tests/test_dvh.py::TestDVH::test_absolute_relative_dose_dvh", "tests/test_dvh.py::TestDVH::test_absolute_relative_full_conversion", "tests/test_dvh.py::TestDVH::test_absolute_relative_volume_dvh", "tests/test_dvh.py::TestDVH::test_cumulative_dvh", "tests/test_dvh.py::TestDVH::test_differential_dvh", "tests/test_dvh.py::TestDVH::test_dvh_compare", "tests/test_dvh.py::TestDVH::test_dvh_describe", "tests/test_dvh.py::TestDVH::test_dvh_properties", "tests/test_dvh.py::TestDVH::test_dvh_statistics", "tests/test_dvh.py::TestDVH::test_dvh_statistics_shorthand", "tests/test_dvh.py::TestDVH::test_dvh_statistics_shorthand_fail", "tests/test_dvh.py::TestDVH::test_dvh_value", "tests/test_dvh.py::TestDVH::test_plotting", "tests/test_dvh.py::TestDVH::test_raw_data_dvh_max_bins" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2019-02-25 13:56:03+00:00
bsd-3-clause
1,914
differint__differint-12
diff --git a/differint/differint.py b/differint/differint.py index b503322..f001e13 100644 --- a/differint/differint.py +++ b/differint/differint.py @@ -145,6 +145,49 @@ def Beta(x,y): return Gamma(x)*Gamma(y)/Gamma(x+y) +def MittagLeffler(a, b, x, num_terms=50, *, ignore_special_cases=False): + ''' Calculate the Mittag-Leffler function by checking for special cases, and trying to + reduce the parameters. If neither of those work, it just brute forces it. + + Parameters + ========== + a : float + The first parameter of the Mittag-Leffler function. + b : float + The second parameter of the Mittag-Leffler function + x : float or 1D-array of floats + The value or values to be evaluated at. + num_terms : int + The number of terms to calculate in the sum. Ignored if + a special case can be used instead. Default value is 100. + ignore_special_cases : bool + Don't use the special cases, use the series definition. + Probably only useful for testing. Default value is False. + ''' + # check for quick special cases + if not ignore_special_cases: + if a == 0: + if (np.abs(x) < 1).all(): + return 1 / Gamma(b) * 1 / (1 - x) + return x * np.inf + elif a == 0.5 and b == 1: + # requires calculation of the complementary error function + pass + elif a == 1 and b == 1: + return np.exp(x) + elif a == 2 and b == 1: + return np.cosh(np.sqrt(x)) + elif a == 1 and b == 2: + return (np.exp(x) - 1) / x + elif a == 2 and b == 2: + return np.sinh(np.sqrt(x)) / np.sqrt(x) + # manually calculate with series definition + exponents = np.arange(num_terms) + exp_vals = np.array([x]).T ** exponents + gamma_vals = np.array([Gamma(exponent * a + b) for exponent in exponents]) + return np.sum(exp_vals / gamma_vals, axis=1) + + def GLcoeffs(alpha,n): """ Computes the GL coefficient array of size n. @@ -489,3 +532,93 @@ class GLIinterpolat: self.nxt = alpha*(2+alpha)/8 self.crr = (4-alpha*alpha)/4 self.prv = alpha*(alpha-2)/8 + +def PCcoeffs(alpha, j, n): + if 1 < alpha: + if j == 0: + return (n+1)**alpha * (alpha - n) + n**alpha * (2 * n - alpha - 1) - (n - 1)**(alpha + 1) + elif j == n: + return 2 ** (alpha + 1) - alpha - 3 + return (n - j + 2) ** (alpha + 1) + 3 * (n - j) ** (alpha + 1) - 3 * (n - j + 1) ** (alpha + 1) - (n - j - 1) ** (alpha + 1) + +def PCsolver(initial_values, alpha, f_name, domain_start=0, domain_end=1, num_points=100): + """ Solve an equation of the form D[y(x)]=f(x, y(x)) using the predictor-corrector + method, modified to be compatible with fractional derivatives. + + see Deng, W. (2007) Short memory principle and a predictor–corrector approach for + fractional differential equations. Journal of Computational and Applied + Mathematics. + + test examples from + Baskonus, H.M., Bulut, H. (2015) On the numerical solutions of some fractional + ordinary differential equations by fractional Adams-Bashforth-Moulton method. + De Gruyter. + Weilbeer, M. (2005) Efficient Numerical Methods for Fractional Differential + Equations and their Analytical Background. + + + + Parameters + ========== + initial_values : float 1d-array + A list of initial values for the IVP. There should be as many IVs + as ceil(alpha). + alpha : float + The order of the differintegral in the equation to be computed. + f_name : function handle or lambda function + This is the function on the right side of the equation, and should + accept two variables; first the independant variable, and second + the equation to be solved. + domain_start : float + The left-endpoint of the function domain. Default value is 0. + domain_end : float + The right-endpoint of the function domain; the point at which the + differintegral is being evaluated. Default value is 1. + num_points : integer + The number of points in the domain. Default value is 100. + + Output + ====== + y_correction : float 1d-array + The calculated solution to the IVP at each of the points + between the left and right endpoint. + + Examples: + >>> f_name = lambda x, y : y - x - 1 + >>> initial_values = [1, 1] + >>> y_solved = PCsolver(initial_values, 1.5, f_name) + >>> theoretical = np.linspace(0, 1, 100) + 1 + >>> np.allclose(y_solved, theoretical) + True + """ + x_points = np.linspace(domain_start, domain_end, num_points) + step_size = x_points[1] - x_points[0] + y_correction = np.zeros(num_points, dtype='complex_') + y_prediction = np.zeros(num_points, dtype='complex_') + + y_prediction[0] = initial_values[0] + y_correction[0] = initial_values[0] + for x_index in range(num_points - 1): + initial_value_contribution = 0 + if 1 < alpha and alpha < 2: + initial_value_contribution = initial_values[1] * step_size + elif 2 < alpha: + for k in range(1, int(np.ceil(alpha))): + initial_value_contribution += initial_values[k] / np.math.factorial(k) * (x_points[x_index + 1] ** k - x_points[x_index] ** k) + elif alpha < 1: + raise ValueError('Not yet supported!') + y_prediction[x_index + 1] += initial_value_contribution + y_prediction[x_index + 1] += y_correction[x_index] + y_prediction[x_index + 1] += step_size ** alpha / Gamma(alpha + 1) * f_name(x_points[x_index], y_correction[x_index]) + subsum = 0 + for j in range(x_index + 1): + subsum += PCcoeffs(alpha, j, x_index) * f_name(x_points[j], y_correction[j]) + y_prediction[x_index + 1] += step_size ** alpha / Gamma(alpha + 2) * subsum + + y_correction[x_index + 1] += initial_value_contribution + y_correction[x_index + 1] += y_correction[x_index] + y_correction[x_index + 1] += step_size ** alpha / Gamma(alpha + 2) * alpha * f_name(x_points[x_index], y_correction[x_index]) + y_correction[x_index + 1] += step_size ** alpha / Gamma(alpha + 2) * f_name(x_points[x_index + 1], y_prediction[x_index + 1]) + y_correction[x_index + 1] += step_size ** alpha / Gamma(alpha + 2) * subsum + + return y_correction
differint/differint
6b0a4813a37b6734fb9733dd769f340ecb74aa27
diff --git a/tests/test.py b/tests/test.py index d663249..af03cbd 100644 --- a/tests/test.py +++ b/tests/test.py @@ -12,6 +12,7 @@ size_coefficient_array = 20 test_N = 512 sqrtpi2 = 0.88622692545275794 truevaluepoly = 0.94031597258 +PC_x_power = np.linspace(0, 1, 100) ** 5.5 INTER = GLIinterpolat(1) @@ -33,6 +34,10 @@ RL_r = RL(0.5, lambda x: np.sqrt(x), 0, 1, test_N) RL_result = RL_r[-1] RL_length = len(RL_r) +# Get FODE function for solving. +PC_func_power = lambda x, y : 1/24 * Gamma(5 + 1.5) * x**4 + x**(8 + 2 * 1.5) - y**2 +PC_func_ML = lambda x,y : y + class HelperTestCases(unittest.TestCase): """ Tests for helper functions. """ @@ -89,6 +94,23 @@ class HelperTestCases(unittest.TestCase): def testComplexValue(self): self.assertEqual(np.round(Gamma(1j), 4), -0.1549-0.498j) + + """ Unit tests for Mittag-Leffler function. """ + + def test_ML_cosh_root(self): + xs = np.arange(10, 0.1) + self.assertTrue((np.abs(MittagLeffler(2, 1, xs, ignore_special_cases=True)\ + - np.cosh(np.sqrt(xs))) <= 1e-3).all()) + + def test_ML_exp(self): + xs = np.arange(10, 0.1) + self.assertTrue((np.abs(MittagLeffler(1, 1, xs, ignore_special_cases=True)\ + - np.exp(xs)) <= 1e-3).all()) + + def test_ML_geometric(self): + xs = np.arange(1, 0.05) + self.assertTrue((np.abs(MittagLeffler(0, 1, xs, ignore_special_cases=True)\ + - 1 / (1 - xs)) <= 1e-3).all()) class TestInterpolantCoefficients(unittest.TestCase): """ Test the correctness of the interpolant coefficients. """ @@ -131,7 +153,21 @@ class TestAlgorithms(unittest.TestCase): def test_RL_accuracy_sqrt(self): self.assertTrue(abs(RL_result - sqrtpi2) <= 1e-4) - + +class TestSolvers(unittest.TestCase): + """ Tests for the correct solution to the equations. """ + def test_PC_solution_three_halves(self): + self.assertTrue((np.abs(PCsolver([0, 0], 1.5, PC_func_power, 0, 1, 100)-PC_x_power) <= 1e-2).all()) + + def test_PC_solution_ML(self): + xs = np.linspace(0, 1, 100) + ML_alpha = MittagLeffler(5.5, 1, xs ** 5.5) + self.assertTrue((np.abs(PCsolver([1, 0, 0, 0, 0, 0], 5.5, PC_func_ML)-ML_alpha) <= 1e-2).all()) + + def test_PC_solution_linear(self): + xs = np.linspace(0, 1, 100) + self.assertTrue((np.abs(PCsolver([1, 1], 1.5, lambda x,y : y-x-1)-(xs+1)) <= 1e-2).all()) + if __name__ == '__main__': unittest.main(argv=['first-arg-is-ignored'], exit=False)
Caputo Fractional Derivative - reg HI! Good Morning! Is it applicable for caputo derivative? In specific, predictor-corrector algorithm.
0.0
6b0a4813a37b6734fb9733dd769f340ecb74aa27
[ "tests/test.py::HelperTestCases::test_ML_cosh_root", "tests/test.py::HelperTestCases::test_ML_exp", "tests/test.py::HelperTestCases::test_ML_geometric" ]
[ "tests/test.py::HelperTestCases::testComplexValue", "tests/test.py::HelperTestCases::testFiveFactorial", "tests/test.py::HelperTestCases::testNegativePoles", "tests/test.py::HelperTestCases::testRealValue", "tests/test.py::HelperTestCases::test_GL_binomial_coefficient_array_size", "tests/test.py::HelperTestCases::test_checkValues", "tests/test.py::HelperTestCases::test_functionCheck", "tests/test.py::HelperTestCases::test_isInteger", "tests/test.py::HelperTestCases::test_isPositiveInteger", "tests/test.py::HelperTestCases::test_pochhammer", "tests/test.py::TestAlgorithms::test_GLI_accuracy_sqrt", "tests/test.py::TestAlgorithms::test_GLI_result_length", "tests/test.py::TestAlgorithms::test_GL_accuracy_sqrt", "tests/test.py::TestAlgorithms::test_GLpoint_accuracy_polynomial", "tests/test.py::TestAlgorithms::test_GLpoint_sqrt_accuracy", "tests/test.py::TestAlgorithms::test_RL_accuracy_sqrt", "tests/test.py::TestAlgorithms::test_RL_matrix_shape", "tests/test.py::TestAlgorithms::test_RL_result_length", "tests/test.py::TestAlgorithms::test_RLpoint_accuracy_polynomial", "tests/test.py::TestAlgorithms::test_RLpoint_sqrt_accuracy" ]
{ "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false }
2022-11-16 05:58:58+00:00
mit
1,915
diogommartins__simple_json_logger-14
diff --git a/setup.py b/setup.py index a1dddaa..db14acc 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, find_packages -VERSION = '0.2.2' +VERSION = '0.2.3' setup(name='simple_json_logger', diff --git a/simple_json_logger/formatter.py b/simple_json_logger/formatter.py index b4eb58a..629eecb 100644 --- a/simple_json_logger/formatter.py +++ b/simple_json_logger/formatter.py @@ -1,7 +1,7 @@ import logging try: from logging import _levelToName -except ImportError: +except ImportError: # pragma: no cover from logging import _levelNames as _levelToName import traceback @@ -32,7 +32,7 @@ class JsonFormatter(logging.Formatter): return obj.strftime(DATETIME_FORMAT) elif istraceback(obj): tb = ''.join(traceback.format_tb(obj)) - return tb.strip() + return tb.strip().split('\n') elif isinstance(obj, Exception): return "Exception: %s" % str(obj) elif callable(obj):
diogommartins/simple_json_logger
1bc3c8d12784d55417e8d46b4fe9b44bd8cd1f99
diff --git a/tests/test_logger.py b/tests/test_logger.py index a98e7f4..8094814 100644 --- a/tests/test_logger.py +++ b/tests/test_logger.py @@ -78,12 +78,11 @@ class LoggerTests(unittest.TestCase): json_log = json.loads(logged_content) exc_class, exc_message, exc_traceback = json_log['exc_info'] - self.assertIn(member=exception_message, - container=exc_message) + self.assertEqual('Exception: {}'.format(exception_message), exc_message) current_func_name = inspect.currentframe().f_code.co_name - self.assertIn(member=current_func_name, - container=exc_traceback) + self.assertIn(current_func_name, exc_traceback[0]) + self.assertIn('raise Exception(exception_message)', exc_traceback[1]) def test_it_logs_datetime_objects(self): message = {
Fix multiline log for stacktraces Multiline stack traces must be formatted as a list of strings
0.0
1bc3c8d12784d55417e8d46b4fe9b44bd8cd1f99
[ "tests/test_logger.py::LoggerTests::test_it_logs_exceptions_tracebacks" ]
[ "tests/test_logger.py::LoggerTests::test_flatten_method_parameter_does_nothing_is_message_isnt_a_dict", "tests/test_logger.py::LoggerTests::test_extra_param_adds_content_to_document_root", "tests/test_logger.py::LoggerTests::test_it_escapes_strings", "tests/test_logger.py::LoggerTests::test_extra_parameter_on_log_method_function_call_updates_extra_parameter_on_init", "tests/test_logger.py::LoggerTests::test_flatten_instance_attr_adds_messages_to_document_root", "tests/test_logger.py::LoggerTests::test_flatten_param_adds_message_to_document_root", "tests/test_logger.py::LoggerTests::test_it_forwards_serializer_kwargs_parameter_to_serializer", "tests/test_logger.py::LoggerTests::test_it_logs_valid_json_string_if_message_is_json_serializeable", "tests/test_logger.py::LoggerTests::test_flatten_instance_attr_overwrites_default_attributes", "tests/test_logger.py::LoggerTests::test_callable_values_are_called_before_serialization", "tests/test_logger.py::LoggerTests::test_it_logs_valid_json_string_if_message_isnt_json_serializeable", "tests/test_logger.py::LoggerTests::test_extra_parameter_adds_content_to_root_of_all_messages", "tests/test_logger.py::LoggerTests::test_it_forwards_serializer_kwargs_instance_attr_to_serializer", "tests/test_logger.py::LoggerTests::test_it_logs_datetime_objects", "tests/test_logger.py::LoggerTests::test_flatten_method_parameter_overwrites_default_attributes", "tests/test_logger.py::LoggerTests::test_it_logs_current_log_time" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2018-05-31 14:58:34+00:00
mit
1,916
dirty-cat__dirty_cat-197
diff --git a/dirty_cat/super_vectorizer.py b/dirty_cat/super_vectorizer.py index 84b39c9..420d00b 100644 --- a/dirty_cat/super_vectorizer.py +++ b/dirty_cat/super_vectorizer.py @@ -106,10 +106,9 @@ class SuperVectorizer(ColumnTransformer): None to apply `remainder`, 'drop' for dropping the columns, or 'passthrough' to return the unencoded columns. - auto_cast: bool, default=False + auto_cast: bool, default=True If set to `True`, will try to convert each column to the best possible data type (dtype). - Experimental. It is advised to cast them beforehand, and leave this false. handle_missing: str, default='' One of the following values: 'error' or '' (empty). @@ -144,7 +143,7 @@ class SuperVectorizer(ColumnTransformer): high_card_cat_transformer: Optional[Union[BaseEstimator, str]] = GapEncoder(), numerical_transformer: Optional[Union[BaseEstimator, str]] = None, datetime_transformer: Optional[Union[BaseEstimator, str]] = None, - auto_cast: bool = False, + auto_cast: bool = True, # Following parameters are inherited from ColumnTransformer handle_missing: str = '', remainder='passthrough', @@ -171,8 +170,6 @@ class SuperVectorizer(ColumnTransformer): self.transformer_weights = transformer_weights self.verbose = verbose - self.columns_ = [] - def _auto_cast_array(self, X): """ Takes an array and tries to convert its columns to the best possible diff --git a/examples/03_automatic_preprocessing_with_the_supervectorizer.py b/examples/03_automatic_preprocessing_with_the_supervectorizer.py index 69ed18a..b9f6d88 100644 --- a/examples/03_automatic_preprocessing_with_the_supervectorizer.py +++ b/examples/03_automatic_preprocessing_with_the_supervectorizer.py @@ -82,7 +82,7 @@ from sklearn.pipeline import Pipeline from dirty_cat import SuperVectorizer pipeline = Pipeline([ - ('vectorizer', SuperVectorizer(auto_cast=True)), + ('vectorizer', SuperVectorizer()), ('clf', HistGradientBoostingRegressor(random_state=42)) ]) @@ -111,7 +111,6 @@ print(f'std={np.std(scores)}') # Let us perform the same workflow, but without the `Pipeline`, so we can # analyze its mechanisms along the way. sup_vec = SuperVectorizer( - auto_cast=True, high_card_str_transformer=GapEncoder(n_components=50), high_card_cat_transformer=GapEncoder(n_components=50) )
dirty-cat/dirty_cat
766aa5c905a737d0a90e8432bed84aac6101754a
diff --git a/dirty_cat/test/test_super_vectorizer.py b/dirty_cat/test/test_super_vectorizer.py index 2f34d8e..b70a26b 100644 --- a/dirty_cat/test/test_super_vectorizer.py +++ b/dirty_cat/test/test_super_vectorizer.py @@ -3,6 +3,8 @@ import sklearn import pandas as pd from sklearn.preprocessing import StandardScaler +from sklearn.utils.validation import check_is_fitted +from sklearn.exceptions import NotFittedError from distutils.version import LooseVersion @@ -79,7 +81,6 @@ def test_super_vectorizer(): # Test casting values vectorizer_cast = SuperVectorizer( cardinality_threshold=3, - auto_cast=True, # we must have n_samples = 5 >= n_components high_card_str_transformer=GapEncoder(n_components=2), high_card_cat_transformer=GapEncoder(n_components=2), @@ -130,6 +131,18 @@ def test_get_feature_names(): assert vectorizer_w_drop.get_feature_names() == expected_feature_names_drop +def test_fit(): + # Simply checks sklearn's `check_is_fitted` function raises an error if + # the SuperVectorizer is instantiated but not fitted. + # See GH#193 + sup_vec = SuperVectorizer() + with pytest.raises(NotFittedError): + if LooseVersion(sklearn.__version__) >= LooseVersion('0.22'): + assert check_is_fitted(sup_vec) + else: + assert check_is_fitted(sup_vec, attributes=dir(sup_vec)) + + if __name__ == '__main__': print('start test_super_vectorizer') test_super_vectorizer() @@ -137,5 +150,8 @@ if __name__ == '__main__': print('start test_get_feature_names') test_get_feature_names() print('test_get_feature_names passed') + print('start test_fit') + test_fit() + print('test_fit passed') print('Done')
Better error message when SuperVectorizer's transform method is called before fit Scikit-learn has a mechanism to check that an estimator is fitted, and if not raise a good error message. We should use it.
0.0
766aa5c905a737d0a90e8432bed84aac6101754a
[ "dirty_cat/test/test_super_vectorizer.py::test_fit" ]
[]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2021-07-21 13:30:28+00:00
bsd-3-clause
1,917
dirty-cat__dirty_cat-261
diff --git a/CHANGES.rst b/CHANGES.rst index 3b92fa9..027a15b 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -30,6 +30,7 @@ Release 0.2.1 Major changes ------------- + * Improvements to the :class:`SuperVectorizer` - Type detection works better: handles dates, numerics columns encoded as strings, @@ -51,6 +52,8 @@ Bug-fixes * GapEncoder's `get_feature_names_out` now accepts all iterators, not just lists. +* Fixed `DeprecationWarning` raised by the usage of `distutils.version.LooseVersion` + Notes ----- diff --git a/build_tools/circle/list_versions.py b/build_tools/circle/list_versions.py index 19fa8aa..0322cda 100755 --- a/build_tools/circle/list_versions.py +++ b/build_tools/circle/list_versions.py @@ -5,9 +5,10 @@ import json import re import sys -from distutils.version import LooseVersion +from dirty_cat.utils import Version from urllib.request import urlopen + def json_urlread(url): try: return json.loads(urlopen(url).read().decode('utf8')) @@ -80,7 +81,7 @@ for src, dst in symlinks.items(): seen = set() for name in (NAMED_DIRS + sorted((k for k in dirs if k[:1].isdigit()), - key=LooseVersion, reverse=True)): + key=Version, reverse=True)): version_num, pdf_size = dirs[name] if version_num in seen: # symlink came first diff --git a/dirty_cat/datasets/fetching.py b/dirty_cat/datasets/fetching.py index f42dd59..8b28c93 100644 --- a/dirty_cat/datasets/fetching.py +++ b/dirty_cat/datasets/fetching.py @@ -24,8 +24,8 @@ import pandas as pd from pathlib import Path from collections import namedtuple from typing import Union, Dict, Any -from distutils.version import LooseVersion +from dirty_cat.utils import Version from dirty_cat.datasets.utils import get_data_dir @@ -165,7 +165,7 @@ def _download_and_write_openml_dataset(dataset_id: int, from sklearn.datasets import fetch_openml fetch_kwargs = {} - if LooseVersion(sklearn.__version__) >= LooseVersion('0.22'): + if Version(sklearn.__version__) >= Version('0.22'): fetch_kwargs.update({'as_frame': True}) # The ``fetch_openml()`` function returns a Scikit-Learn ``Bunch`` object, diff --git a/dirty_cat/gap_encoder.py b/dirty_cat/gap_encoder.py index dea1cdc..772c6d2 100644 --- a/dirty_cat/gap_encoder.py +++ b/dirty_cat/gap_encoder.py @@ -16,7 +16,6 @@ The principle is as follows: """ import warnings import numpy as np -from distutils.version import LooseVersion from scipy import sparse from sklearn import __version__ as sklearn_version from sklearn.utils import check_random_state, gen_batches @@ -28,15 +27,16 @@ from sklearn.neighbors import NearestNeighbors from sklearn.utils.fixes import _object_dtype_isnan import pandas as pd from .utils import check_input +from dirty_cat.utils import Version -if LooseVersion(sklearn_version) <= LooseVersion('0.22'): +if Version(sklearn_version) <= Version('0.22'): from sklearn.cluster.k_means_ import _k_init -elif LooseVersion(sklearn_version) < LooseVersion('0.24'): +elif Version(sklearn_version) < Version('0.24'): from sklearn.cluster._kmeans import _k_init else: from sklearn.cluster import kmeans_plusplus -if LooseVersion(sklearn_version) <= LooseVersion('0.22'): +if Version(sklearn_version) <= Version('0.22'): from sklearn.decomposition.nmf import _beta_divergence else: from sklearn.decomposition._nmf import _beta_divergence @@ -106,12 +106,12 @@ class GapEncoderColumn(BaseEstimator, TransformerMixin): unq_V = sparse.hstack((unq_V, unq_V2), format='csr') if not self.hashing: # Build n-grams/word vocabulary - if LooseVersion(sklearn_version) < LooseVersion('1.0'): + if Version(sklearn_version) < Version('1.0'): self.vocabulary = self.ngrams_count_.get_feature_names() else: self.vocabulary = self.ngrams_count_.get_feature_names_out() if self.add_words: - if LooseVersion(sklearn_version) < LooseVersion('1.0'): + if Version(sklearn_version) < Version('1.0'): self.vocabulary = np.concatenate(( self.vocabulary, self.word_count_.get_feature_names() @@ -153,7 +153,7 @@ class GapEncoderColumn(BaseEstimator, TransformerMixin): n-grams counts. """ if self.init == 'k-means++': - if LooseVersion(sklearn_version) < LooseVersion('0.24'): + if Version(sklearn_version) < Version('0.24'): W = _k_init( V, self.n_components, x_squared_norms=row_norms(V, squared=True), @@ -179,7 +179,7 @@ class GapEncoderColumn(BaseEstimator, TransformerMixin): W = np.hstack((W, W2)) # if k-means doesn't find the exact number of prototypes if W.shape[0] < self.n_components: - if LooseVersion(sklearn_version) < LooseVersion('0.24'): + if Version(sklearn_version) < Version('0.24'): W2 = _k_init( V, self.n_components - W.shape[0], x_squared_norms=row_norms(V, squared=True), @@ -284,7 +284,7 @@ class GapEncoderColumn(BaseEstimator, TransformerMixin): """ vectorizer = CountVectorizer() vectorizer.fit(list(self.H_dict_.keys())) - if LooseVersion(sklearn_version) < LooseVersion('1.0'): + if Version(sklearn_version) < Version('1.0'): vocabulary = np.array(vectorizer.get_feature_names()) else: vocabulary = np.array(vectorizer.get_feature_names_out()) diff --git a/dirty_cat/similarity_encoder.py b/dirty_cat/similarity_encoder.py index c0cfe8b..18b9f4e 100644 --- a/dirty_cat/similarity_encoder.py +++ b/dirty_cat/similarity_encoder.py @@ -15,7 +15,6 @@ The principle is as follows: import warnings import numpy as np -from distutils.version import LooseVersion from joblib import Parallel, delayed from scipy import sparse import sklearn @@ -26,6 +25,7 @@ from sklearn.preprocessing import OneHotEncoder from sklearn.utils import check_random_state from sklearn.utils.fixes import _object_dtype_isnan +from dirty_cat.utils import Version from . import string_distances from .string_distances import get_ngram_count, preprocess @@ -400,7 +400,7 @@ class SimilarityEncoder(OneHotEncoder): self.vocabulary_ngram_counts_.append(vocabulary_ngram_count) self.drop_idx_ = self._compute_drop_idx() - if LooseVersion(sklearn.__version__) >= LooseVersion('1.1.0'): + if Version(sklearn.__version__) >= Version('1.1.0'): self._infrequent_enabled = False return self diff --git a/dirty_cat/super_vectorizer.py b/dirty_cat/super_vectorizer.py index e31e00a..219d117 100644 --- a/dirty_cat/super_vectorizer.py +++ b/dirty_cat/super_vectorizer.py @@ -15,15 +15,15 @@ import pandas as pd from warnings import warn from typing import Union, Optional, List -from distutils.version import LooseVersion from sklearn.base import BaseEstimator from sklearn.compose import ColumnTransformer from sklearn.preprocessing import OneHotEncoder from dirty_cat import GapEncoder, DatetimeEncoder +from dirty_cat.utils import Version -_sklearn_loose_version = LooseVersion(sklearn.__version__) +_sklearn_loose_version = Version(sklearn.__version__) def _has_missing_values(df: Union[pd.DataFrame, pd.Series]) -> bool: @@ -402,7 +402,7 @@ class SuperVectorizer(ColumnTransformer): impute: bool = False if isinstance(trans, OneHotEncoder) \ - and _sklearn_loose_version < LooseVersion('0.24'): + and _sklearn_loose_version < Version('0.24'): impute = True if impute: @@ -446,9 +446,9 @@ class SuperVectorizer(ColumnTransformer): e.g. "job_title_Police officer", or "<column_name>" if not encoded. """ - if _sklearn_loose_version < LooseVersion('0.23'): + if _sklearn_loose_version < Version('0.23'): try: - if _sklearn_loose_version < LooseVersion('1.0'): + if _sklearn_loose_version < Version('1.0'): ct_feature_names = super().get_feature_names() else: ct_feature_names = super().get_feature_names_out() @@ -460,7 +460,7 @@ class SuperVectorizer(ColumnTransformer): 'transformers, or update your copy of scikit-learn.' ) else: - if _sklearn_loose_version < LooseVersion('1.0'): + if _sklearn_loose_version < Version('1.0'): ct_feature_names = super().get_feature_names() else: ct_feature_names = super().get_feature_names_out() @@ -478,7 +478,7 @@ class SuperVectorizer(ColumnTransformer): if not hasattr(trans, 'get_feature_names'): all_trans_feature_names.extend(cols) else: - if _sklearn_loose_version < LooseVersion('1.0'): + if _sklearn_loose_version < Version('1.0'): trans_feature_names = trans.get_feature_names(cols) else: trans_feature_names = trans.get_feature_names_out(cols) diff --git a/dirty_cat/utils.py b/dirty_cat/utils.py index 4891f7a..920e0ad 100644 --- a/dirty_cat/utils.py +++ b/dirty_cat/utils.py @@ -2,6 +2,8 @@ import collections import numpy as np +from typing import Tuple, Union + class LRUDict: """ dict with limited capacity @@ -44,3 +46,81 @@ def check_input(X): 'array.reshape(1, -1) if it contains a single sample.' ) return X + + +class Version: + """ + Replacement for `distutil.version.LooseVersion` and `packaging.version.Version`. + Implemented to avoid `DeprecationWarning`s raised by the former, + and avoid adding a dependency for the latter. + + It is therefore very bare-bones, so its code shouldn't be too + hard to understand. + It currently only supports major and minor versions. + + Inspired from https://stackoverflow.com/a/11887825/9084059 + Should eventually dissapear. + + Examples: + >>> # Standard usage + >>> Version(sklearn.__version__) > Version('0.22') + >>> Version(sklearn.__version__) > '0.22' + >>> # In general, pass the version as numbers separated by dots. + >>> Version('1.5') <= Version('1.6.5') + >>> Version('1.5') <= '1.6.5' + >>> # You can also pass the separator for specific cases + >>> Version('1-5', separator='-') == Version('1-6-5', separator='-') + >>> Version('1-5', separator='-') == '1-6-5' + >>> Version('1-5', separator='-') == '1.6.5' # Won't work ! + """ + + def __init__(self, value: str, separator: str = '.'): + self.separator = separator + self.major, self.minor = self._parse_version(value) + + def __repr__(self): + return f'Version({self.major}.{self.minor})' + + def _parse_version(self, value: str) -> Tuple[int, int]: + raw_parts = value.split(self.separator) + if len(raw_parts) == 0: + raise ValueError(f'Could not extract version from {value!r} ' + f'(separator: {self.separator!r})') + elif len(raw_parts) == 1: + major = int(raw_parts[0]) + minor = 0 + else: + major = int(raw_parts[0]) + minor = int(raw_parts[1]) + # Ditch the rest + return major, minor + + def _cast_to_version(self, other: Union["Version", str]) -> "Version": + if isinstance(other, str): + # We pass our separator, as we expect they are the same + other = Version(other, self.separator) + return other + + def __eq__(self, other: Union["Version", str]): + other = self._cast_to_version(other) + return (self.major, self.minor) == (other.major, other.minor) + + def __ne__(self, other: Union["Version", str]): + other = self._cast_to_version(other) + return (self.major, self.minor) != (other.major, other.minor) + + def __lt__(self, other: Union["Version", str]): + other = self._cast_to_version(other) + return (self.major, self.minor) < (other.major, other.minor) + + def __le__(self, other: Union["Version", str]): + other = self._cast_to_version(other) + return (self.major, self.minor) <= (other.major, other.minor) + + def __gt__(self, other: Union["Version", str]): + other = self._cast_to_version(other) + return (self.major, self.minor) > (other.major, other.minor) + + def __ge__(self, other: Union["Version", str]): + other = self._cast_to_version(other) + return (self.major, self.minor) >= (other.major, other.minor)
dirty-cat/dirty_cat
4c5b7892f5be9bf070690bba302dbc9a60164349
diff --git a/dirty_cat/datasets/tests/test_fetching.py b/dirty_cat/datasets/tests/test_fetching.py index b0056c4..a85f425 100644 --- a/dirty_cat/datasets/tests/test_fetching.py +++ b/dirty_cat/datasets/tests/test_fetching.py @@ -15,7 +15,7 @@ import warnings import pandas as pd from pathlib import Path -from distutils.version import LooseVersion +from dirty_cat.utils import Version from unittest import mock from unittest.mock import mock_open @@ -152,7 +152,7 @@ def test__download_and_write_openml_dataset(mock_fetch_openml): test_data_dir = get_test_data_dir() _download_and_write_openml_dataset(1, test_data_dir) - if LooseVersion(sklearn.__version__) >= LooseVersion('0.22'): + if Version(sklearn.__version__) >= Version('0.22'): mock_fetch_openml.assert_called_once_with(data_id=1, data_home=str(test_data_dir), as_frame=True) diff --git a/dirty_cat/test/test_super_vectorizer.py b/dirty_cat/test/test_super_vectorizer.py index d299f19..a836dcc 100644 --- a/dirty_cat/test/test_super_vectorizer.py +++ b/dirty_cat/test/test_super_vectorizer.py @@ -7,10 +7,10 @@ from sklearn.preprocessing import StandardScaler from sklearn.utils.validation import check_is_fitted from sklearn.exceptions import NotFittedError -from distutils.version import LooseVersion from dirty_cat import SuperVectorizer from dirty_cat import GapEncoder +from dirty_cat.utils import Version def check_same_transformers(expected_transformers: dict, actual_transformers: list): @@ -336,7 +336,7 @@ def test_get_feature_names_out(): vectorizer_w_pass = SuperVectorizer(remainder='passthrough') vectorizer_w_pass.fit(X) - if LooseVersion(sklearn.__version__) < LooseVersion('0.23'): + if Version(sklearn.__version__) < Version('0.23'): with pytest.raises(NotImplementedError): # Prior to sklearn 0.23, ColumnTransformer.get_feature_names # with "passthrough" transformer(s) raises a NotImplementedError @@ -370,7 +370,7 @@ def test_fit(): # See GH#193 sup_vec = SuperVectorizer() with pytest.raises(NotFittedError): - if LooseVersion(sklearn.__version__) >= LooseVersion('0.22'): + if Version(sklearn.__version__) >= Version('0.22'): assert check_is_fitted(sup_vec) else: assert check_is_fitted(sup_vec, attributes=dir(sup_vec)) diff --git a/dirty_cat/test/test_utils.py b/dirty_cat/test/test_utils.py index 70caf4a..a339c34 100644 --- a/dirty_cat/test/test_utils.py +++ b/dirty_cat/test/test_utils.py @@ -1,4 +1,6 @@ -from dirty_cat.utils import LRUDict +import pytest + +from dirty_cat.utils import LRUDict, Version def test_lrudict(): @@ -13,3 +15,28 @@ def test_lrudict(): for x in range(5): assert (x not in dict_) + + +def test_version(): + # Test those specified in its docstring + assert Version('1.5') <= Version('1.6.5') + assert Version('1.5') <= '1.6.5' + + assert (Version('1-5', separator='-') == Version('1-6-5', separator='-')) is False + assert (Version('1-5', separator='-') == '1-6-5') is False + with pytest.raises(ValueError): + assert not (Version('1-5', separator='-') == '1.6.5') + + # Test all comparison methods + assert Version('1.0') == Version('1.0') + assert (Version('1.0') != Version('1.0')) is False + + assert Version('1.0') < Version('1.1') + assert Version('1.1') <= Version('1.5') + assert Version('1.1') <= Version('1.1') + assert (Version('1.1') < Version('1.1')) is False + + assert Version('1.1') > Version('0.5') + assert Version('1.1') >= Version('0.9') + assert Version('1.1') >= Version('1.1') + assert (Version('1.1') >= Version('1.9')) is False
DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. <!--Provide a brief description of the bug.--> Since december 2021, `distutils.version.Version` (and thus `LooseVersion`) [is deprecated](https://github.com/pypa/setuptools/commit/1701579e0827317d8888c2254a17b5786b6b5246). We use it in [several components](https://github.com/dirty-cat/dirty_cat/search?q=LooseVersion), and therefore we have a number of warnings in the CI logs ([for example](https://github.com/dirty-cat/dirty_cat/runs/6667648188?check_suite_focus=true), under "Run tests") Sample: ``` dirty_cat/test/test_similarity_encoder.py: 118 warnings /Users/runner/work/dirty_cat/dirty_cat/dirty_cat/similarity_encoder.py:328: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(sklearn.__version__) > LooseVersion('0.21'): ``` as suggested by the warning, we could use `packaging.version.Version` instead.
0.0
4c5b7892f5be9bf070690bba302dbc9a60164349
[ "dirty_cat/datasets/tests/test_fetching.py::test_fetch_openml_dataset", "dirty_cat/datasets/tests/test_fetching.py::test_fetch_openml_dataset_mocked", "dirty_cat/datasets/tests/test_fetching.py::test__download_and_write_openml_dataset", "dirty_cat/datasets/tests/test_fetching.py::test__read_json_from_gz", "dirty_cat/datasets/tests/test_fetching.py::test__get_details", "dirty_cat/datasets/tests/test_fetching.py::test__get_features", "dirty_cat/datasets/tests/test_fetching.py::test__export_gz_data_to_csv", "dirty_cat/datasets/tests/test_fetching.py::test__features_to_csv_format", "dirty_cat/datasets/tests/test_fetching.py::test_import_all_datasets", "dirty_cat/test/test_super_vectorizer.py::test_with_clean_data", "dirty_cat/test/test_super_vectorizer.py::test_with_dirty_data", "dirty_cat/test/test_super_vectorizer.py::test_with_arrays", "dirty_cat/test/test_super_vectorizer.py::test_fit", "dirty_cat/test/test_super_vectorizer.py::test_transform", "dirty_cat/test/test_super_vectorizer.py::test_fit_transform_equiv", "dirty_cat/test/test_utils.py::test_lrudict", "dirty_cat/test/test_utils.py::test_version" ]
[]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2022-06-07 13:06:50+00:00
bsd-3-clause
1,918
dirty-cat__dirty_cat-300
diff --git a/CHANGES.rst b/CHANGES.rst index a1f7651..da2fc09 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -7,14 +7,21 @@ Major changes * New encoder: :class:`DatetimeEncoder` can transform a datetime column into several numerical columns (year, month, day, hour, minute, second, ...). It is now the default transformer used in the :class:`SuperVectorizer` for datetime columns. -* The :class:`SuperVectorizer` has seen some major improvements and bug fixes. +* The :class:`SuperVectorizer` has seen some major improvements and bug fixes + - Fixes the automatic casting logic in ``transform``. + - **Behavior change** To avoid dimensionality explosion when a feature has two unique values, + the default encoder (:class:`OneHotEncoder`) now drops one of the two + vectors (see parameter `drop="if_binary"`). + - ``fit_transform`` and ``transform`` can now return unencoded features, + like the :class:`ColumnTransformer`'s behavior. + Previously, a ``RuntimeError`` was raised. * **Backward-incompatible change in the SuperVectorizer**: to apply ``remainder`` to features (with the ``*_transformer`` parameters), the value ``'remainder'`` must be passed, instead of ``None`` in previous versions. ``None`` now indicates that we want to use the default transformer. * Support for Python 3.6 and 3.7 has been dropped. Python >= 3.8 is now required. * Bumped minimum dependencies: - - sklearn>=0.22 + - sklearn>=0.23 - scipy>=1.4.0 - numpy>=1.17.3 - pandas>=1.2.0 diff --git a/README.rst b/README.rst index e0e232c..26a7a14 100644 --- a/README.rst +++ b/README.rst @@ -38,7 +38,7 @@ dirty_cat requires: - Python (>= 3.8) - NumPy (>= 1.17.3) - SciPy (>= 1.4.0) -- scikit-learn (>= 0.22.0) +- scikit-learn (>= 0.23.0) - pandas (>= 1.2.0) User installation diff --git a/dirty_cat/gap_encoder.py b/dirty_cat/gap_encoder.py index a0471af..b06d622 100644 --- a/dirty_cat/gap_encoder.py +++ b/dirty_cat/gap_encoder.py @@ -35,21 +35,12 @@ from dirty_cat.utils import Version from .utils import check_input -if Version(sklearn_version) == Version("0.22"): - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - from sklearn.cluster.k_means_ import _k_init -elif Version(sklearn_version) < Version("0.24"): +if Version(sklearn_version) < Version("0.24"): from sklearn.cluster._kmeans import _k_init else: from sklearn.cluster import kmeans_plusplus -if Version(sklearn_version) == Version("0.22"): - with warnings.catch_warnings(): - warnings.simplefilter("ignore") - from sklearn.decomposition.nmf import _beta_divergence -else: - from sklearn.decomposition._nmf import _beta_divergence +from sklearn.decomposition._nmf import _beta_divergence class GapEncoderColumn(BaseEstimator, TransformerMixin): diff --git a/dirty_cat/super_vectorizer.py b/dirty_cat/super_vectorizer.py index 6643dc7..6c4e8b4 100644 --- a/dirty_cat/super_vectorizer.py +++ b/dirty_cat/super_vectorizer.py @@ -96,16 +96,18 @@ class SuperVectorizer(ColumnTransformer): cardinality_threshold : int, default=40 Two lists of features will be created depending on this value: strictly - under this value, the low cardinality categorical values, and above or - equal, the high cardinality categorical values. + under this value, the low cardinality categorical features, and above or + equal, the high cardinality categorical features. Different transformers will be applied to these two groups, defined by the parameters `low_card_cat_transformer` and `high_card_cat_transformer` respectively. + Note: currently, missing values are counted as a single unique value + (so they count in the cardinality). low_card_cat_transformer : typing.Optional[typing.Union[sklearn.base.TransformerMixin, typing.Literal["drop", "remainder", "passthrough"]]], default=None # noqa Transformer used on categorical/string features with low cardinality (threshold is defined by `cardinality_threshold`). - Can either be a transformer object instance (e.g. `OneHotEncoder()`), + Can either be a transformer object instance (e.g. `OneHotEncoder(drop="if_binary")`), a `Pipeline` containing the preprocessing steps, 'drop' for dropping the columns, 'remainder' for applying `remainder`, @@ -226,6 +228,16 @@ class SuperVectorizer(ColumnTransformer): imputed_columns_: typing.List[str] The list of columns in which we imputed the missing values. + Notes + ----- + The column order of the input data is not guaranteed to be the same + as the output data (returned by `transform`). + This is a due to the way the ColumnTransformer works. + However, the output column order will always be the same for different + calls to `transform` on a same fitted SuperVectorizer instance. + For example, if input data has columns ['name', 'job', 'year], then output + columns might be shuffled, e.g., ['job', 'year', 'name'], but every call + to `transform` will return this order. """ transformers_: List[Tuple[str, Union[str, TransformerMixin], List[str]]] @@ -290,7 +302,7 @@ class SuperVectorizer(ColumnTransformer): if isinstance(self.low_card_cat_transformer, sklearn.base.TransformerMixin): self.low_card_cat_transformer_ = clone(self.low_card_cat_transformer) elif self.low_card_cat_transformer is None: - self.low_card_cat_transformer_ = OneHotEncoder() + self.low_card_cat_transformer_ = OneHotEncoder(drop="if_binary") elif self.low_card_cat_transformer == "remainder": self.low_card_cat_transformer_ = self.remainder else: @@ -406,6 +418,11 @@ class SuperVectorizer(ColumnTransformer): def fit_transform(self, X, y=None): """ Fit all transformers, transform the data, and concatenate the results. + In practice, it (1) converts features to their best possible types + if `auto_cast=True`, (2) classify columns based on their data type, + (3) replaces "false missing" (see function `_replace_false_missing`), + and imputes categorical columns depending on `impute_missing`, and + finally, transforms X. Parameters ---------- @@ -470,16 +487,21 @@ class SuperVectorizer(ColumnTransformer): ).columns.to_list() # Classify categorical columns by cardinality + _nunique_values = { # Cache results + col: X[col].nunique() for col in categorical_columns + } low_card_cat_columns = [ col for col in categorical_columns - if X[col].nunique() < self.cardinality_threshold + if _nunique_values[col] < self.cardinality_threshold ] high_card_cat_columns = [ col for col in categorical_columns - if X[col].nunique() >= self.cardinality_threshold + if _nunique_values[col] >= self.cardinality_threshold ] + # Clear cache + del _nunique_values # Next part: construct the transformers # Create the list of all the transformers. @@ -603,24 +625,10 @@ class SuperVectorizer(ColumnTransformer): typing.List[str] Feature names. """ - if Version(sklearn_version) < Version("0.23"): - try: - if Version(sklearn_version) < Version("1.0"): - ct_feature_names = super().get_feature_names() - else: - ct_feature_names = super().get_feature_names_out() - except NotImplementedError: - raise NotImplementedError( - "Prior to sklearn 0.23, get_feature_names with " - '"passthrough" is unsupported. To use the method, ' - 'either make sure there is no "passthrough" in the ' - "transformers, or update your copy of scikit-learn. " - ) + if Version(sklearn_version) < Version("1.0"): + ct_feature_names = super().get_feature_names() else: - if Version(sklearn_version) < Version("1.0"): - ct_feature_names = super().get_feature_names() - else: - ct_feature_names = super().get_feature_names_out() + ct_feature_names = super().get_feature_names_out() all_trans_feature_names = [] for name, trans, cols, _ in self._iter(fitted=True): diff --git a/dirty_cat/utils.py b/dirty_cat/utils.py index c5b8442..d7f780f 100644 --- a/dirty_cat/utils.py +++ b/dirty_cat/utils.py @@ -77,8 +77,8 @@ class Version: Examples: >>> # Standard usage - >>> Version(sklearn.__version__) > Version('0.22') - >>> Version(sklearn.__version__) > '0.22' + >>> Version(sklearn.__version__) > Version('0.23') + >>> Version(sklearn.__version__) > '0.23' >>> # In general, pass the version as numbers separated by dots. >>> Version('1.5') <= Version('1.6.5') >>> Version('1.5') <= '1.6.5' diff --git a/requirements-min.txt b/requirements-min.txt index eff1e8c..75702d6 100644 --- a/requirements-min.txt +++ b/requirements-min.txt @@ -1,6 +1,6 @@ numpy==1.17.3 scipy==1.4.0 -scikit-learn==0.22.0 +scikit-learn==0.23.0 pytest pytest-cov coverage diff --git a/setup.py b/setup.py index 73bf659..a015caa 100755 --- a/setup.py +++ b/setup.py @@ -39,7 +39,7 @@ if __name__ == "__main__": packages=find_packages(), package_data={"dirty_cat": ["VERSION.txt"]}, install_requires=[ - "scikit-learn>=0.21", + "scikit-learn>=0.23", "numpy>=1.16", "scipy>=1.2", "pandas>=1.2.0",
dirty-cat/dirty_cat
9e59a1ae72abfb453768d6cd41daca9cbb4cc942
diff --git a/dirty_cat/test/test_super_vectorizer.py b/dirty_cat/test/test_super_vectorizer.py index 4b04c77..c97e826 100644 --- a/dirty_cat/test/test_super_vectorizer.py +++ b/dirty_cat/test/test_super_vectorizer.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Tuple +from typing import Any, Tuple import numpy as np import pandas as pd @@ -145,15 +145,7 @@ def _get_datetimes_dataframe() -> pd.DataFrame: ) -def _test_possibilities( - X, - expected_transformers_df: Dict[str, List[str]], - expected_transformers_2: Dict[str, List[str]], - expected_transformers_np_no_cast: Dict[str, List[int]], - expected_transformers_series: Dict[str, List[str]], - expected_transformers_plain: Dict[str, List[str]], - expected_transformers_np_cast: Dict[str, List[int]], -): +def _test_possibilities(X): """ Do a bunch of tests with the SuperVectorizer. We take some expected transformers results as argument. They're usually @@ -167,10 +159,18 @@ def _test_possibilities( numerical_transformer=StandardScaler(), ) # Warning: order-dependant + expected_transformers_df = { + "numeric": ["int", "float"], + "low_card_cat": ["str1", "cat1"], + "high_card_cat": ["str2", "cat2"], + } vectorizer_base.fit_transform(X) check_same_transformers(expected_transformers_df, vectorizer_base.transformers) # Test with higher cardinality threshold and no numeric transformer + expected_transformers_2 = { + "low_card_cat": ["str1", "str2", "cat1", "cat2"], + } vectorizer_default = SuperVectorizer() # Using default values vectorizer_default.fit_transform(X) check_same_transformers(expected_transformers_2, vectorizer_default.transformers) @@ -178,12 +178,20 @@ def _test_possibilities( # Test with a numpy array arr = X.to_numpy() # Instead of the columns names, we'll have the column indices. + expected_transformers_np_no_cast = { + "low_card_cat": [2, 4], + "high_card_cat": [3, 5], + "numeric": [0, 1], + } vectorizer_base.fit_transform(arr) check_same_transformers( expected_transformers_np_no_cast, vectorizer_base.transformers ) # Test with pandas series + expected_transformers_series = { + "low_card_cat": ["cat1"], + } vectorizer_base.fit_transform(X["cat1"]) check_same_transformers(expected_transformers_series, vectorizer_base.transformers) @@ -196,9 +204,19 @@ def _test_possibilities( ) X_str = X.astype("object") # With pandas + expected_transformers_plain = { + "high_card_cat": ["str2", "cat2"], + "low_card_cat": ["str1", "cat1"], + "numeric": ["int", "float"], + } vectorizer_cast.fit_transform(X_str) check_same_transformers(expected_transformers_plain, vectorizer_cast.transformers) # With numpy + expected_transformers_np_cast = { + "numeric": [0, 1], + "low_card_cat": [2, 4], + "high_card_cat": [3, 5], + } vectorizer_cast.fit_transform(X_str.to_numpy()) check_same_transformers(expected_transformers_np_cast, vectorizer_cast.transformers) @@ -208,43 +226,7 @@ def test_with_clean_data(): Defines the expected returns of the vectorizer in different settings, and runs the tests with a clean dataset. """ - X = _get_clean_dataframe() - # Define the transformers we'll use throughout the test. - expected_transformers_df = { - "numeric": ["int", "float"], - "low_card_cat": ["str1", "cat1"], - "high_card_cat": ["str2", "cat2"], - } - expected_transformers_2 = { - "low_card_cat": ["str1", "str2", "cat1", "cat2"], - } - expected_transformers_np_no_cast = { - "low_card_cat": [2, 4], - "high_card_cat": [3, 5], - "numeric": [0, 1], - } - expected_transformers_series = { - "low_card_cat": ["cat1"], - } - expected_transformers_plain = { - "high_card_cat": ["str2", "cat2"], - "low_card_cat": ["str1", "cat1"], - "numeric": ["int", "float"], - } - expected_transformers_np_cast = { - "numeric": [0, 1], - "low_card_cat": [2, 4], - "high_card_cat": [3, 5], - } - _test_possibilities( - X, - expected_transformers_df, - expected_transformers_2, - expected_transformers_np_no_cast, - expected_transformers_series, - expected_transformers_plain, - expected_transformers_np_cast, - ) + _test_possibilities(_get_clean_dataframe()) def test_with_dirty_data() -> None: @@ -252,44 +234,7 @@ def test_with_dirty_data() -> None: Defines the expected returns of the vectorizer in different settings, and runs the tests with a dataset containing missing values. """ - X = _get_dirty_dataframe() - # Define the transformers we'll use throughout the test. - expected_transformers_df = { - "numeric": ["int", "float"], - "low_card_cat": ["str1", "cat1"], - "high_card_cat": ["str2", "cat2"], - } - expected_transformers_2 = { - "low_card_cat": ["str1", "str2", "cat1", "cat2"], - } - expected_transformers_np_no_cast = { - "low_card_cat": [2, 4], - "high_card_cat": [3, 5], - "numeric": [0, 1], - } - expected_transformers_series = { - "low_card_cat": ["cat1"], - } - expected_transformers_plain = { - "high_card_cat": ["str2", "cat2"], - "low_card_cat": ["str1", "cat1"], - "numeric": ["int", "float"], - } - expected_transformers_np_cast = { - "numeric": [0, 1], - "low_card_cat": [2, 4], - "high_card_cat": [3, 5], - } - - _test_possibilities( - X, - expected_transformers_df, - expected_transformers_2, - expected_transformers_np_no_cast, - expected_transformers_series, - expected_transformers_plain, - expected_transformers_np_cast, - ) + _test_possibilities(_get_dirty_dataframe()) def test_auto_cast() -> None: @@ -376,49 +321,39 @@ def test_get_feature_names_out() -> None: vec_w_pass = SuperVectorizer(remainder="passthrough") vec_w_pass.fit(X) - if Version(sklearn.__version__) < Version("0.23"): - with pytest.raises(NotImplementedError): - # Prior to sklearn 0.23, ColumnTransformer.get_feature_names - # with "passthrough" transformer(s) raises a NotImplementedError - assert vec_w_pass.get_feature_names_out() + # In this test, order matters. If it doesn't, convert to set. + expected_feature_names_pass = [ + "str1_public", + "str2_chef", + "str2_lawyer", + "str2_manager", + "str2_officer", + "str2_teacher", + "cat1_yes", + "cat2_20K+", + "cat2_30K+", + "cat2_40K+", + "cat2_50K+", + "cat2_60K+", + "int", + "float", + ] + if Version(sklearn.__version__) < Version("1.0"): + assert vec_w_pass.get_feature_names() == expected_feature_names_pass else: - # In this test, order matters. If it doesn't, convert to set. - expected_feature_names_pass = [ - "str1_private", - "str1_public", - "str2_chef", - "str2_lawyer", - "str2_manager", - "str2_officer", - "str2_teacher", - "cat1_no", - "cat1_yes", - "cat2_20K+", - "cat2_30K+", - "cat2_40K+", - "cat2_50K+", - "cat2_60K+", - "int", - "float", - ] - if Version(sklearn.__version__) < Version("1.0"): - assert vec_w_pass.get_feature_names() == expected_feature_names_pass - else: - assert vec_w_pass.get_feature_names_out() == expected_feature_names_pass + assert vec_w_pass.get_feature_names_out() == expected_feature_names_pass vec_w_drop = SuperVectorizer(remainder="drop") vec_w_drop.fit(X) # In this test, order matters. If it doesn't, convert to set. expected_feature_names_drop = [ - "str1_private", "str1_public", "str2_chef", "str2_lawyer", "str2_manager", "str2_officer", "str2_teacher", - "cat1_no", "cat1_yes", "cat2_20K+", "cat2_30K+", @@ -448,7 +383,11 @@ def test_transform() -> None: s = [34, 5.5, "private", "manager", "yes", "60K+"] x = np.array(s).reshape(1, -1) x_trans = sup_vec.transform(x) - assert (x_trans == [[1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 34, 5.5]]).all() + assert x_trans.tolist() == [ + [0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 34.0, 5.5] + ] + # To understand the list above: + # print(dict(zip(sup_vec.get_feature_names_out(), x_trans.tolist()[0]))) def test_fit_transform_equiv() -> None: @@ -492,13 +431,20 @@ def test_passthrough(): auto_cast=False, ) - X_enc_dirty = sv.fit_transform(X_dirty) - X_enc_clean = sv.fit_transform(X_clean) + X_enc_dirty = pd.DataFrame( + sv.fit_transform(X_dirty), columns=sv.get_feature_names_out() + ) + X_enc_clean = pd.DataFrame( + sv.fit_transform(X_clean), columns=sv.get_feature_names_out() + ) + # Reorder encoded arrays' columns (see SV's doc "Notes" section as to why) + X_enc_dirty = X_enc_dirty[X_dirty.columns] + X_enc_clean = X_enc_clean[X_clean.columns] dirty_flat_df = X_dirty.to_numpy().ravel().tolist() - dirty_flat_trans_df = X_enc_dirty.ravel().tolist() + dirty_flat_trans_df = X_enc_dirty.to_numpy().ravel().tolist() assert all(map(_is_equal, zip(dirty_flat_df, dirty_flat_trans_df))) - assert (X_clean.to_numpy() == X_enc_clean).all() + assert (X_clean.to_numpy() == X_enc_clean.to_numpy()).all() if __name__ == "__main__":
One hot encoding of Supervectorizer for columns with 2 values Just something I observed using SuperVectorizer, on a dataset with columns having mostly 2 categorical values. As documented, it runs one hot encoding on them, and this blows up the feature space. This is probably an edge case, and the example I have here is maybe an extreme one. For just two values it seemed excessive to do one-hot encoding. ``` from dirty_cat import SuperVectorizer from sklearn.datasets import fetch_openml X, y = fetch_openml("kr-vs-kp", return_X_y=True) X.shape (3196, 36) X.describe() bkblk bknwy bkon8 bkona bkspr bkxbq bkxcr bkxwp blxwp bxqsq cntxt dsopp dwipd ... simpl skach skewr skrxp spcop stlmt thrsk wkcti wkna8 wknck wkovl wkpos wtoeg count 3196 3196 3196 3196 3196 3196 3196 3196 3196 3196 3196 3196 3196 ... 3196 3196 3196 3196 3196 3196 3196 3196 3196 3196 3196 3196 3196 unique 2 2 2 2 2 2 2 2 2 2 2 2 2 ... 2 2 2 2 2 2 2 2 2 2 2 2 2 top f f f f f f f f f f f f l ... f f t f f f f f f f t t n freq 2839 2971 3076 2874 2129 1722 2026 2500 1980 2225 1817 2860 2205 ... 1975 3185 2216 3021 3195 3149 3060 2631 3021 1984 2007 2345 2407 [4 rows x 36 columns] sv = SuperVectorizer() X_tx = sv.fit_transform(X) X_tx.shape (3196, 73) ```
0.0
9e59a1ae72abfb453768d6cd41daca9cbb4cc942
[ "dirty_cat/test/test_super_vectorizer.py::test_transform" ]
[ "dirty_cat/test/test_super_vectorizer.py::test_with_clean_data", "dirty_cat/test/test_super_vectorizer.py::test_fit", "dirty_cat/test/test_super_vectorizer.py::test_with_dirty_data" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2022-08-08 12:14:01+00:00
bsd-3-clause
1,919
dirty-cat__dirty_cat-378
diff --git a/CHANGES.rst b/CHANGES.rst index f774809..49769fe 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -3,12 +3,21 @@ Release 0.4.0 ============= -Minor changes +Major changes ------------- * Unnecessary API has been made private: everything (files, functions, classes) starting with an underscore shouldn't be imported in your code. +Minor changes +------------- + +Bug fixes +--------- + +* :class:`MinHashEncoder` now considers `None` as missing values, rather + than raising an error. + Release 0.3.0 ============= @@ -55,7 +64,7 @@ Notes Release 0.2.2 ============= -Bug-fixes +Bug fixes --------- * Fixed a bug in the :class:`SuperVectorizer` causing a `FutureWarning` diff --git a/dirty_cat/_minhash_encoder.py b/dirty_cat/_minhash_encoder.py index 96a9a6e..8c6c86c 100644 --- a/dirty_cat/_minhash_encoder.py +++ b/dirty_cat/_minhash_encoder.py @@ -26,6 +26,7 @@ from ._fast_hash import ngram_min_hash from ._string_distances import get_unique_ngrams from ._utils import LRUDict, check_input +NoneType = type(None) class MinHashEncoder(BaseEstimator, TransformerMixin): """ @@ -208,7 +209,8 @@ class MinHashEncoder(BaseEstimator, TransformerMixin): for k in range(X.shape[1]): X_in = X[:, k].reshape(-1) for i, x in enumerate(X_in): - if isinstance(x, float): # true if x is a missing value + if (isinstance(x, float) # true if x is a missing value + or x is None): is_nan_idx = True elif x not in self.hash_dict_: X_out[i, k * self.n_components : counter] = self.hash_dict_[
dirty-cat/dirty_cat
9eb591250ab9dfd756ab08ef764278f256bf9d3c
diff --git a/dirty_cat/tests/test_minhash_encoder.py b/dirty_cat/tests/test_minhash_encoder.py index b55f56d..c640fb0 100644 --- a/dirty_cat/tests/test_minhash_encoder.py +++ b/dirty_cat/tests/test_minhash_encoder.py @@ -133,6 +133,15 @@ def test_missing_values(input_type: str, missing: str, hashing: str) -> None: return +def test_missing_values_none(): + # Test that "None" is also understood as a missing value + a = np.array([['a', 'b', None, 'c']], dtype=object).T + + enc = MinHashEncoder() + d = enc.fit_transform(a) + np.testing.assert_array_equal(d[2], 0) + + def test_cache_overflow() -> None: # Regression test for cache overflow resulting in -1s in encoding def get_random_string(length):
MinHashEncoder does not understand "None" as missing value The following raises an error because the None is not captured as a NaN: ```python import numpy as np a = np.array([['a', 'b', None, 'c']], dtype=object).T from dirty_cat import MinHashEncoder enc = MinHashEncoder() enc.fit_transform(a) ```
0.0
9eb591250ab9dfd756ab08ef764278f256bf9d3c
[ "dirty_cat/tests/test_minhash_encoder.py::test_missing_values_none" ]
[ "dirty_cat/tests/test_minhash_encoder.py::test_multiple_columns", "dirty_cat/tests/test_minhash_encoder.py::test_input_type", "dirty_cat/tests/test_minhash_encoder.py::test_missing_values[numpy-error-fast]", "dirty_cat/tests/test_minhash_encoder.py::test_missing_values[numpy-zero_impute-fast]", "dirty_cat/tests/test_minhash_encoder.py::test_cache_overflow", "dirty_cat/tests/test_minhash_encoder.py::test_min_hash_encoder_hashing_fast_minmax_hash[0]", "dirty_cat/tests/test_minhash_encoder.py::test_min_hash_encoder_hashing_fast_minmax_hash[1]", "dirty_cat/tests/test_minhash_encoder.py::test_min_hash_encoder_hashing_fast_minmax_hash[2]", "dirty_cat/tests/test_minhash_encoder.py::test_min_hash_encoder_hashing_fast[0]", "dirty_cat/tests/test_minhash_encoder.py::test_min_hash_encoder_hashing_fast[1]", "dirty_cat/tests/test_minhash_encoder.py::test_min_hash_encoder_hashing_fast[2]" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2022-10-06 09:24:23+00:00
bsd-3-clause
1,920
dirty-cat__dirty_cat-401
diff --git a/dirty_cat/_super_vectorizer.py b/dirty_cat/_super_vectorizer.py index db8f862..d5bac42 100644 --- a/dirty_cat/_super_vectorizer.py +++ b/dirty_cat/_super_vectorizer.py @@ -4,7 +4,6 @@ transformers/encoders to different types of data, without the need to manually categorize them beforehand, or construct complex Pipelines. """ - from typing import Dict, List, Literal, Optional, Tuple, Union from warnings import warn @@ -20,6 +19,9 @@ from sklearn.preprocessing import OneHotEncoder from dirty_cat import DatetimeEncoder, GapEncoder from dirty_cat._utils import Version +# Required for ignoring lines too long in the docstrings +# flake8: noqa: E501 + def _has_missing_values(df: Union[pd.DataFrame, pd.Series]) -> bool: """ @@ -82,19 +84,21 @@ OptionalTransformer = Optional[ class SuperVectorizer(ColumnTransformer): - """ - Easily transforms a heterogeneous data table (such as a dataframe) to - a numerical array for machine learning. For this it transforms each - column depending on its data type. - It provides a simplified interface for the :class:`sklearn.compose.ColumnTransformer` ; - more documentation of attributes and functions are available in its doc. + """Easily transform a heterogeneous array to a numerical one. + + Easily transforms a heterogeneous data table + (such as a :class:`pandas.DataFrame`) to a numerical array for machine + learning. For this it transforms each column depending on its data type. + It provides a simplified interface for the + :class:`sklearn.compose.ColumnTransformer`; more documentation of + attributes and functions are available in its doc. .. versionadded:: 0.2.0 Parameters ---------- - cardinality_threshold : int, default=40 + cardinality_threshold : int, optional, default=40 Two lists of features will be created depending on this value: strictly under this value, the low cardinality categorical features, and above or equal, the high cardinality categorical features. @@ -104,19 +108,19 @@ class SuperVectorizer(ColumnTransformer): Note: currently, missing values are counted as a single unique value (so they count in the cardinality). - low_card_cat_transformer : typing.Optional[typing.Union[sklearn.base.TransformerMixin, typing.Literal["drop", "remainder", "passthrough"]]], default=None # noqa + low_card_cat_transformer : {"drop", "remainder", "passthrough"} or Transformer, optional Transformer used on categorical/string features with low cardinality (threshold is defined by `cardinality_threshold`). - Can either be a transformer object instance (e.g. `OneHotEncoder(drop="if_binary")`), + Can either be a transformer object instance (e.g. `OneHotEncoder()`), a `Pipeline` containing the preprocessing steps, 'drop' for dropping the columns, 'remainder' for applying `remainder`, 'passthrough' to return the unencoded columns, - or None to use the default transformer (`OneHotEncoder()`). + or None to use the default transformer (`OneHotEncoder(drop="if_binary")`). Features classified under this category are imputed based on the strategy defined with `impute_missing`. - high_card_cat_transformer : typing.Optional[typing.Union[sklearn.base.TransformerMixin, typing.Literal["drop", "remainder", "passthrough"]]], default=None # noqa + high_card_cat_transformer : {"drop", "remainder", "passthrough"} or Transformer, optional Transformer used on categorical/string features with high cardinality (threshold is defined by `cardinality_threshold`). Can either be a transformer object instance (e.g. `GapEncoder()`), @@ -128,7 +132,7 @@ class SuperVectorizer(ColumnTransformer): Features classified under this category are imputed based on the strategy defined with `impute_missing`. - numerical_transformer : typing.Optional[typing.Union[sklearn.base.TransformerMixin, typing.Literal["drop", "remainder", "passthrough"]]], default=None # noqa + numerical_transformer : {"drop", "remainder", "passthrough"} or Transformer, optional Transformer used on numerical features. Can either be a transformer object instance (e.g. `StandardScaler()`), a `Pipeline` containing the preprocessing steps, @@ -139,7 +143,7 @@ class SuperVectorizer(ColumnTransformer): Features classified under this category are not imputed at all (regardless of `impute_missing`). - datetime_transformer : typing.Optional[typing.Union[sklearn.base.TransformerMixin, typing.Literal["drop", "remainder", "passthrough"]]], default=None + datetime_transformer : {"drop", "remainder", "passthrough"} or Transformer, optional Transformer used on datetime features. Can either be a transformer object instance (e.g. `DatetimeEncoder()`), a `Pipeline` containing the preprocessing steps, @@ -150,11 +154,11 @@ class SuperVectorizer(ColumnTransformer): Features classified under this category are not imputed at all (regardless of `impute_missing`). - auto_cast : bool, default=True + auto_cast : bool, optional, default=True If set to `True`, will try to convert each column to the best possible data type (dtype). - impute_missing : str, default='auto' + impute_missing : {"auto", "force", "skip"}, optional, default='auto' When to impute missing values in categorical (textual) columns. 'auto' will impute missing values if it is considered appropriate (we are using an encoder that does not support missing values and/or @@ -166,7 +170,7 @@ class SuperVectorizer(ColumnTransformer): it is left to the user to manage. See also attribute `imputed_columns_`. - remainder : typing.Union[typing.Literal["drop", "passthrough"], sklearn.base.TransformerMixin], default='drop' # noqa + remainder : {"drop", "passthrough"} or Transformer, optional, default='drop' By default, only the specified columns in `transformers` are transformed and combined in the output, and the non-specified columns are dropped. (default ``'drop'``). @@ -180,31 +184,32 @@ class SuperVectorizer(ColumnTransformer): Note that using this feature requires that the DataFrame columns input at :term:`fit` and :term:`transform` have identical order. - sparse_threshold: float, default=0.3 + sparse_threshold : float, optional, default=0.3 If the output of the different transformers contains sparse matrices, these will be stacked as a sparse matrix if the overall density is lower than this value. Use sparse_threshold=0 to always return dense. When the transformed output consists of all dense data, the stacked result will be dense, and this keyword will be ignored. - n_jobs : int, default=None + n_jobs : int, optional Number of jobs to run in parallel. - ``None`` means 1 unless in a :obj:`joblib.parallel_backend` context. + ``None`` (the default) means 1 unless in a + :obj:`joblib.parallel_backend` context. ``-1`` means using all processors. - transformer_weights : dict, default=None + transformer_weights : dict, optional Multiplicative weights for features per transformer. The output of the transformer is multiplied by these weights. Keys are transformer names, values the weights. - verbose : bool, default=False + verbose : bool, optional, default=False If True, the time elapsed while fitting each transformer will be - printed as it is completed + printed as it is completed. Attributes ---------- - transformers_: typing.List[typing.Tuple[str, typing.Union[str, sklearn.base.TransformerMixin], typing.List[str]]] # noqa + transformers_: list of 3-tuples (str, Transformer or str, list of str) The collection of fitted transformers as tuples of (name, fitted_transformer, column). `fitted_transformer` can be an estimator, 'drop', or 'passthrough'. In case there were no columns @@ -220,24 +225,27 @@ class SuperVectorizer(ColumnTransformer): The fitted array's columns. They are applied to the data passed to the `transform` method. - types_: typing.Dict[str, type] + types_: dict mapping str to type A mapping of inferred types per column. Key is the column name, value is the inferred dtype. Exists only if `auto_cast=True`. - imputed_columns_: typing.List[str] + imputed_columns_: list of str The list of columns in which we imputed the missing values. Notes ----- The column order of the input data is not guaranteed to be the same - as the output data (returned by `transform`). - This is a due to the way the ColumnTransformer works. + as the output data (returned by :func:`SuperVectorizer.transform`). + This is a due to the way the :class:`sklearn.compose.ColumnTransformer` + works. However, the output column order will always be the same for different - calls to `transform` on a same fitted SuperVectorizer instance. - For example, if input data has columns ['name', 'job', 'year], then output + calls to :func:`SuperVectorizer.transform` on a same fitted + :class:`SuperVectorizer` instance. + For example, if input data has columns ['name', 'job', 'year'], then output columns might be shuffled, e.g., ['job', 'year', 'name'], but every call - to `transform` will return this order. + to :func:`SuperVectorizer.transform` on this instance will return this + order. """ transformers_: List[Tuple[str, Union[str, TransformerMixin], List[str]]] @@ -257,7 +265,7 @@ class SuperVectorizer(ColumnTransformer): numerical_transformer: OptionalTransformer = None, datetime_transformer: OptionalTransformer = None, auto_cast: bool = True, - impute_missing: str = "auto", + impute_missing: Literal["auto", "force", "skip"] = "auto", # The next parameters are inherited from ColumnTransformer remainder: Union[ Literal["drop", "passthrough"], TransformerMixin
dirty-cat/dirty_cat
9bc0f1fa93a151fc599f6198960ba6d1fabdf5a3
diff --git a/dirty_cat/tests/test_docstrings.py b/dirty_cat/tests/test_docstrings.py index 7177f69..c8772bb 100644 --- a/dirty_cat/tests/test_docstrings.py +++ b/dirty_cat/tests/test_docstrings.py @@ -35,7 +35,6 @@ DOCSTRING_TEMP_IGNORE_SET = { "dirty_cat._similarity_encoder.SimilarityEncoder.fit", "dirty_cat._similarity_encoder.SimilarityEncoder.transform", "dirty_cat._similarity_encoder.SimilarityEncoder.fit_transform", - "dirty_cat._super_vectorizer.SuperVectorizer", "dirty_cat._super_vectorizer.SuperVectorizer.fit_transform", "dirty_cat._super_vectorizer.SuperVectorizer.transform", "dirty_cat._super_vectorizer.SuperVectorizer._auto_cast", @@ -148,17 +147,18 @@ def filter_errors(errors, method, Estimator=None): # - GL02: If there's a blank line, it should be before the # first line of the Returns section, not after (it allows to have # short docstrings for properties). + # - SA01: See Also section not found + # - EX01: No examples section found; FIXME: remove when #373 resolved - if code in ["RT02", "GL01", "GL02"]: + if code in ["RT02", "GL01", "GL02", "SA01", "EX01"]: continue # Following codes are only taken into account for the # top level class docstrings: # - ES01: No extended summary found - # - SA01: See Also section not found # - EX01: No examples section found - if method is not None and code in ["EX01", "SA01", "ES01"]: + if method is not None and code in ["EX01", "ES01"]: continue yield code, message diff --git a/dirty_cat/tests/test_gap_encoder.py b/dirty_cat/tests/test_gap_encoder.py index 3c4ecc0..f891508 100644 --- a/dirty_cat/tests/test_gap_encoder.py +++ b/dirty_cat/tests/test_gap_encoder.py @@ -2,10 +2,10 @@ import numpy as np import pandas as pd import pytest from sklearn import __version__ as sklearn_version -from sklearn.datasets import fetch_20newsgroups from dirty_cat import GapEncoder from dirty_cat._utils import Version +from dirty_cat.tests.utils import generate_data def test_analyzer(): @@ -15,8 +15,7 @@ def test_analyzer(): """ add_words = False n_samples = 70 - X_txt = fetch_20newsgroups(subset="train")["data"][:n_samples] - X = np.array([X_txt, X_txt]).T + X = generate_data(n_samples) n_components = 10 # Test first analyzer output: encoder = GapEncoder( @@ -56,8 +55,7 @@ def test_analyzer(): def test_gap_encoder( hashing: bool, init: str, analyzer: str, add_words: bool, n_samples: int = 70 ) -> None: - X_txt = fetch_20newsgroups(subset="train")["data"][:n_samples] - X = np.array([X_txt, X_txt]).T + X = generate_data(n_samples) n_components = 10 # Test output shape encoder = GapEncoder( @@ -117,8 +115,7 @@ def test_input_type() -> None: def test_partial_fit(n_samples=70) -> None: - X_txt = fetch_20newsgroups(subset="train")["data"][:n_samples] - X = np.array([X_txt, X_txt]).T + X = generate_data(n_samples) # Gap encoder with fit on one batch enc = GapEncoder(random_state=42, batch_size=n_samples, max_iter=1) X_enc = enc.fit_transform(X) @@ -131,8 +128,7 @@ def test_partial_fit(n_samples=70) -> None: def test_get_feature_names_out(n_samples=70) -> None: - X_txt = fetch_20newsgroups(subset="train")["data"][:n_samples] - X = np.array([X_txt, X_txt]).T + X = generate_data(n_samples) enc = GapEncoder(random_state=42) enc.fit(X) # Expect a warning if sklearn >= 1.0 @@ -164,8 +160,7 @@ def test_overflow_error() -> None: def test_score(n_samples: int = 70) -> None: - X_txt = fetch_20newsgroups(subset="train")["data"][:n_samples] - X1 = np.array(X_txt)[:, None] + X1 = generate_data(n_samples) X2 = np.hstack([X1, X1]) enc = GapEncoder(random_state=42) enc.fit(X1) diff --git a/dirty_cat/tests/utils.py b/dirty_cat/tests/utils.py index b710d5b..15da3e1 100644 --- a/dirty_cat/tests/utils.py +++ b/dirty_cat/tests/utils.py @@ -5,7 +5,6 @@ import numpy as np def generate_data(n_samples, as_list=False): MAX_LIMIT = 255 # extended ASCII Character set - i = 0 str_list = [] for i in range(n_samples): random_string = "category " @@ -14,7 +13,6 @@ def generate_data(n_samples, as_list=False): random_string += chr(random_integer) if random_integer < 50: random_string += " " - i += 1 str_list += [random_string] if as_list is True: X = str_list
Make our tests more robust to flawky downloads Some tests use data downloaded from internet: https://github.com/dirty-cat/dirty_cat/blob/master/dirty_cat/tests/test_minhash_encoder.py As a result, the tests are fragile (see https://github.com/dirty-cat/dirty_cat/actions/runs/3175021096/jobs/5176906979#step:6:907 for instance). It seems to me that some of these tests could be rewritten on generated data. ### Tests with flawky downloads - [X] `test_fast_hash.py` #402 - [X] `test_gap_encoder.py` #401 - [X] `test_minhash_encoder.py` #379
0.0
9bc0f1fa93a151fc599f6198960ba6d1fabdf5a3
[ "dirty_cat/tests/test_docstrings.py::test_docstring[SuperVectorizer-None]" ]
[ "dirty_cat/tests/test_docstrings.py::test_docstring[DatetimeEncoder-fit]", "dirty_cat/tests/test_docstrings.py::test_docstring[DatetimeEncoder-fit_transform]", "dirty_cat/tests/test_docstrings.py::test_docstring[DatetimeEncoder-get_metadata_routing]", "dirty_cat/tests/test_docstrings.py::test_docstring[DatetimeEncoder-get_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[DatetimeEncoder-set_output]", "dirty_cat/tests/test_docstrings.py::test_docstring[DatetimeEncoder-set_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[DatetimeEncoder-transform]", "dirty_cat/tests/test_docstrings.py::test_docstring[GapEncoder-fit_transform]", "dirty_cat/tests/test_docstrings.py::test_docstring[GapEncoder-get_metadata_routing]", "dirty_cat/tests/test_docstrings.py::test_docstring[GapEncoder-get_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[GapEncoder-set_output]", "dirty_cat/tests/test_docstrings.py::test_docstring[GapEncoder-set_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[MinHashEncoder-fit_transform]", "dirty_cat/tests/test_docstrings.py::test_docstring[MinHashEncoder-get_metadata_routing]", "dirty_cat/tests/test_docstrings.py::test_docstring[MinHashEncoder-get_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[MinHashEncoder-set_output]", "dirty_cat/tests/test_docstrings.py::test_docstring[MinHashEncoder-set_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-get_feature_names_out]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-get_metadata_routing]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-get_most_frequent]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-get_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-infrequent_categories_]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-inverse_transform]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-set_output]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-set_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[SimilarityEncoder-set_transform_request]", "dirty_cat/tests/test_docstrings.py::test_docstring[SuperVectorizer-get_metadata_routing]", "dirty_cat/tests/test_docstrings.py::test_docstring[SuperVectorizer-get_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[SuperVectorizer-set_output]", "dirty_cat/tests/test_docstrings.py::test_docstring[TargetEncoder-fit_transform]", "dirty_cat/tests/test_docstrings.py::test_docstring[TargetEncoder-get_metadata_routing]", "dirty_cat/tests/test_docstrings.py::test_docstring[TargetEncoder-get_params]", "dirty_cat/tests/test_docstrings.py::test_docstring[TargetEncoder-set_output]", "dirty_cat/tests/test_docstrings.py::test_docstring[TargetEncoder-set_params]", "dirty_cat/tests/test_gap_encoder.py::test_analyzer", "dirty_cat/tests/test_gap_encoder.py::test_gap_encoder[False-k-means++-word-True]", "dirty_cat/tests/test_gap_encoder.py::test_gap_encoder[True-random-char-False]", "dirty_cat/tests/test_gap_encoder.py::test_gap_encoder[True-k-means-char_wb-True]", "dirty_cat/tests/test_gap_encoder.py::test_input_type", "dirty_cat/tests/test_gap_encoder.py::test_partial_fit", "dirty_cat/tests/test_gap_encoder.py::test_get_feature_names_out", "dirty_cat/tests/test_gap_encoder.py::test_overflow_error", "dirty_cat/tests/test_gap_encoder.py::test_score", "dirty_cat/tests/test_gap_encoder.py::test_missing_values[zero_impute]", "dirty_cat/tests/test_gap_encoder.py::test_missing_values[error]", "dirty_cat/tests/test_gap_encoder.py::test_missing_values[aaa]" ]
{ "failed_lite_validators": [ "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2022-10-28 09:16:09+00:00
bsd-3-clause
1,921
disqus__python-phabricator-64
diff --git a/CHANGES b/CHANGES index 2fd4c34..64c95a0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +0.8.1 + +* Fixed bug where built-in interface dict overwrote `interface` methods from Almanac (`interface.search`, `interface.edit`). The `Resource` attribute `interface` is renamed `_interface`. + 0.8.0 * Switch to using requests diff --git a/phabricator/__init__.py b/phabricator/__init__.py index b01d167..6d53748 100644 --- a/phabricator/__init__.py +++ b/phabricator/__init__.py @@ -224,7 +224,7 @@ class Result(MutableMapping): class Resource(object): def __init__(self, api, interface=None, endpoint=None, method=None, nested=False): self.api = api - self.interface = interface or copy.deepcopy(parse_interfaces(INTERFACES)) + self._interface = interface or copy.deepcopy(parse_interfaces(INTERFACES)) self.endpoint = endpoint self.method = method self.nested = nested @@ -232,7 +232,7 @@ class Resource(object): def __getattr__(self, attr): if attr in getattr(self, '__dict__'): return getattr(self, attr) - interface = self.interface + interface = self._interface if self.nested: attr = "%s.%s" % (self.endpoint, attr) submethod_exists = False @@ -254,7 +254,7 @@ class Resource(object): def _request(self, **kwargs): # Check for missing variables - resource = self.interface + resource = self._interface def validate_kwarg(key, target): # Always allow list @@ -391,4 +391,4 @@ class Phabricator(Resource): interfaces = query() - self.interface = parse_interfaces(interfaces) + self._interface = parse_interfaces(interfaces) diff --git a/setup.py b/setup.py index c7586bc..ec3f0e5 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ if sys.version_info[:2] <= (3, 3): setup( name='phabricator', - version='0.8.0', + version='0.8.1', author='Disqus', author_email='[email protected]', url='http://github.com/disqus/python-phabricator',
disqus/python-phabricator
a922ba404a4578f9f909e241539b1fb5a99585b2
diff --git a/phabricator/tests/test_phabricator.py b/phabricator/tests/test_phabricator.py index cad5a8e..e12b285 100644 --- a/phabricator/tests/test_phabricator.py +++ b/phabricator/tests/test_phabricator.py @@ -163,7 +163,7 @@ class PhabricatorTest(unittest.TestCase): def test_endpoint_shadowing(self): - shadowed_endpoints = [e for e in self.api.interface.keys() if e in self.api.__dict__] + shadowed_endpoints = [e for e in self.api._interface.keys() if e in self.api.__dict__] self.assertEqual( shadowed_endpoints, [],
Conflict between Resource class attribute and new almanac interface endpoints With [rPe502df509d5f](https://secure.phabricator.com/rPe502df509d5f8dd3106be50d7d83ac244ff96cb4), upstream phab implements almanac conduit endpoints: `almanc.interface.search` and `almanc.interface.edit`. This now conflicts with the existing Resource class attribute `self.interface`. If you reproduce this against a Phab instance with the new `almanac.interface.*` conduit endpoints: ``` from phabricator import Phabricator phab = Phabricator() phab.almanac.interface.search Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'dict' object has no attribute 'search' ``` it throws an error because it is using the Resource class attribute `self.interface` instead of treating it like a normal method. This does not occur when the method name does not conflict with the Resource attributes: ``` phab.almanac.device.search <phabricator.Resource object at 0x7f760699cf60> ``` The Resource class should not rely on certain keywords *not* becoming conduit methods.
0.0
a922ba404a4578f9f909e241539b1fb5a99585b2
[ "phabricator/tests/test_phabricator.py::PhabricatorTest::test_endpoint_shadowing" ]
[ "phabricator/tests/test_phabricator.py::PhabricatorTest::test_bad_status", "phabricator/tests/test_phabricator.py::PhabricatorTest::test_classic_resources", "phabricator/tests/test_phabricator.py::PhabricatorTest::test_connect", "phabricator/tests/test_phabricator.py::PhabricatorTest::test_generate_hash", "phabricator/tests/test_phabricator.py::PhabricatorTest::test_maniphest_find", "phabricator/tests/test_phabricator.py::PhabricatorTest::test_map_param_type", "phabricator/tests/test_phabricator.py::PhabricatorTest::test_nested_resources", "phabricator/tests/test_phabricator.py::PhabricatorTest::test_user_whoami", "phabricator/tests/test_phabricator.py::PhabricatorTest::test_validation" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2021-02-09 01:47:25+00:00
apache-2.0
1,922
dixudx__rtcclient-184
diff --git a/examples/how_to/workitem/get_workitem.py b/examples/how_to/workitem/get_workitem.py index ef095f8..7064f40 100644 --- a/examples/how_to/workitem/get_workitem.py +++ b/examples/how_to/workitem/get_workitem.py @@ -9,7 +9,7 @@ if __name__ == "__main__": url = "https://your_domain:9443/jazz" username = "your_username" password = "your_password" - myclient = RTCClient(url, username, password) + myclient = RTCClient(url, username, password) # ends_with_jazz , old_rtc_authentication kwargs # get all workitems # If both projectarea_id and projectarea_name are None, all the workitems diff --git a/poetry.lock b/poetry.lock index 739b595..7f9ad3d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -747,6 +747,18 @@ files = [ {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +files = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] + [[package]] name = "tomli" version = "2.0.1" @@ -932,4 +944,4 @@ testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more [metadata] lock-version = "2.0" python-versions = ">=3.7.0,<4.0" -content-hash = "e34c2dbb238bb43211cc83b01a6fef54cfed2547b3f034dd4c7e47940cc84f95" +content-hash = "d1b93aabe50ca296f8324af41db0ba3b97b09444730854b7ebc3497f6e70fbdb" diff --git a/pyproject.toml b/pyproject.toml index bd2a89d..7fe23fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ ] yapf = "*" tox = "*" + toml = "*" [build-system] diff --git a/rtcclient/client.py b/rtcclient/client.py index aba7afb..5d2be51 100644 --- a/rtcclient/client.py +++ b/rtcclient/client.py @@ -8,7 +8,7 @@ import six import xmltodict from rtcclient import exception -from rtcclient import urlparse, urlquote, OrderedDict +from rtcclient import urlencode, urlparse, urlquote, OrderedDict from rtcclient.base import RTCBase from rtcclient.models import FiledAgainst, FoundIn, Comment, Action, State # noqa: F401 from rtcclient.models import IncludedInBuild, ChangeSet, Attachment # noqa: F401 @@ -58,7 +58,8 @@ class RTCClient(RTCBase): proxies=None, searchpath=None, ends_with_jazz=True, - verify: Union[bool, str] = False): + verify: Union[bool, str] = False, + old_rtc_authentication=False): """Initialization See params above @@ -68,6 +69,7 @@ class RTCClient(RTCBase): self.password = password self.proxies = proxies self.verify = verify + self.old_rtc_authentication = old_rtc_authentication RTCBase.__init__(self, url) if not isinstance(ends_with_jazz, bool): @@ -99,6 +101,24 @@ class RTCClient(RTCBase): proxies=self.proxies, allow_redirects=_allow_redirects) + if self.old_rtc_authentication: + # works with server that needs 0.6.0 version + _headers["Content-Type"] = self.CONTENT_URL_ENCODED + if resp.headers.get("set-cookie") is not None: + _headers["Cookie"] = resp.headers.get("set-cookie") + + credentials = urlencode({ + "j_username": self.username, + "j_password": self.password + }) + + resp = self.post(self.url + "/authenticated/j_security_check", + data=credentials, + verify=False, + headers=_headers, + proxies=self.proxies, + allow_redirects=_allow_redirects) + # authfailed authfailed = resp.headers.get("x-com-ibm-team-repository-web-auth-msg") if authfailed == "authfailed":
dixudx/rtcclient
da253d2d1eedb8e9e88c98cfba2828daa2a81f60
diff --git a/tests/test_client.py b/tests/test_client.py index ad6309f..49e7fd5 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -2,6 +2,8 @@ from rtcclient import RTCClient import requests import pytest import utils_test +from unittest.mock import call + from rtcclient.project_area import ProjectArea from rtcclient.models import Severity, Priority, FoundIn, FiledAgainst from rtcclient.models import TeamArea, Member, PlannedFor @@ -42,6 +44,254 @@ def test_headers(mocker): assert client.headers == expected_headers +def test_client_rest_calls_new_auth(mocker): + mocked_get = mocker.patch("requests.get") + mocked_post = mocker.patch("requests.post") + + mock_rsp = mocker.MagicMock(spec=requests.Response) + mock_rsp.status_code = 200 + + mocked_get.return_value = mock_rsp + mocked_post.return_value = mock_rsp + + mock_rsp.headers = {"set-cookie": "cookie-id"} + _ = RTCClient(url="http://test.url:9443/jazz", + username="user", + password="password") + + # assert GET calls + assert mocked_get.call_count == 2 + mocked_get.assert_has_calls([ + call('http://test.url:9443/jazz/authenticated/identity', + verify=False, + headers={ + 'Content-Type': 'text/xml', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + auth=('user', 'password'), + allow_redirects=True), + call('http://test.url:9443/jazz/authenticated/identity', + verify=False, + headers={ + 'Content-Type': 'text/xml', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + auth=('user', 'password'), + allow_redirects=True) + ]) + + # assert POST calls + assert mocked_post.call_count == 0 + + +def test_client_rest_calls_old_auth(mocker): + mocked_get = mocker.patch("requests.get") + mocked_post = mocker.patch("requests.post") + + mock_rsp = mocker.MagicMock(spec=requests.Response) + mock_rsp.status_code = 200 + + mocked_get.return_value = mock_rsp + mocked_post.return_value = mock_rsp + + mock_rsp.headers = {"set-cookie": "cookie-id"} + _ = RTCClient(url="http://test.url:9443/jazz", + username="user", + password="password", + old_rtc_authentication=True) + + # assert GET calls + assert mocked_get.call_count == 2 + mocked_get.assert_has_calls([ + call('http://test.url:9443/jazz/authenticated/identity', + verify=False, + headers={ + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + auth=('user', 'password'), + allow_redirects=True), + call('http://test.url:9443/jazz/authenticated/identity', + verify=False, + headers={ + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + auth=('user', 'password'), + allow_redirects=True) + ]) + + # assert POST calls + assert mocked_post.call_count == 1 + mocked_post.assert_has_calls([ + call('http://test.url:9443/jazz/authenticated/j_security_check', + data='j_username=user&j_password=password', + json=None, + verify=False, + headers={ + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + allow_redirects=True) + ]) + + +def test_headers_auth_required_new_auth(mocker): + mocked_get = mocker.patch("requests.get") + mocked_post = mocker.patch("requests.post") + + mock_rsp = mocker.MagicMock(spec=requests.Response) + mock_rsp.status_code = 200 + + # auth required + mock_rsp.headers = { + "set-cookie": "cookie-id", + "X-com-ibm-team-repository-web-auth-msg": "authrequired" + } + + mocked_get.return_value = mock_rsp + mocked_post.return_value = mock_rsp + + _ = RTCClient(url="http://test.url:9443/jazz", + username="user", + password="password") + + # assert GET calls + assert mocked_get.call_count == 2 + mocked_get.assert_has_calls([ + call('http://test.url:9443/jazz/authenticated/identity', + verify=False, + headers={ + 'Content-Type': 'text/xml', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + auth=('user', 'password'), + allow_redirects=True), + call('http://test.url:9443/jazz/authenticated/identity', + verify=False, + headers={ + 'Content-Type': 'text/xml', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + auth=('user', 'password'), + allow_redirects=True) + ]) + + # assert POST calls + assert mocked_post.call_count == 1 + mocked_post.assert_has_calls([ + call('http://test.url:9443/jazz/authenticated/j_security_check', + data={ + 'j_username': 'user', + 'j_password': 'password' + }, + json=None, + verify=False, + headers={'Content-Type': 'application/x-www-form-urlencoded'}, + proxies=None, + timeout=60, + allow_redirects=True) + ]) + + +def test_headers_auth_required_old_auth(mocker): + mocked_get = mocker.patch("requests.get") + mocked_post = mocker.patch("requests.post") + + mock_rsp = mocker.MagicMock(spec=requests.Response) + mock_rsp.status_code = 200 + + # auth required + mock_rsp.headers = { + "set-cookie": "cookie-id", + "X-com-ibm-team-repository-web-auth-msg": "authrequired" + } + + mocked_get.return_value = mock_rsp + mocked_post.return_value = mock_rsp + + _ = RTCClient(url="http://test.url:9443/jazz", + username="user", + password="password", + old_rtc_authentication=True) + + # assert GET calls + assert mocked_get.call_count == 2 + mocked_get.assert_has_calls([ + call('http://test.url:9443/jazz/authenticated/identity', + verify=False, + headers={ + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + auth=('user', 'password'), + allow_redirects=True), + call('http://test.url:9443/jazz/authenticated/identity', + verify=False, + headers={ + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + auth=('user', 'password'), + allow_redirects=True) + ]) + + # assert POST calls + assert mocked_post.call_count == 2 + mocked_post.assert_has_calls([ + call('http://test.url:9443/jazz/authenticated/j_security_check', + data='j_username=user&j_password=password', + json=None, + verify=False, + headers={ + 'Content-Type': 'application/x-www-form-urlencoded', + 'Cookie': 'cookie-id', + 'Accept': 'text/xml' + }, + proxies=None, + timeout=60, + allow_redirects=True), + call('http://test.url:9443/jazz/authenticated/j_security_check', + data={ + 'j_username': 'user', + 'j_password': 'password' + }, + json=None, + verify=False, + headers={'Content-Type': 'application/x-www-form-urlencoded'}, + proxies=None, + timeout=60, + allow_redirects=True) + ]) + + class TestRTCClient: @pytest.fixture(autouse=True)
url not found: jazz/authenticated Hi, I was trying to use your plugin to, at least, connect to a jazz server using your `get_workitem.py` script into `examples/how_to/workitem` folder. I've changed the file with : ```python url = "https://__the_url__:443/ccm/jazz" username = "my_username" password = "my_password" myclient = RTCClient(url, username, password, ends_with_jazz=True) ``` Adding also `ends_with_jazz=True` that I saw from docs/other issues. This is the trace I get: ```python 2023-03-22 14:49:42,753 DEBUG client.RTCClient: Get response from https://__the_url__:443/ccm/jazz/authenticated/identity 2023-03-22 14:49:42,764 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): __the_url__:443 2023-03-22 14:49:42,979 DEBUG urllib3.connectionpool: https://__the_url__:443 "GET /ccm/jazz/authenticated/identity HTTP/1.1" 302 0 2023-03-22 14:49:43,000 DEBUG urllib3.connectionpool: Resetting dropped connection: __the_url__ 2023-03-22 14:49:43,153 DEBUG urllib3.connectionpool: https://__the_url__:443 "GET /ccm/secure/authenticated/identity?redirectPath=%2Fccm%2Fjazz%2Fauthenticated%2Fidentity HTTP/1.1" 302 0 2023-03-22 14:49:43,167 DEBUG urllib3.connectionpool: Resetting dropped connection: __the_url__ 2023-03-22 14:49:43,325 DEBUG urllib3.connectionpool: https://__the_url__:443 "GET /ccm/auth/authrequired HTTP/1.1" 200 1072 2023-03-22 14:49:48,130 DEBUG client.RTCClient: Get response from https://__the_url__:443/ccm/jazz/authenticated/identity 2023-03-22 14:49:48,141 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): __the_url__:443 2023-03-22 14:49:48,368 DEBUG urllib3.connectionpool: https://__the_url__:443 "GET /ccm/jazz/authenticated/identity HTTP/1.1" 302 0 2023-03-22 14:49:48,381 DEBUG urllib3.connectionpool: Resetting dropped connection: __the_url__ 2023-03-22 14:49:48,543 DEBUG urllib3.connectionpool: https://__the_url__:443 "GET /ccm/secure/authenticated/identity?redirectPath=%2Fccm%2Fjazz%2Fauthenticated%2Fidentity HTTP/1.1" 302 0 2023-03-22 14:49:48,583 DEBUG urllib3.connectionpool: Resetting dropped connection: __the_url__ 2023-03-22 14:49:48,837 DEBUG urllib3.connectionpool: https://__the_url__:443 "GET /ccm/auth/authrequired HTTP/1.1" 200 1072 2023-03-22 14:49:56,708 DEBUG client.RTCClient: Post a request to https://__the_url__:443/ccm/jazz/authenticated/j_security_check with data: {'j_username': 'my_username', 'j_password': 'my_password'} and json: None 2023-03-22 14:49:56,717 DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): __the_url__:443 2023-03-22 14:49:57,598 DEBUG urllib3.connectionpool: https://__the_url__:443 "POST /ccm/jazz/authenticated/j_security_check HTTP/1.1" 302 0 2023-03-22 14:49:57,610 DEBUG urllib3.connectionpool: Resetting dropped connection: __the_url__ 2023-03-22 14:49:57,768 DEBUG urllib3.connectionpool: https://__the_url__:443 "GET /ccm/jazz/authenticated/ HTTP/1.1" 404 None 2023-03-22 14:49:57,773 ERROR client.RTCClient: Failed POST request at <https://__the_url__:443/ccm/jazz/authenticated/j_security_check> with response: b'Error 404: Not Found\n' 2023-03-22 14:49:57,773 INFO client.RTCClient: 404 Traceback (most recent call last): File "...\rtcclient\examples\how_to\workitem\get_workitem.py", line 13, in <module> myclient = RTCClient(url, username, password, ends_with_jazz=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...\rtcclient\rtcclient\client.py", line 77, in __init__ self.headers = self._get_headers() ^^^^^^^^^^^^^^^^^^^ File "...\rtcclient\rtcclient\client.py", line 155, in _get_headers resp = self.post(self.url + "/authenticated/j_security_check", ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "...\rtcclient\rtcclient\utils.py", line 27, in wrapper return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "...\rtcclient\rtcclient\base.py", line 144, in post response.raise_for_status() File "...\rtcclient\venv\Lib\site-packages\requests\models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://__the_url__/ccm/jazz/authenticated/ python-BaseException ``` So the point that raises exception is [this line](https://github.com/dixudx/rtcclient/blob/master/rtcclient/client.py#L136), the line number differs because of some tests I made related to cookies (from a fork), but those changes are commented. Some information on my environment: - Python3.11 - rtcclient checkout of main branch - IBM Jazz 7.0.2 Thank you!
0.0
da253d2d1eedb8e9e88c98cfba2828daa2a81f60
[ "tests/test_client.py::test_client_rest_calls_old_auth", "tests/test_client.py::test_headers_auth_required_old_auth" ]
[ "tests/test_client.py::test_headers", "tests/test_client.py::test_client_rest_calls_new_auth", "tests/test_client.py::test_headers_auth_required_new_auth", "tests/test_client.py::TestRTCClient::test_get_projectareas_unarchived", "tests/test_client.py::TestRTCClient::test_get_projectareas_archived", "tests/test_client.py::TestRTCClient::test_get_projectarea_unarchived", "tests/test_client.py::TestRTCClient::test_get_projectarea_exception", "tests/test_client.py::TestRTCClient::test_get_projectarea_archived", "tests/test_client.py::TestRTCClient::test_get_projectarea_byid", "tests/test_client.py::TestRTCClient::test_get_projectarea_id", "tests/test_client.py::TestRTCClient::test_get_projectarea_id_exception", "tests/test_client.py::TestRTCClient::test_get_projectarea_byid_exception", "tests/test_client.py::TestRTCClient::test_get_projectarea_ids", "tests/test_client.py::TestRTCClient::test_get_projectarea_ids_exception", "tests/test_client.py::TestRTCClient::test_check_projectarea_id", "tests/test_client.py::TestRTCClient::test_get_teamareas_unarchived", "tests/test_client.py::TestRTCClient::test_get_teamareas_archived", "tests/test_client.py::TestRTCClient::test_get_teamarea_unarchived", "tests/test_client.py::TestRTCClient::test_get_teamarea_archived", "tests/test_client.py::TestRTCClient::test_get_owned_by", "tests/test_client.py::TestRTCClient::test_get_plannedfors_unarchived", "tests/test_client.py::TestRTCClient::test_get_plannedfors_archived", "tests/test_client.py::TestRTCClient::test_get_plannedfor_unarchived", "tests/test_client.py::TestRTCClient::test_get_plannedfor_archived", "tests/test_client.py::TestRTCClient::test_get_severities", "tests/test_client.py::TestRTCClient::test_get_severity", "tests/test_client.py::TestRTCClient::test_get_priorities", "tests/test_client.py::TestRTCClient::test_get_priority", "tests/test_client.py::TestRTCClient::test_get_foundins_unarchived", "tests/test_client.py::TestRTCClient::test_get_foundins_archived", "tests/test_client.py::TestRTCClient::test_get_foundin_unarchived", "tests/test_client.py::TestRTCClient::test_get_foundin_archived", "tests/test_client.py::TestRTCClient::test_get_filedagainsts_unarchived", "tests/test_client.py::TestRTCClient::test_get_filedagainsts_archived", "tests/test_client.py::TestRTCClient::test_get_filedagainst_unarchived", "tests/test_client.py::TestRTCClient::test_get_filedagainst_archived", "tests/test_client.py::TestRTCClient::test_get_workitem", "tests/test_client.py::TestRTCClient::test_get_workitems_unarchived", "tests/test_client.py::TestRTCClient::test_get_workitems_archived", "tests/test_client.py::TestRTCClient::test_list_fields", "tests/test_client.py::TestRTCClient::test_list_fields_from_workitem", "tests/test_client.py::TestRTCClient::test_create_workitem", "tests/test_client.py::TestRTCClient::test_copy_workitem", "tests/test_client.py::TestRTCClient::test_update_workitem", "tests/test_client.py::TestRTCClient::test_check_itemtype" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-03-28 16:13:18+00:00
apache-2.0
1,923
django-json-api__django-rest-framework-json-api-1074
diff --git a/CHANGELOG.md b/CHANGELOG.md index 91faffd..91551dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ any parts of the framework not mentioned in the documentation should generally b * Fixed invalid relationship pointer in error objects when field naming formatting is used. * Properly resolved related resource type when nested source field is defined. +* Prevented overwriting of pointer in custom error object ### Added diff --git a/docs/usage.md b/docs/usage.md index 939e4e6..952fe80 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -237,7 +237,7 @@ class MyViewset(ModelViewSet): ``` -### Exception handling +### Error objects / Exception handling For the `exception_handler` class, if the optional `JSON_API_UNIFORM_EXCEPTIONS` is set to True, all exceptions will respond with the JSON:API [error format](https://jsonapi.org/format/#error-objects). @@ -245,6 +245,21 @@ all exceptions will respond with the JSON:API [error format](https://jsonapi.org When `JSON_API_UNIFORM_EXCEPTIONS` is False (the default), non-JSON:API views will respond with the normal DRF error format. +In case you need a custom error object you can simply raise an `rest_framework.serializers.ValidationError` like the following: + +```python +raise serializers.ValidationError( + { + "id": "your-id", + "detail": "your detail message", + "source": { + "pointer": "/data/attributes/your-pointer", + } + + } +) +``` + ### Performance Testing If you are trying to see if your viewsets are configured properly to optimize performance, diff --git a/rest_framework_json_api/utils.py b/rest_framework_json_api/utils.py index 8317c10..2e86e76 100644 --- a/rest_framework_json_api/utils.py +++ b/rest_framework_json_api/utils.py @@ -417,21 +417,20 @@ def format_error_object(message, pointer, response): if isinstance(message, dict): # as there is no required field in error object we check that all fields are string - # except links and source which might be a dict + # except links, source or meta which might be a dict is_custom_error = all( [ isinstance(value, str) for key, value in message.items() - if key not in ["links", "source"] + if key not in ["links", "source", "meta"] ] ) if is_custom_error: if "source" not in message: message["source"] = {} - message["source"] = { - "pointer": pointer, - } + if "pointer" not in message["source"]: + message["source"]["pointer"] = pointer errors.append(message) else: for k, v in message.items():
django-json-api/django-rest-framework-json-api
46551a9aada19c503e363b20b47765009038d996
diff --git a/tests/test_utils.py b/tests/test_utils.py index 9b47e9f..038e8ce 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -7,6 +7,7 @@ from rest_framework.views import APIView from rest_framework_json_api import serializers from rest_framework_json_api.utils import ( + format_error_object, format_field_name, format_field_names, format_link_segment, @@ -389,3 +390,45 @@ def test_get_resource_type_from_serializer_without_resource_name_raises_error(): "can not detect 'resource_name' on serializer " "'SerializerWithoutResourceName' in module 'tests.test_utils'" ) + + [email protected]( + "message,pointer,response,result", + [ + # Test that pointer does not get overridden in custom error + ( + { + "status": "400", + "source": { + "pointer": "/data/custom-pointer", + }, + "meta": {"key": "value"}, + }, + "/data/default-pointer", + Response(status.HTTP_400_BAD_REQUEST), + [ + { + "status": "400", + "source": {"pointer": "/data/custom-pointer"}, + "meta": {"key": "value"}, + } + ], + ), + # Test that pointer gets added to custom error + ( + { + "detail": "custom message", + }, + "/data/default-pointer", + Response(status.HTTP_400_BAD_REQUEST), + [ + { + "detail": "custom message", + "source": {"pointer": "/data/default-pointer"}, + } + ], + ), + ], +) +def test_format_error_object(message, pointer, response, result): + assert result == format_error_object(message, pointer, response)
Avoid overwriting of pointer when using custom errors The code that produces JSON:API error objects assumes that all fields being validated are under `/data/attributes`: https://github.com/django-json-api/django-rest-framework-json-api/blob/b0257c065ac2439036ac0543139e7f5913755177/rest_framework_json_api/utils.py#L339 and there doesn't appear to be a way to override the `pointer` value when specifying the field on a serializer. Use case: I would like to be able to specify a serializer for the top-level `"meta"` field and have any validation errors on that data generate responses properly populated with `"source": {"pointer": "/meta/foo"}`.
0.0
46551a9aada19c503e363b20b47765009038d996
[ "tests/test_utils.py::test_format_error_object[message0-/data/default-pointer-response0-result0]" ]
[ "tests/test_utils.py::test_get_related_resource_type_from_nested_source[m2m_source.targets-ManyToManyTarget-related_field_kwargs0]", "tests/test_utils.py::test_get_related_resource_type_from_nested_source[m2m_target.sources.-ManyToManySource-related_field_kwargs1]", "tests/test_utils.py::test_get_related_resource_type_from_nested_source[fk_source.target-ForeignKeyTarget-related_field_kwargs2]", "tests/test_utils.py::test_get_related_resource_type_from_nested_source[fk_target.source-ForeignKeySource-related_field_kwargs3]", "tests/test_utils.py::test_get_resource_name_no_view", "tests/test_utils.py::test_get_resource_name_from_view[False-False-APIView]", "tests/test_utils.py::test_get_resource_name_from_view[False-True-APIViews]", "tests/test_utils.py::test_get_resource_name_from_view[dasherize-False-api-view]", "tests/test_utils.py::test_get_resource_name_from_view[dasherize-True-api-views]", "tests/test_utils.py::test_get_resource_name_from_view_custom_resource_name[False-False]", "tests/test_utils.py::test_get_resource_name_from_view_custom_resource_name[False-True]", "tests/test_utils.py::test_get_resource_name_from_view_custom_resource_name[dasherize-False]", "tests/test_utils.py::test_get_resource_name_from_view_custom_resource_name[dasherize-True]", "tests/test_utils.py::test_get_resource_name_from_model[False-False-BasicModel]", "tests/test_utils.py::test_get_resource_name_from_model[False-True-BasicModels]", "tests/test_utils.py::test_get_resource_name_from_model[dasherize-False-basic-model]", "tests/test_utils.py::test_get_resource_name_from_model[dasherize-True-basic-models]", "tests/test_utils.py::test_get_resource_name_from_model_serializer_class[False-False-BasicModel]", "tests/test_utils.py::test_get_resource_name_from_model_serializer_class[False-True-BasicModels]", "tests/test_utils.py::test_get_resource_name_from_model_serializer_class[dasherize-False-basic-model]", "tests/test_utils.py::test_get_resource_name_from_model_serializer_class[dasherize-True-basic-models]", "tests/test_utils.py::test_get_resource_name_from_model_serializer_class_custom_resource_name[False-False]", "tests/test_utils.py::test_get_resource_name_from_model_serializer_class_custom_resource_name[False-True]", "tests/test_utils.py::test_get_resource_name_from_model_serializer_class_custom_resource_name[dasherize-False]", "tests/test_utils.py::test_get_resource_name_from_model_serializer_class_custom_resource_name[dasherize-True]", "tests/test_utils.py::test_get_resource_name_from_plain_serializer_class[False-False]", "tests/test_utils.py::test_get_resource_name_from_plain_serializer_class[False-True]", "tests/test_utils.py::test_get_resource_name_from_plain_serializer_class[dasherize-False]", "tests/test_utils.py::test_get_resource_name_from_plain_serializer_class[dasherize-True]", "tests/test_utils.py::test_get_resource_name_with_errors[400]", "tests/test_utils.py::test_get_resource_name_with_errors[403]", "tests/test_utils.py::test_get_resource_name_with_errors[500]", "tests/test_utils.py::test_format_field_names[False-output0]", "tests/test_utils.py::test_format_field_names[camelize-output1]", "tests/test_utils.py::test_format_field_names[capitalize-output2]", "tests/test_utils.py::test_format_field_names[dasherize-output3]", "tests/test_utils.py::test_format_field_names[underscore-output4]", "tests/test_utils.py::test_undo_format_field_names[False-output0]", "tests/test_utils.py::test_undo_format_field_names[camelize-output1]", "tests/test_utils.py::test_format_field_name[False-full_name]", "tests/test_utils.py::test_format_field_name[camelize-fullName]", "tests/test_utils.py::test_format_field_name[capitalize-FullName]", "tests/test_utils.py::test_format_field_name[dasherize-full-name]", "tests/test_utils.py::test_format_field_name[underscore-full_name]", "tests/test_utils.py::test_undo_format_field_name[False-fullName]", "tests/test_utils.py::test_undo_format_field_name[camelize-full_name]", "tests/test_utils.py::test_format_link_segment[False-first_Name]", "tests/test_utils.py::test_format_link_segment[camelize-firstName]", "tests/test_utils.py::test_format_link_segment[capitalize-FirstName]", "tests/test_utils.py::test_format_link_segment[dasherize-first-name]", "tests/test_utils.py::test_format_link_segment[underscore-first_name]", "tests/test_utils.py::test_undo_format_link_segment[False-fullName]", "tests/test_utils.py::test_undo_format_link_segment[camelize-full_name]", "tests/test_utils.py::test_format_value[False-first_name]", "tests/test_utils.py::test_format_value[camelize-firstName]", "tests/test_utils.py::test_format_value[capitalize-FirstName]", "tests/test_utils.py::test_format_value[dasherize-first-name]", "tests/test_utils.py::test_format_value[underscore-first_name]", "tests/test_utils.py::test_format_resource_type[None-None-ResourceType]", "tests/test_utils.py::test_format_resource_type[camelize-False-resourceType]", "tests/test_utils.py::test_format_resource_type[camelize-True-resourceTypes]", "tests/test_utils.py::test_get_related_resource_type[ManyToManySource-targets-ManyToManyTarget]", "tests/test_utils.py::test_get_related_resource_type[ManyToManyTarget-sources-ManyToManySource]", "tests/test_utils.py::test_get_related_resource_type[ForeignKeySource-target-ForeignKeyTarget]", "tests/test_utils.py::test_get_related_resource_type[ForeignKeyTarget-sources-ForeignKeySource]", "tests/test_utils.py::test_get_related_resource_type_from_plain_serializer_class[related_field_kwargs0-BasicModel]", "tests/test_utils.py::test_get_related_resource_type_from_plain_serializer_class[related_field_kwargs1-BasicModel]", "tests/test_utils.py::test_get_related_resource_type_from_plain_serializer_class[related_field_kwargs2-BasicModel]", "tests/test_utils.py::test_get_resource_type_from_serializer_without_resource_name_raises_error", "tests/test_utils.py::test_format_error_object[message1-/data/default-pointer-response1-result1]" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2022-07-20 11:13:20+00:00
bsd-2-clause
1,924
django-json-api__django-rest-framework-json-api-1137
diff --git a/AUTHORS b/AUTHORS index e27ba5f..797ab52 100644 --- a/AUTHORS +++ b/AUTHORS @@ -3,6 +3,7 @@ Adam Ziolkowski <[email protected]> Alan Crosswell <[email protected]> Alex Seidmann <[email protected]> Anton Shutik <[email protected]> +Arttu Perälä <[email protected]> Ashley Loewen <[email protected]> Asif Saif Uddin <[email protected]> Beni Keller <[email protected]> diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a1c344..3f9c175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ any parts of the framework not mentioned in the documentation should generally b ### Fixed * Refactored handling of the `sort` query parameter to fix duplicate declaration in the generated schema definition +* Non-field serializer errors are given a source.pointer value of "/data". ## [6.0.0] - 2022-09-24 diff --git a/example/api/serializers/identity.py b/example/api/serializers/identity.py index 069259d..5e2a42e 100644 --- a/example/api/serializers/identity.py +++ b/example/api/serializers/identity.py @@ -23,6 +23,13 @@ class IdentitySerializer(serializers.ModelSerializer): ) return data + def validate(self, data): + if data["first_name"] == data["last_name"]: + raise serializers.ValidationError( + "First name cannot be the same as last name!" + ) + return data + class Meta: model = auth_models.User fields = ( diff --git a/rest_framework_json_api/serializers.py b/rest_framework_json_api/serializers.py index a288471..4b619ac 100644 --- a/rest_framework_json_api/serializers.py +++ b/rest_framework_json_api/serializers.py @@ -155,7 +155,12 @@ class IncludedResourcesValidationMixin: class ReservedFieldNamesMixin: """Ensures that reserved field names are not used and an error raised instead.""" - _reserved_field_names = {"meta", "results", "type"} + _reserved_field_names = { + "meta", + "results", + "type", + api_settings.NON_FIELD_ERRORS_KEY, + } def get_fields(self): fields = super().get_fields() diff --git a/rest_framework_json_api/utils.py b/rest_framework_json_api/utils.py index 3d374ee..dab8a3b 100644 --- a/rest_framework_json_api/utils.py +++ b/rest_framework_json_api/utils.py @@ -13,6 +13,7 @@ from django.utils import encoding from django.utils.translation import gettext_lazy as _ from rest_framework import exceptions, relations from rest_framework.exceptions import APIException +from rest_framework.settings import api_settings from .settings import json_api_settings @@ -381,10 +382,14 @@ def format_drf_errors(response, context, exc): ] for field, error in response.data.items(): + non_field_error = field == api_settings.NON_FIELD_ERRORS_KEY field = format_field_name(field) pointer = None - # pointer can be determined only if there's a serializer. - if has_serializer: + if non_field_error: + # Serializer error does not refer to a specific field. + pointer = "/data" + elif has_serializer: + # pointer can be determined only if there's a serializer. rel = "relationships" if field in relationship_fields else "attributes" pointer = f"/data/{rel}/{field}" if isinstance(exc, Http404) and isinstance(error, str):
django-json-api/django-rest-framework-json-api
ad5a793b54ca2922223352a58830515d25fa4807
diff --git a/example/tests/test_generic_viewset.py b/example/tests/test_generic_viewset.py index c8a28f2..40812d6 100644 --- a/example/tests/test_generic_viewset.py +++ b/example/tests/test_generic_viewset.py @@ -129,3 +129,35 @@ class GenericViewSet(TestBase): ) assert expected == response.json() + + def test_nonfield_validation_exceptions(self): + """ + Non-field errors should be attributed to /data source.pointer. + """ + expected = { + "errors": [ + { + "status": "400", + "source": { + "pointer": "/data", + }, + "detail": "First name cannot be the same as last name!", + "code": "invalid", + }, + ] + } + response = self.client.post( + "/identities", + { + "data": { + "type": "users", + "attributes": { + "email": "[email protected]", + "first_name": "Miles", + "last_name": "Miles", + }, + } + }, + ) + + assert expected == response.json()
Object-level validation errors given an incorrect source.pointer ## Description of the Bug Report When raising a non-field `ValidationError` in a serializer [in accordance with the DRF documentation](https://www.django-rest-framework.org/api-guide/serializers/#object-level-validation), the error is attributed to a non-existing `/data/attributes/non_field_errors` path instead of `/data`. ```python from rest_framework_json_api import serializers class ProductSerializer(serializers.ModelSerializer): def validate(self, data): if data.get("best_before_date") and data.get("expiry_date"): raise serializers.ValidationError( "Specify either a best before date or an expiry date." ) return data ``` ```json { "errors": [ { "detail": "Specify either a best before date or an expiry date.", "status": "400", "source": { "pointer": "/data/attributes/non_field_errors" }, "code": "invalid" } ] } ``` Complete minimal example available [here](https://github.com/arttuperala/jsonapi_non_field_errors). ### Discussed in https://github.com/django-json-api/django-rest-framework-json-api/discussions/1135 ## Checklist - [x] Certain that this is a bug (if unsure or you have a question use [discussions](https://github.com/django-json-api/django-rest-framework-json-api/discussions) instead) - [x] Code snippet or unit test added to reproduce bug
0.0
ad5a793b54ca2922223352a58830515d25fa4807
[ "example/tests/test_generic_viewset.py::GenericViewSet::test_nonfield_validation_exceptions" ]
[ "example/tests/test_generic_viewset.py::GenericViewSet::test_ember_expected_renderer", "example/tests/test_generic_viewset.py::GenericViewSet::test_default_validation_exceptions", "example/tests/test_generic_viewset.py::GenericViewSet::test_default_rest_framework_behavior", "example/tests/test_generic_viewset.py::GenericViewSet::test_custom_validation_exceptions" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2023-03-07 08:33:04+00:00
bsd-2-clause
1,925
django-json-api__django-rest-framework-json-api-1162
diff --git a/CHANGELOG.md b/CHANGELOG.md index d494fc2..a9dc65d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,8 @@ any parts of the framework not mentioned in the documentation should generally b return value.name ``` +* `SerializerMethodResourceRelatedField(many=True)` relationship data now includes a meta section. + ### Fixed * Refactored handling of the `sort` query parameter to fix duplicate declaration in the generated schema definition diff --git a/rest_framework_json_api/renderers.py b/rest_framework_json_api/renderers.py index f766020..9a0d9c0 100644 --- a/rest_framework_json_api/renderers.py +++ b/rest_framework_json_api/renderers.py @@ -19,6 +19,7 @@ import rest_framework_json_api from rest_framework_json_api import utils from rest_framework_json_api.relations import ( HyperlinkedMixin, + ManySerializerMethodResourceRelatedField, ResourceRelatedField, SkipDataMixin, ) @@ -152,6 +153,11 @@ class JSONRenderer(renderers.JSONRenderer): if not isinstance(field, SkipDataMixin): relation_data.update({"data": resource.get(field_name)}) + if isinstance(field, ManySerializerMethodResourceRelatedField): + relation_data.update( + {"meta": {"count": len(resource.get(field_name))}} + ) + data.update({field_name: relation_data}) continue
django-json-api/django-rest-framework-json-api
71508efa3fee8ff75c9cfcd092844801aeb407e1
diff --git a/example/tests/integration/test_non_paginated_responses.py b/example/tests/integration/test_non_paginated_responses.py index 60376a8..92d26de 100644 --- a/example/tests/integration/test_non_paginated_responses.py +++ b/example/tests/integration/test_non_paginated_responses.py @@ -51,6 +51,7 @@ def test_multiple_entries_no_pagination(multiple_entries, client): "related": "http://testserver/entries/1/suggested/", "self": "http://testserver/entries/1/relationships/suggested", }, + "meta": {"count": 1}, }, "suggestedHyperlinked": { "links": { @@ -106,6 +107,7 @@ def test_multiple_entries_no_pagination(multiple_entries, client): "related": "http://testserver/entries/2/suggested/", "self": "http://testserver/entries/2/relationships/suggested", }, + "meta": {"count": 1}, }, "suggestedHyperlinked": { "links": { diff --git a/example/tests/integration/test_pagination.py b/example/tests/integration/test_pagination.py index 4c60e96..1a4bd05 100644 --- a/example/tests/integration/test_pagination.py +++ b/example/tests/integration/test_pagination.py @@ -51,6 +51,7 @@ def test_pagination_with_single_entry(single_entry, client): "related": "http://testserver/entries/1/suggested/", "self": "http://testserver/entries/1/relationships/suggested", }, + "meta": {"count": 0}, }, "suggestedHyperlinked": { "links": { diff --git a/example/tests/test_filters.py b/example/tests/test_filters.py index ab74dd0..87f9d05 100644 --- a/example/tests/test_filters.py +++ b/example/tests/test_filters.py @@ -512,6 +512,7 @@ class DJATestFilters(APITestCase): {"type": "entries", "id": "11"}, {"type": "entries", "id": "12"}, ], + "meta": {"count": 11}, }, "suggestedHyperlinked": { "links": {
SerializerMethodResourceRelatedField does not include meta section in relationship response. `SerializerMethodResourceRelatedField` does not include a meta section in the relationship response like `ResourceRelatedField` does. This doesn't make sense, because `SerializerMethodResourceRelatedField` extends `ResourceRelatedField` and both seem to return every related record in the response (for the record I've only tried with a little over a thousand related records). So for example if you had an ObjectA with a has many relationship with ObjectB: ```python objectbs = SerializerMethodResourceRelatedField( source='get_objectbs', many=True, model=ObjectB, read_only=True ) def get_objectbs(self, obj): return ObjectB.objects.filter(objecta=obj) ``` then your response would look like: ```json "relationships": { "objectb": { "data": [...] } } ``` instead of: ```json "relationships": { "objectb": { "meta": { "count": 2 }, "data": [...] } } ```
0.0
71508efa3fee8ff75c9cfcd092844801aeb407e1
[ "example/tests/integration/test_non_paginated_responses.py::test_multiple_entries_no_pagination", "example/tests/integration/test_pagination.py::test_pagination_with_single_entry", "example/tests/test_filters.py::DJATestFilters::test_search_keywords" ]
[ "example/tests/test_filters.py::DJATestFilters::test_filter_empty_association_name", "example/tests/test_filters.py::DJATestFilters::test_filter_exact", "example/tests/test_filters.py::DJATestFilters::test_filter_exact_fail", "example/tests/test_filters.py::DJATestFilters::test_filter_fields_intersection", "example/tests/test_filters.py::DJATestFilters::test_filter_fields_union_list", "example/tests/test_filters.py::DJATestFilters::test_filter_in", "example/tests/test_filters.py::DJATestFilters::test_filter_invalid_association_name", "example/tests/test_filters.py::DJATestFilters::test_filter_isempty", "example/tests/test_filters.py::DJATestFilters::test_filter_isnull", "example/tests/test_filters.py::DJATestFilters::test_filter_malformed_left_bracket", "example/tests/test_filters.py::DJATestFilters::test_filter_missing_right_bracket", "example/tests/test_filters.py::DJATestFilters::test_filter_missing_rvalue", "example/tests/test_filters.py::DJATestFilters::test_filter_missing_rvalue_equal", "example/tests/test_filters.py::DJATestFilters::test_filter_no_brackets", "example/tests/test_filters.py::DJATestFilters::test_filter_no_brackets_equal", "example/tests/test_filters.py::DJATestFilters::test_filter_no_brackets_rvalue", "example/tests/test_filters.py::DJATestFilters::test_filter_not_null", "example/tests/test_filters.py::DJATestFilters::test_filter_related", "example/tests/test_filters.py::DJATestFilters::test_filter_related_fieldset_class", "example/tests/test_filters.py::DJATestFilters::test_filter_related_missing_fieldset_class", "example/tests/test_filters.py::DJATestFilters::test_filter_repeated_relations", "example/tests/test_filters.py::DJATestFilters::test_filter_single_relation", "example/tests/test_filters.py::DJATestFilters::test_many_params", "example/tests/test_filters.py::DJATestFilters::test_param_duplicate_page", "example/tests/test_filters.py::DJATestFilters::test_param_duplicate_sort", "example/tests/test_filters.py::DJATestFilters::test_param_invalid", "example/tests/test_filters.py::DJATestFilters::test_search_multiple_keywords", "example/tests/test_filters.py::DJATestFilters::test_sort", "example/tests/test_filters.py::DJATestFilters::test_sort_camelcase", "example/tests/test_filters.py::DJATestFilters::test_sort_double_negative", "example/tests/test_filters.py::DJATestFilters::test_sort_invalid", "example/tests/test_filters.py::DJATestFilters::test_sort_related", "example/tests/test_filters.py::DJATestFilters::test_sort_reverse", "example/tests/test_filters.py::DJATestFilters::test_sort_underscore" ]
{ "failed_lite_validators": [ "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2023-06-28 06:04:41+00:00
bsd-2-clause
1,926
django-json-api__django-rest-framework-json-api-1220
diff --git a/CHANGELOG.md b/CHANGELOG.md index 964f6b1..0b05600 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ any parts of the framework not mentioned in the documentation should generally b * `ModelSerializer` fields are now returned in the same order than DRF * Avoided that an empty attributes dict is rendered in case serializer does not provide any attribute fields. +* Avoided shadowing of exception when rendering errors (regression since 4.3.0). ### Removed diff --git a/rest_framework_json_api/utils.py b/rest_framework_json_api/utils.py index 2e57fbb..e12080a 100644 --- a/rest_framework_json_api/utils.py +++ b/rest_framework_json_api/utils.py @@ -381,11 +381,7 @@ def format_drf_errors(response, context, exc): errors.extend(format_error_object(message, "/data", response)) # handle all errors thrown from serializers else: - # Avoid circular deps - from rest_framework import generics - - has_serializer = isinstance(context["view"], generics.GenericAPIView) - if has_serializer: + try: serializer = context["view"].get_serializer() fields = get_serializer_fields(serializer) or dict() relationship_fields = [ @@ -393,6 +389,11 @@ def format_drf_errors(response, context, exc): for name, field in fields.items() if is_relationship_field(field) ] + except Exception: + # ignore potential errors when retrieving serializer + # as it might shadow error which is currently being + # formatted + serializer = None for field, error in response.data.items(): non_field_error = field == api_settings.NON_FIELD_ERRORS_KEY @@ -401,7 +402,7 @@ def format_drf_errors(response, context, exc): if non_field_error: # Serializer error does not refer to a specific field. pointer = "/data" - elif has_serializer: + elif serializer: # pointer can be determined only if there's a serializer. rel = "relationships" if field in relationship_fields else "attributes" pointer = f"/data/{rel}/{field}"
django-json-api/django-rest-framework-json-api
2568417f1940834c058ccf8319cf3e4bc0913bee
diff --git a/tests/test_views.py b/tests/test_views.py index de5d1b7..acba7e6 100644 --- a/tests/test_views.py +++ b/tests/test_views.py @@ -154,6 +154,17 @@ class TestModelViewSet: "included" ] + @pytest.mark.urls(__name__) + def test_list_with_invalid_include(self, client, foreign_key_source): + url = reverse("foreign-key-source-list") + response = client.get(url, data={"include": "invalid"}) + assert response.status_code == status.HTTP_400_BAD_REQUEST + result = response.json() + assert ( + result["errors"][0]["detail"] + == "This endpoint does not support the include parameter for path invalid" + ) + @pytest.mark.urls(__name__) def test_list_with_default_included_resources(self, client, foreign_key_source): url = reverse("default-included-resources-list")
Validation of include parameter causes unhandled exception ## Description of the Bug Report When requesting an API endpoint with the `include` query param, specifying an unsupported value results in an uncaught exception and traceback (below). Note: this only seems to happen when querying using the browseable API. When I use [Insomnia](https://insomnia.rest/), I get a 400 response as I'd expect. Versions: - Python: 3.6.15 - Django: 3.1.8 - DRF: 3.12.4 - DRF-JA: 3.1.0 <details><summary>Stack trace (browseable API)</summary> <pre><code> Traceback (most recent call last): File "/opt/python/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/opt/python/django/core/handlers/base.py", line 204, in _get_response response = response.render() File "/opt/python/django/template/response.py", line 105, in render self.content = self.rendered_content File "/opt/python/rest_framework/response.py", line 70, in rendered_content ret = renderer.render(self.data, accepted_media_type, context) File "/opt/python/rest_framework/renderers.py", line 724, in render context = self.get_context(data, accepted_media_type, renderer_context) File "/opt/python/rest_framework/renderers.py", line 655, in get_context raw_data_post_form = self.get_raw_data_form(data, view, 'POST', request) File "/opt/python/rest_framework/renderers.py", line 554, in get_raw_data_form serializer = view.get_serializer() File "/opt/python/rest_framework/generics.py", line 110, in get_serializer return serializer_class(*args, **kwargs) File "/opt/python/rest_framework_json_api/serializers.py", line 113, in __init__ validate_path(this_serializer_class, included_field_path, included_field_name) File "/opt/python/rest_framework_json_api/serializers.py", line 99, in validate_path path </code></pre> </details> <details><summary>400 response (Insomnia)</summary> <pre><code> { "errors": [ { "detail": "This endpoint does not support the include parameter for path foo", "status": "400", "source": { "pointer": "/data" }, "code": "parse_error" } ], "meta": { "version": "unversioned" } } </code></pre> </details> ## Checklist - [x] Certain that this is a bug (if unsure or you have a question use [discussions](https://github.com/django-json-api/django-rest-framework-json-api/discussions) instead) - [ ] Code snippet or unit test added to reproduce bug - Should be reproducible in any minimal app with no include serializers configured
0.0
2568417f1940834c058ccf8319cf3e4bc0913bee
[ "tests/test_views.py::TestModelViewSet::test_list_with_invalid_include" ]
[ "tests/test_views.py::TestModelViewSet::test_list", "tests/test_views.py::TestModelViewSet::test_list_with_include_foreign_key", "tests/test_views.py::TestModelViewSet::test_list_with_include_many_to_many_field", "tests/test_views.py::TestModelViewSet::test_list_with_include_nested_related_field", "tests/test_views.py::TestModelViewSet::test_list_with_default_included_resources", "tests/test_views.py::TestModelViewSet::test_retrieve", "tests/test_views.py::TestModelViewSet::test_retrieve_with_include_foreign_key", "tests/test_views.py::TestModelViewSet::test_patch", "tests/test_views.py::TestModelViewSet::test_delete", "tests/test_views.py::TestModelViewSet::test_get_related_field_name_handles_formatted_link_segments[False]", "tests/test_views.py::TestModelViewSet::test_get_related_field_name_handles_formatted_link_segments[dasherize]", "tests/test_views.py::TestModelViewSet::test_get_related_field_name_handles_formatted_link_segments[camelize]", "tests/test_views.py::TestModelViewSet::test_get_related_field_name_handles_formatted_link_segments[capitalize]", "tests/test_views.py::TestModelViewSet::test_get_related_field_name_handles_formatted_link_segments[underscore]", "tests/test_views.py::TestReadonlyModelViewSet::test_custom_action_allows_all_methods[list_action-action_kwargs0-get]", "tests/test_views.py::TestReadonlyModelViewSet::test_custom_action_allows_all_methods[list_action-action_kwargs0-post]", "tests/test_views.py::TestReadonlyModelViewSet::test_custom_action_allows_all_methods[list_action-action_kwargs0-patch]", "tests/test_views.py::TestReadonlyModelViewSet::test_custom_action_allows_all_methods[list_action-action_kwargs0-delete]", "tests/test_views.py::TestReadonlyModelViewSet::test_custom_action_allows_all_methods[detail_action-action_kwargs1-get]", "tests/test_views.py::TestReadonlyModelViewSet::test_custom_action_allows_all_methods[detail_action-action_kwargs1-post]", "tests/test_views.py::TestReadonlyModelViewSet::test_custom_action_allows_all_methods[detail_action-action_kwargs1-patch]", "tests/test_views.py::TestReadonlyModelViewSet::test_custom_action_allows_all_methods[detail_action-action_kwargs1-delete]", "tests/test_views.py::TestAPIView::test_patch", "tests/test_views.py::TestAPIView::test_post_with_missing_id", "tests/test_views.py::TestAPIView::test_patch_with_custom_id" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2024-04-18 19:46:32+00:00
bsd-2-clause
1,927
django-money__django-money-594
diff --git a/djmoney/money.py b/djmoney/money.py index 70bea0b..b744c66 100644 --- a/djmoney/money.py +++ b/djmoney/money.py @@ -106,7 +106,6 @@ class Money(DefaultMoney): # we overwrite the 'targets' so the wrong synonyms are called # Example: we overwrite __add__; __radd__ calls __add__ on DefaultMoney... __radd__ = __add__ - __rsub__ = __sub__ __rmul__ = __mul__ diff --git a/docs/changes.rst b/docs/changes.rst index 2643b4d..8c0b272 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -15,6 +15,7 @@ Changelog **Fixed** - Pin ``pymoneyed<1.0`` as it changed the ``repr`` output of the ``Money`` class. +- Subtracting ``Money`` from ``moneyed.Money``. Regression, introduced in ``1.2``. `#593`_ `1.2.2`_ - 2020-12-29 --------------------- @@ -694,6 +695,7 @@ wrapping with ``money_manager``. .. _0.3: https://github.com/django-money/django-money/compare/0.2...0.3 .. _0.2: https://github.com/django-money/django-money/compare/0.2...a6d90348085332a393abb40b86b5dd9505489b04 +.. _#593: https://github.com/django-money/django-money/issues/593 .. _#586: https://github.com/django-money/django-money/issues/586 .. _#585: https://github.com/django-money/django-money/pull/585 .. _#583: https://github.com/django-money/django-money/issues/583
django-money/django-money
bb222ed619f72a0112aef8c0fd9a4823b1e6e388
diff --git a/tests/test_money.py b/tests/test_money.py index 65199c4..bb7ea79 100644 --- a/tests/test_money.py +++ b/tests/test_money.py @@ -2,7 +2,7 @@ from django.utils.translation import override import pytest -from djmoney.money import Money, get_current_locale +from djmoney.money import DefaultMoney, Money, get_current_locale def test_repr(): @@ -114,3 +114,12 @@ def test_decimal_places_display_overwrite(): assert str(number) == "$1.23457" number.decimal_places_display = None assert str(number) == "$1.23" + + +def test_sub_negative(): + # See GH-593 + total = DefaultMoney(0, "EUR") + bills = (Money(8, "EUR"), Money(25, "EUR")) + for bill in bills: + total -= bill + assert total == Money(-33, "EUR")
Money should not override `__rsub__` method As [reported](https://github.com/py-moneyed/py-moneyed/issues/144) in pymoneyed the following test case fails: ```python from moneyed import Money as PyMoney from djmoney.money import Money def test_sub_negative(): total = PyMoney(0, "EUR") bills = (Money(8, "EUR"), Money(25, "EUR")) for bill in bills: total -= bill assert total == Money(-33, "EUR") # AssertionError: assert <Money: -17 EUR> == <Money: -33 EUR> ``` This is caused by `djmoney.money.Money` overriding `__rsub__`.
0.0
bb222ed619f72a0112aef8c0fd9a4823b1e6e388
[ "tests/test_money.py::test_sub_negative" ]
[ "tests/test_money.py::test_repr", "tests/test_money.py::test_html_safe", "tests/test_money.py::test_html_unsafe", "tests/test_money.py::test_default_mul", "tests/test_money.py::test_default_truediv", "tests/test_money.py::test_reverse_truediv_fails", "tests/test_money.py::test_get_current_locale[pl-PL_PL]", "tests/test_money.py::test_get_current_locale[pl_PL-pl_PL]", "tests/test_money.py::test_round", "tests/test_money.py::test_configurable_decimal_number", "tests/test_money.py::test_localize_decimal_places_default", "tests/test_money.py::test_localize_decimal_places_overwrite", "tests/test_money.py::test_localize_decimal_places_both", "tests/test_money.py::test_add_decimal_places", "tests/test_money.py::test_add_decimal_places_zero", "tests/test_money.py::test_mul_decimal_places", "tests/test_money.py::test_fix_decimal_places", "tests/test_money.py::test_fix_decimal_places_none", "tests/test_money.py::test_fix_decimal_places_multiple", "tests/test_money.py::test_decimal_places_display_overwrite" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files" ], "has_test_patch": true, "is_lite": false }
2021-01-10 12:54:57+00:00
bsd-3-clause
1,928
django-money__django-money-596
diff --git a/djmoney/money.py b/djmoney/money.py index b744c66..f109fdc 100644 --- a/djmoney/money.py +++ b/djmoney/money.py @@ -39,17 +39,27 @@ class Money(DefaultMoney): """ Set number of digits being displayed - `None` resets to `DECIMAL_PLACES_DISPLAY` setting """ self._decimal_places_display = value - def _fix_decimal_places(self, *args): - """ Make sure to user 'biggest' number of decimal places of all given money instances """ - candidates = (getattr(candidate, "decimal_places", 0) for candidate in args) - return max([self.decimal_places, *candidates]) + def _copy_attributes(self, source, target): + """Copy attributes to the new `Money` instance. + + This class stores extra bits of information about string formatting that the parent class doesn't have. + The problem is that the parent class creates new instances of `Money` without in some of its methods and + it does so without knowing about `django-money`-level attributes. + For this reason, when this class uses some methods of the parent class that have this behavior, the resulting + instances lose those attribute values. + + When it comes to what number of decimal places to choose, we take the maximum number. + """ + for attribute_name in ("decimal_places", "decimal_places_display"): + value = max([getattr(candidate, attribute_name, 0) for candidate in (self, source)]) + setattr(target, attribute_name, value) def __add__(self, other): if isinstance(other, F): return other.__radd__(self) other = maybe_convert(other, self.currency) result = super().__add__(other) - result.decimal_places = self._fix_decimal_places(other) + self._copy_attributes(other, result) return result def __sub__(self, other): @@ -57,14 +67,14 @@ class Money(DefaultMoney): return other.__rsub__(self) other = maybe_convert(other, self.currency) result = super().__sub__(other) - result.decimal_places = self._fix_decimal_places(other) + self._copy_attributes(other, result) return result def __mul__(self, other): if isinstance(other, F): return other.__rmul__(self) result = super().__mul__(other) - result.decimal_places = self._fix_decimal_places(other) + self._copy_attributes(other, result) return result def __truediv__(self, other): @@ -72,11 +82,11 @@ class Money(DefaultMoney): return other.__rtruediv__(self) result = super().__truediv__(other) if isinstance(result, self.__class__): - result.decimal_places = self._fix_decimal_places(other) + self._copy_attributes(other, result) return result def __rtruediv__(self, other): - # Backported from py-moneyd, non released bug-fix + # Backported from py-moneyed, non released bug-fix # https://github.com/py-moneyed/py-moneyed/blob/c518745dd9d7902781409daec1a05699799474dd/moneyed/classes.py#L217-L218 raise TypeError("Cannot divide non-Money by a Money instance.") @@ -100,7 +110,34 @@ class Money(DefaultMoney): def __round__(self, n=None): amount = round(self.amount, n) - return self.__class__(amount, self.currency) + new = self.__class__(amount, self.currency) + self._copy_attributes(self, new) + return new + + def round(self, ndigits=0): + new = super().round(ndigits) + self._copy_attributes(self, new) + return new + + def __pos__(self): + new = super().__pos__() + self._copy_attributes(self, new) + return new + + def __neg__(self): + new = super().__neg__() + self._copy_attributes(self, new) + return new + + def __abs__(self): + new = super().__abs__() + self._copy_attributes(self, new) + return new + + def __rmod__(self, other): + new = super().__rmod__(other) + self._copy_attributes(self, new) + return new # DefaultMoney sets those synonym functions # we overwrite the 'targets' so the wrong synonyms are called diff --git a/docs/changes.rst b/docs/changes.rst index 8c0b272..f526c12 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -16,6 +16,7 @@ Changelog - Pin ``pymoneyed<1.0`` as it changed the ``repr`` output of the ``Money`` class. - Subtracting ``Money`` from ``moneyed.Money``. Regression, introduced in ``1.2``. `#593`_ +- Missing the right ``Money.decimal_places`` and ``Money.decimal_places_display`` values after some arithmetic operations. `#595`_ `1.2.2`_ - 2020-12-29 --------------------- @@ -695,6 +696,7 @@ wrapping with ``money_manager``. .. _0.3: https://github.com/django-money/django-money/compare/0.2...0.3 .. _0.2: https://github.com/django-money/django-money/compare/0.2...a6d90348085332a393abb40b86b5dd9505489b04 +.. _#595: https://github.com/django-money/django-money/issues/595 .. _#593: https://github.com/django-money/django-money/issues/593 .. _#586: https://github.com/django-money/django-money/issues/586 .. _#585: https://github.com/django-money/django-money/pull/585
django-money/django-money
9ac8d8b1f7060437bfb1912c4182cb0b553c1519
diff --git a/tests/test_money.py b/tests/test_money.py index bb7ea79..e736854 100644 --- a/tests/test_money.py +++ b/tests/test_money.py @@ -80,31 +80,31 @@ def test_add_decimal_places_zero(): assert result.decimal_places == 3 -def test_mul_decimal_places(): - """ Test __mul__ and __rmul__ """ - two = Money("1.0000", "USD", decimal_places=4) - - result = 2 * two - assert result.decimal_places == 4 - - result = two * 2 - assert result.decimal_places == 4 - - -def test_fix_decimal_places(): - one = Money(1, "USD", decimal_places=7) - assert one._fix_decimal_places(Money(2, "USD", decimal_places=3)) == 7 - assert one._fix_decimal_places(Money(2, "USD", decimal_places=30)) == 30 - - -def test_fix_decimal_places_none(): - one = Money(1, "USD", decimal_places=7) - assert one._fix_decimal_places(None) == 7 - - -def test_fix_decimal_places_multiple(): - one = Money(1, "USD", decimal_places=7) - assert one._fix_decimal_places(None, Money(3, "USD", decimal_places=8)) == 8 [email protected]("decimal_places", (1, 4)) [email protected]( + "operation", + ( + lambda a, d: a * 2, + lambda a, d: 2 * a, + lambda a, d: a / 5, + lambda a, d: a - Money("2", "USD", decimal_places=d, decimal_places_display=d), + lambda a, d: Money("2", "USD", decimal_places=d, decimal_places_display=d) - a, + lambda a, d: a + Money("2", "USD", decimal_places=d, decimal_places_display=d), + lambda a, d: Money("2", "USD", decimal_places=d, decimal_places_display=d) + a, + lambda a, d: -a, + lambda a, d: +a, + lambda a, d: abs(a), + lambda a, d: 5 % a, + lambda a, d: round(a), + lambda a, d: a.round(), + ), +) +def test_keep_decimal_places(operation, decimal_places): + # Arithmetic operations should keep the `decimal_places` value + amount = Money("1.0000", "USD", decimal_places=decimal_places, decimal_places_display=decimal_places) + new = operation(amount, decimal_places) + assert new.decimal_places == decimal_places + assert new.decimal_places_display == decimal_places def test_decimal_places_display_overwrite():
`Money.decimal_places` are not always the same after arithmetic operations `djmoney.money.Money` uses some methods from `moneyed.Money`. In these methods (e.g. `__neg__`) new instances are created with only `amount` and `currency`. For this reason, our `django-money` specific attributes are not copied. Example: ```python amount = -Money(1, "USD", decimal_places=7) amount.decimal_places # 2 ```
0.0
9ac8d8b1f7060437bfb1912c4182cb0b553c1519
[ "tests/test_money.py::test_keep_decimal_places[<lambda>0-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>0-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>1-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>1-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>2-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>2-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>3-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>3-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>4-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>4-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>5-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>5-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>6-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>6-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>7-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>7-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>8-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>8-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>9-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>9-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>10-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>10-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>11-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>11-4]", "tests/test_money.py::test_keep_decimal_places[<lambda>12-1]", "tests/test_money.py::test_keep_decimal_places[<lambda>12-4]" ]
[ "tests/test_money.py::test_repr", "tests/test_money.py::test_html_safe", "tests/test_money.py::test_html_unsafe", "tests/test_money.py::test_default_mul", "tests/test_money.py::test_default_truediv", "tests/test_money.py::test_reverse_truediv_fails", "tests/test_money.py::test_get_current_locale[pl-PL_PL]", "tests/test_money.py::test_get_current_locale[pl_PL-pl_PL]", "tests/test_money.py::test_round", "tests/test_money.py::test_configurable_decimal_number", "tests/test_money.py::test_localize_decimal_places_default", "tests/test_money.py::test_localize_decimal_places_overwrite", "tests/test_money.py::test_localize_decimal_places_both", "tests/test_money.py::test_add_decimal_places", "tests/test_money.py::test_add_decimal_places_zero", "tests/test_money.py::test_decimal_places_display_overwrite", "tests/test_money.py::test_sub_negative" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2021-01-10 14:14:52+00:00
bsd-3-clause
1,929
django-money__django-money-604
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index 8b812be..e24af66 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -35,7 +35,7 @@ def get_value(obj, expr): else: expr = expr.value if isinstance(expr, OldMoney): - expr.__class__ = Money + expr = Money(expr.amount, expr.currency) return expr @@ -206,7 +206,7 @@ class MoneyField(models.DecimalField): elif isinstance(default, (float, Decimal, int)): default = Money(default, default_currency) elif isinstance(default, OldMoney): - default.__class__ = Money + default = Money(default.amount, default.currency) if default is not None and default is not NOT_PROVIDED and not isinstance(default, Money): raise ValueError("default value must be an instance of Money, is: %s" % default) return default diff --git a/docs/changes.rst b/docs/changes.rst index 1622376..49d3aa1 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -4,6 +4,10 @@ Changelog `Unreleased`_ - TBD ------------------- +**Fixed** + +- Do not mutate the input ``moneyed.Money`` class to ``djmoney.money.Money`` in ``MoneyField.default`` and F-expressions. `#603`_ (`moser`_) + `1.3`_ - 2021-01-10 ------------------- @@ -700,6 +704,7 @@ wrapping with ``money_manager``. .. _0.3: https://github.com/django-money/django-money/compare/0.2...0.3 .. _0.2: https://github.com/django-money/django-money/compare/0.2...a6d90348085332a393abb40b86b5dd9505489b04 +.. _#603: https://github.com/django-money/django-money/issues/603 .. _#595: https://github.com/django-money/django-money/issues/595 .. _#593: https://github.com/django-money/django-money/issues/593 .. _#586: https://github.com/django-money/django-money/issues/586 @@ -852,6 +857,7 @@ wrapping with ``money_manager``. .. _lobziik: https://github.com/lobziik .. _mattions: https://github.com/mattions .. _mithrilstar: https://github.com/mithrilstar +.. _moser: https://github.com/moser .. _MrFus10n: https://github.com/MrFus10n .. _msgre: https://github.com/msgre .. _mstarostik: https://github.com/mstarostik
django-money/django-money
8014bed7968665eb55cc298108fd1922667aec24
diff --git a/tests/test_models.py b/tests/test_models.py index d13ec03..3641356 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -83,6 +83,31 @@ class TestVanillaMoneyField: retrieved = model_class.objects.get(pk=instance.pk) assert retrieved.money == expected + def test_old_money_not_mutated_default(self): + # See GH-603 + money = OldMoney(1, "EUR") + + # When `moneyed.Money` is passed as a default value to a model + class Model(models.Model): + price = MoneyField(default=money, max_digits=10, decimal_places=2) + + class Meta: + abstract = True + + # Its class should remain the same + assert type(money) is OldMoney + + def test_old_money_not_mutated_f_object(self): + # See GH-603 + money = OldMoney(1, "EUR") + + instance = ModelWithVanillaMoneyField.objects.create(money=Money(5, "EUR"), integer=2) + # When `moneyed.Money` is a part of an F-expression + instance.money = F("money") + money + + # Its class should remain the same + assert type(money) is OldMoney + def test_old_money_defaults(self): instance = ModelWithDefaultAsOldMoney.objects.create() assert instance.money == Money(".01", "RUB")
djmoney alters existing objects We have an application that uses `moneyed` and (sub-classes of) its `Money` type in a non-Django environment. We recently started integrating this into a Django app that uses djmoney and started getting weird errors in seemingly unrelated cases because instances of `djmoney.money.Money` started showing up there. We tracked this down to a behavior of the djmoney package in `djmoney.models.fields`: https://github.com/django-money/django-money/blob/bb222ed619f72a0112aef8c0fd9a4823b1e6e388/djmoney/models/fields.py#L38 https://github.com/django-money/django-money/blob/bb222ed619f72a0112aef8c0fd9a4823b1e6e388/djmoney/models/fields.py#L209 The two places alter **the type of an existing object**. Can we change this to copying the objects before altering them?
0.0
8014bed7968665eb55cc298108fd1922667aec24
[ "tests/test_models.py::TestVanillaMoneyField::test_old_money_not_mutated_default", "tests/test_models.py::TestVanillaMoneyField::test_old_money_not_mutated_f_object" ]
[ "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs0-expected0]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs1-expected1]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs2-expected2]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs3-expected3]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs4-expected4]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs5-expected5]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs6-expected6]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs7-expected7]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsMoney-kwargs8-expected8]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsFloat-kwargs9-expected9]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsStringWithCurrency-kwargs10-expected10]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsString-kwargs11-expected11]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsInt-kwargs12-expected12]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsDecimal-kwargs13-expected13]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[CryptoModel-kwargs14-expected14]", "tests/test_models.py::TestVanillaMoneyField::test_old_money_defaults", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[ModelWithVanillaMoneyField-other_value0]", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[BaseModel-other_value1]", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[ModelWithDefaultAsMoney-other_value2]", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[ModelWithDefaultAsFloat-other_value3]", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[ModelWithDefaultAsFloat-other_value4]", "tests/test_models.py::TestVanillaMoneyField::test_invalid_values[value0]", "tests/test_models.py::TestVanillaMoneyField::test_invalid_values[value1]", "tests/test_models.py::TestVanillaMoneyField::test_invalid_values[value2]", "tests/test_models.py::TestVanillaMoneyField::test_save_new_value[money-Money0]", "tests/test_models.py::TestVanillaMoneyField::test_save_new_value[money-Money1]", "tests/test_models.py::TestVanillaMoneyField::test_save_new_value[second_money-Money0]", "tests/test_models.py::TestVanillaMoneyField::test_save_new_value[second_money-Money1]", "tests/test_models.py::TestVanillaMoneyField::test_rounding", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters0-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters1-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters2-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters3-0]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters4-3]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters5-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters6-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters7-3]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters8-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters9-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters10-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters0-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters1-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters2-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters3-0]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters4-3]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters5-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters6-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters7-3]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters8-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters9-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters10-2]", "tests/test_models.py::TestVanillaMoneyField::test_date_lookup", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-startswith-2-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-regex-^[134]-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-iregex-^[134]-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-istartswith-2-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-contains-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-lt-5-4]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-endswith-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-iendswith-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-gte-4-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-iexact-3-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-exact-3-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-isnull-True-0]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-range-rhs12-4]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-lte-2-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-gt-3-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-icontains-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-in-rhs16-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-startswith-2-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-regex-^[134]-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-iregex-^[134]-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-istartswith-2-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-contains-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-lt-5-4]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-endswith-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-iendswith-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-gte-4-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-iexact-3-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-exact-3-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-isnull-True-0]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-range-rhs12-4]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-lte-2-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-gt-3-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-icontains-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-in-rhs16-1]", "tests/test_models.py::TestVanillaMoneyField::test_exact_match", "tests/test_models.py::TestVanillaMoneyField::test_issue_300_regression", "tests/test_models.py::TestVanillaMoneyField::test_range_search", "tests/test_models.py::TestVanillaMoneyField::test_filter_chaining", "tests/test_models.py::TestVanillaMoneyField::test_currency_querying[ModelWithVanillaMoneyField]", "tests/test_models.py::TestVanillaMoneyField::test_currency_querying[ModelWithChoicesMoneyField]", "tests/test_models.py::TestVanillaMoneyField::test_in_lookup[Money0]", "tests/test_models.py::TestVanillaMoneyField::test_in_lookup[Money1]", "tests/test_models.py::TestVanillaMoneyField::test_in_lookup_f_expression[Money0]", "tests/test_models.py::TestVanillaMoneyField::test_in_lookup_f_expression[Money1]", "tests/test_models.py::TestVanillaMoneyField::test_isnull_lookup", "tests/test_models.py::TestVanillaMoneyField::test_null_default", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_currency[ModelWithVanillaMoneyField-money-kwargs0-PLN]", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_currency[ModelWithVanillaMoneyField-money-kwargs1-EUR]", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_currency[ModelWithVanillaMoneyField-money-kwargs2-EUR]", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_currency[ModelWithSharedCurrency-first-kwargs3-CZK]", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_defaults", "tests/test_models.py::TestGetOrCreate::test_defaults", "tests/test_models.py::TestGetOrCreate::test_currency_field_lookup", "tests/test_models.py::TestGetOrCreate::test_no_default_model[NullMoneyFieldModel-create_kwargs0-get_kwargs0]", "tests/test_models.py::TestGetOrCreate::test_no_default_model[ModelWithSharedCurrency-create_kwargs1-get_kwargs1]", "tests/test_models.py::TestGetOrCreate::test_shared_currency", "tests/test_models.py::TestNullableCurrency::test_create_nullable", "tests/test_models.py::TestNullableCurrency::test_create_default", "tests/test_models.py::TestNullableCurrency::test_fails_with_null_currency", "tests/test_models.py::TestNullableCurrency::test_fails_with_nullable_but_no_default", "tests/test_models.py::TestNullableCurrency::test_query_not_null", "tests/test_models.py::TestNullableCurrency::test_query_null", "tests/test_models.py::TestFExpressions::test_save[f_obj0-expected0]", "tests/test_models.py::TestFExpressions::test_save[f_obj1-expected1]", "tests/test_models.py::TestFExpressions::test_save[f_obj2-expected2]", "tests/test_models.py::TestFExpressions::test_save[f_obj3-expected3]", "tests/test_models.py::TestFExpressions::test_save[f_obj4-expected4]", "tests/test_models.py::TestFExpressions::test_save[f_obj5-expected5]", "tests/test_models.py::TestFExpressions::test_save[f_obj6-expected6]", "tests/test_models.py::TestFExpressions::test_save[f_obj7-expected7]", "tests/test_models.py::TestFExpressions::test_save[f_obj8-expected8]", "tests/test_models.py::TestFExpressions::test_save[f_obj9-expected9]", "tests/test_models.py::TestFExpressions::test_save[f_obj10-expected10]", "tests/test_models.py::TestFExpressions::test_save[f_obj11-expected11]", "tests/test_models.py::TestFExpressions::test_save[f_obj12-expected12]", "tests/test_models.py::TestFExpressions::test_save[f_obj13-expected13]", "tests/test_models.py::TestFExpressions::test_save[f_obj14-expected14]", "tests/test_models.py::TestFExpressions::test_save[f_obj15-expected15]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj0-expected0]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj1-expected1]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj2-expected2]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj3-expected3]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj4-expected4]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj5-expected5]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj6-expected6]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj7-expected7]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj8-expected8]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj9-expected9]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj10-expected10]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj11-expected11]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj12-expected12]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj13-expected13]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj14-expected14]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj15-expected15]", "tests/test_models.py::TestFExpressions::test_default_update", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs0-filter_value0-True]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs1-filter_value1-True]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs2-filter_value2-False]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs3-filter_value3-True]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs4-filter_value4-True]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs5-filter_value5-False]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs6-filter_value6-False]", "tests/test_models.py::TestFExpressions::test_update_fields_save", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj0]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj1]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj2]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj3]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj4]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj5]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj6]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj7]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj8]", "tests/test_models.py::TestExpressions::test_bulk_update", "tests/test_models.py::TestExpressions::test_conditional_update", "tests/test_models.py::TestExpressions::test_create_func", "tests/test_models.py::TestExpressions::test_value_create[None-None]", "tests/test_models.py::TestExpressions::test_value_create[10-expected1]", "tests/test_models.py::TestExpressions::test_value_create[value2-expected2]", "tests/test_models.py::TestExpressions::test_value_create_invalid", "tests/test_models.py::TestExpressions::test_expressions_for_non_money_fields", "tests/test_models.py::test_find_models_related_to_money_models", "tests/test_models.py::test_allow_expression_nodes_without_money", "tests/test_models.py::test_base_model", "tests/test_models.py::TestInheritance::test_model[InheritedModel]", "tests/test_models.py::TestInheritance::test_model[InheritorModel]", "tests/test_models.py::TestInheritance::test_fields[InheritedModel]", "tests/test_models.py::TestInheritance::test_fields[InheritorModel]", "tests/test_models.py::TestManager::test_manager", "tests/test_models.py::TestManager::test_objects_creation", "tests/test_models.py::TestProxyModel::test_instances", "tests/test_models.py::TestProxyModel::test_patching", "tests/test_models.py::TestDifferentCurrencies::test_add_default", "tests/test_models.py::TestDifferentCurrencies::test_sub_default", "tests/test_models.py::TestDifferentCurrencies::test_eq", "tests/test_models.py::TestDifferentCurrencies::test_ne", "tests/test_models.py::TestDifferentCurrencies::test_ne_currency", "tests/test_models.py::test_manager_instance_access[ModelWithNonMoneyField]", "tests/test_models.py::test_manager_instance_access[InheritorModel]", "tests/test_models.py::test_manager_instance_access[InheritedModel]", "tests/test_models.py::test_manager_instance_access[ProxyModel]", "tests/test_models.py::test_different_hashes", "tests/test_models.py::test_migration_serialization", "tests/test_models.py::test_clear_meta_cache[ModelWithVanillaMoneyField-objects]", "tests/test_models.py::test_clear_meta_cache[ModelWithCustomDefaultManager-custom]", "tests/test_models.py::TestFieldAttributes::test_missing_attributes", "tests/test_models.py::TestFieldAttributes::test_default_currency", "tests/test_models.py::TestCustomManager::test_method", "tests/test_models.py::test_package_is_importable", "tests/test_models.py::test_hash_uniqueness", "tests/test_models.py::test_override_decorator", "tests/test_models.py::TestSharedCurrency::test_attributes", "tests/test_models.py::TestSharedCurrency::test_filter_by_money_match[args0-kwargs0]", "tests/test_models.py::TestSharedCurrency::test_filter_by_money_match[args1-kwargs1]", "tests/test_models.py::TestSharedCurrency::test_filter_by_money_no_match[args0-kwargs0]", "tests/test_models.py::TestSharedCurrency::test_filter_by_money_no_match[args1-kwargs1]", "tests/test_models.py::TestSharedCurrency::test_f_query[args0-kwargs0]", "tests/test_models.py::TestSharedCurrency::test_f_query[args1-kwargs1]", "tests/test_models.py::TestSharedCurrency::test_in_lookup[args0-kwargs0]", "tests/test_models.py::TestSharedCurrency::test_in_lookup[args1-kwargs1]", "tests/test_models.py::TestSharedCurrency::test_create_with_money", "tests/test_models.py::test_order_by", "tests/test_models.py::test_distinct_through_wrapper", "tests/test_models.py::test_mixer_blend" ]
{ "failed_lite_validators": [ "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2021-02-02 14:03:40+00:00
bsd-3-clause
1,930
django-money__django-money-647
diff --git a/djmoney/models/fields.py b/djmoney/models/fields.py index 9b7195e..9d42575 100644 --- a/djmoney/models/fields.py +++ b/djmoney/models/fields.py @@ -298,8 +298,11 @@ class MoneyField(models.DecimalField): if self._has_default: kwargs["default"] = self.default.amount - if self.default_currency is not None and self.default_currency != DEFAULT_CURRENCY: - kwargs["default_currency"] = str(self.default_currency) + if self.default_currency != DEFAULT_CURRENCY: + if self.default_currency is not None: + kwargs["default_currency"] = str(self.default_currency) + else: + kwargs["default_currency"] = None if self.currency_choices != CURRENCY_CHOICES: kwargs["currency_choices"] = self.currency_choices if self.currency_field_name:
django-money/django-money
2040eff83fef2d4a1d882c016ab2b5e0853d2f84
diff --git a/tests/test_models.py b/tests/test_models.py index f573ed3..506fac4 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -787,3 +787,11 @@ def test_mixer_blend(): instance = mixer.blend(ModelWithTwoMoneyFields) assert isinstance(instance.amount1, Money) assert isinstance(instance.amount2, Money) + + +def test_deconstruct_includes_default_currency_as_none(): + instance = ModelWithNullableCurrency()._meta.get_field("money") + __, ___, args, kwargs = instance.deconstruct() + new = MoneyField(*args, **kwargs) + assert new.default_currency == instance.default_currency + assert new.default_currency is None
default_currency=None keeps detecting migration changes Based on the comment in the discussion found here: https://github.com/django-money/django-money/issues/530#issuecomment-650166087 If `MoneyField(..., default_currency=None)` is added to an already existing model, so that the field is triggering migration operations `AddField` or `AlterField`. Django keeps detecting changes on the field/model when running `python manage.py makemigrations`.
0.0
2040eff83fef2d4a1d882c016ab2b5e0853d2f84
[ "tests/test_models.py::test_deconstruct_includes_default_currency_as_none" ]
[ "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs0-expected0]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithVanillaMoneyField-kwargs1-expected1]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs2-expected2]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs3-expected3]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs4-expected4]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs5-expected5]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs6-expected6]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[BaseModel-kwargs7-expected7]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsMoney-kwargs8-expected8]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsFloat-kwargs9-expected9]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsStringWithCurrency-kwargs10-expected10]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsString-kwargs11-expected11]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsInt-kwargs12-expected12]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[ModelWithDefaultAsDecimal-kwargs13-expected13]", "tests/test_models.py::TestVanillaMoneyField::test_create_defaults[CryptoModel-kwargs14-expected14]", "tests/test_models.py::TestVanillaMoneyField::test_old_money_not_mutated_default", "tests/test_models.py::TestVanillaMoneyField::test_old_money_not_mutated_f_object", "tests/test_models.py::TestVanillaMoneyField::test_old_money_defaults", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[ModelWithVanillaMoneyField-other_value0]", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[BaseModel-other_value1]", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[ModelWithDefaultAsMoney-other_value2]", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[ModelWithDefaultAsFloat-other_value3]", "tests/test_models.py::TestVanillaMoneyField::test_revert_to_default[ModelWithDefaultAsFloat-other_value4]", "tests/test_models.py::TestVanillaMoneyField::test_invalid_values[value0]", "tests/test_models.py::TestVanillaMoneyField::test_invalid_values[value1]", "tests/test_models.py::TestVanillaMoneyField::test_invalid_values[value2]", "tests/test_models.py::TestVanillaMoneyField::test_save_new_value[money-Money0]", "tests/test_models.py::TestVanillaMoneyField::test_save_new_value[money-Money1]", "tests/test_models.py::TestVanillaMoneyField::test_save_new_value[second_money-Money0]", "tests/test_models.py::TestVanillaMoneyField::test_save_new_value[second_money-Money1]", "tests/test_models.py::TestVanillaMoneyField::test_rounding", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters0-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters1-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters2-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters3-0]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters4-3]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters5-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters6-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters7-3]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters8-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters9-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money0-filters10-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters0-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters1-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters2-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters3-0]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters4-3]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters5-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters6-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters7-3]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters8-2]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters9-1]", "tests/test_models.py::TestVanillaMoneyField::test_comparison_lookup[Money1-filters10-2]", "tests/test_models.py::TestVanillaMoneyField::test_date_lookup", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-startswith-2-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-regex-^[134]-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-iregex-^[134]-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-istartswith-2-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-contains-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-lt-5-4]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-endswith-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-iendswith-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-gte-4-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-iexact-3-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-exact-3-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-isnull-True-0]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-range-rhs12-4]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-lte-2-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-gt-3-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-icontains-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money0-in-rhs16-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-startswith-2-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-regex-^[134]-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-iregex-^[134]-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-istartswith-2-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-contains-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-lt-5-4]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-endswith-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-iendswith-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-gte-4-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-iexact-3-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-exact-3-1]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-isnull-True-0]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-range-rhs12-4]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-lte-2-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-gt-3-3]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-icontains-5-2]", "tests/test_models.py::TestVanillaMoneyField::test_all_lookups[Money1-in-rhs16-1]", "tests/test_models.py::TestVanillaMoneyField::test_exact_match", "tests/test_models.py::TestVanillaMoneyField::test_issue_300_regression", "tests/test_models.py::TestVanillaMoneyField::test_range_search", "tests/test_models.py::TestVanillaMoneyField::test_filter_chaining", "tests/test_models.py::TestVanillaMoneyField::test_currency_querying[ModelWithVanillaMoneyField]", "tests/test_models.py::TestVanillaMoneyField::test_currency_querying[ModelWithChoicesMoneyField]", "tests/test_models.py::TestVanillaMoneyField::test_in_lookup[Money0]", "tests/test_models.py::TestVanillaMoneyField::test_in_lookup[Money1]", "tests/test_models.py::TestVanillaMoneyField::test_in_lookup_f_expression[Money0]", "tests/test_models.py::TestVanillaMoneyField::test_in_lookup_f_expression[Money1]", "tests/test_models.py::TestVanillaMoneyField::test_isnull_lookup", "tests/test_models.py::TestVanillaMoneyField::test_null_default", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_currency[ModelWithVanillaMoneyField-money-kwargs0-PLN]", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_currency[ModelWithVanillaMoneyField-money-kwargs1-EUR]", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_currency[ModelWithVanillaMoneyField-money-kwargs2-EUR]", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_currency[ModelWithSharedCurrency-first-kwargs3-CZK]", "tests/test_models.py::TestGetOrCreate::test_get_or_create_respects_defaults", "tests/test_models.py::TestGetOrCreate::test_defaults", "tests/test_models.py::TestGetOrCreate::test_currency_field_lookup", "tests/test_models.py::TestGetOrCreate::test_no_default_model[NullMoneyFieldModel-create_kwargs0-get_kwargs0]", "tests/test_models.py::TestGetOrCreate::test_no_default_model[ModelWithSharedCurrency-create_kwargs1-get_kwargs1]", "tests/test_models.py::TestGetOrCreate::test_shared_currency", "tests/test_models.py::TestNullableCurrency::test_create_nullable", "tests/test_models.py::TestNullableCurrency::test_create_default", "tests/test_models.py::TestNullableCurrency::test_fails_with_null_currency", "tests/test_models.py::TestNullableCurrency::test_fails_with_nullable_but_no_default", "tests/test_models.py::TestNullableCurrency::test_query_not_null", "tests/test_models.py::TestNullableCurrency::test_query_null", "tests/test_models.py::TestFExpressions::test_save[f_obj0-expected0]", "tests/test_models.py::TestFExpressions::test_save[f_obj1-expected1]", "tests/test_models.py::TestFExpressions::test_save[f_obj2-expected2]", "tests/test_models.py::TestFExpressions::test_save[f_obj3-expected3]", "tests/test_models.py::TestFExpressions::test_save[f_obj4-expected4]", "tests/test_models.py::TestFExpressions::test_save[f_obj5-expected5]", "tests/test_models.py::TestFExpressions::test_save[f_obj6-expected6]", "tests/test_models.py::TestFExpressions::test_save[f_obj7-expected7]", "tests/test_models.py::TestFExpressions::test_save[f_obj8-expected8]", "tests/test_models.py::TestFExpressions::test_save[f_obj9-expected9]", "tests/test_models.py::TestFExpressions::test_save[f_obj10-expected10]", "tests/test_models.py::TestFExpressions::test_save[f_obj11-expected11]", "tests/test_models.py::TestFExpressions::test_save[f_obj12-expected12]", "tests/test_models.py::TestFExpressions::test_save[f_obj13-expected13]", "tests/test_models.py::TestFExpressions::test_save[f_obj14-expected14]", "tests/test_models.py::TestFExpressions::test_save[f_obj15-expected15]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj0-expected0]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj1-expected1]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj2-expected2]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj3-expected3]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj4-expected4]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj5-expected5]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj6-expected6]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj7-expected7]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj8-expected8]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj9-expected9]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj10-expected10]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj11-expected11]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj12-expected12]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj13-expected13]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj14-expected14]", "tests/test_models.py::TestFExpressions::test_f_update[f_obj15-expected15]", "tests/test_models.py::TestFExpressions::test_default_update", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs0-filter_value0-True]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs1-filter_value1-True]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs2-filter_value2-False]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs3-filter_value3-True]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs4-filter_value4-True]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs5-filter_value5-False]", "tests/test_models.py::TestFExpressions::test_filtration[create_kwargs6-filter_value6-False]", "tests/test_models.py::TestFExpressions::test_update_fields_save", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj0]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj1]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj2]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj3]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj4]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj5]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj6]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj7]", "tests/test_models.py::TestFExpressions::test_invalid_expressions_access[f_obj8]", "tests/test_models.py::TestExpressions::test_bulk_update", "tests/test_models.py::TestExpressions::test_conditional_update", "tests/test_models.py::TestExpressions::test_create_func", "tests/test_models.py::TestExpressions::test_value_create[None-None]", "tests/test_models.py::TestExpressions::test_value_create[10-expected1]", "tests/test_models.py::TestExpressions::test_value_create[value2-expected2]", "tests/test_models.py::TestExpressions::test_value_create_invalid", "tests/test_models.py::TestExpressions::test_expressions_for_non_money_fields", "tests/test_models.py::test_find_models_related_to_money_models", "tests/test_models.py::test_allow_expression_nodes_without_money", "tests/test_models.py::test_base_model", "tests/test_models.py::TestInheritance::test_model[InheritedModel]", "tests/test_models.py::TestInheritance::test_model[InheritorModel]", "tests/test_models.py::TestInheritance::test_fields[InheritedModel]", "tests/test_models.py::TestInheritance::test_fields[InheritorModel]", "tests/test_models.py::TestManager::test_manager", "tests/test_models.py::TestManager::test_objects_creation", "tests/test_models.py::TestProxyModel::test_instances", "tests/test_models.py::TestProxyModel::test_patching", "tests/test_models.py::TestDifferentCurrencies::test_add_default", "tests/test_models.py::TestDifferentCurrencies::test_sub_default", "tests/test_models.py::TestDifferentCurrencies::test_eq", "tests/test_models.py::TestDifferentCurrencies::test_ne", "tests/test_models.py::TestDifferentCurrencies::test_ne_currency", "tests/test_models.py::test_manager_instance_access[ModelWithNonMoneyField]", "tests/test_models.py::test_manager_instance_access[InheritorModel]", "tests/test_models.py::test_manager_instance_access[InheritedModel]", "tests/test_models.py::test_manager_instance_access[ProxyModel]", "tests/test_models.py::test_different_hashes", "tests/test_models.py::test_migration_serialization", "tests/test_models.py::test_clear_meta_cache[ModelWithVanillaMoneyField-objects]", "tests/test_models.py::test_clear_meta_cache[ModelWithCustomDefaultManager-custom]", "tests/test_models.py::TestFieldAttributes::test_missing_attributes", "tests/test_models.py::TestFieldAttributes::test_default_currency", "tests/test_models.py::TestCustomManager::test_method", "tests/test_models.py::test_package_is_importable", "tests/test_models.py::test_hash_uniqueness", "tests/test_models.py::test_override_decorator", "tests/test_models.py::TestSharedCurrency::test_attributes", "tests/test_models.py::TestSharedCurrency::test_filter_by_money_match[args0-kwargs0]", "tests/test_models.py::TestSharedCurrency::test_filter_by_money_match[args1-kwargs1]", "tests/test_models.py::TestSharedCurrency::test_filter_by_money_no_match[args0-kwargs0]", "tests/test_models.py::TestSharedCurrency::test_filter_by_money_no_match[args1-kwargs1]", "tests/test_models.py::TestSharedCurrency::test_f_query[args0-kwargs0]", "tests/test_models.py::TestSharedCurrency::test_f_query[args1-kwargs1]", "tests/test_models.py::TestSharedCurrency::test_in_lookup[args0-kwargs0]", "tests/test_models.py::TestSharedCurrency::test_in_lookup[args1-kwargs1]", "tests/test_models.py::TestSharedCurrency::test_create_with_money", "tests/test_models.py::test_order_by", "tests/test_models.py::test_distinct_through_wrapper", "tests/test_models.py::test_mixer_blend" ]
{ "failed_lite_validators": [], "has_test_patch": true, "is_lite": true }
2021-12-27 14:25:56+00:00
bsd-3-clause
1,931
django-money__django-money-689
diff --git a/djmoney/contrib/exchange/models.py b/djmoney/contrib/exchange/models.py index 4d97846..7963967 100644 --- a/djmoney/contrib/exchange/models.py +++ b/djmoney/contrib/exchange/models.py @@ -40,6 +40,8 @@ def get_rate(source, target, backend=None): Converts exchange rate on the DB side if there is no backends with given base currency. Uses data from the default backend if the backend is not specified. """ + if str(source) == str(target): + return 1 if backend is None: backend = get_default_backend_name() key = f"djmoney:get_rate:{source}:{target}:{backend}" @@ -53,8 +55,6 @@ def get_rate(source, target, backend=None): def _get_rate(source, target, backend): source, target = str(source), str(target) - if str(source) == target: - return 1 rates = Rate.objects.filter(currency__in=(source, target), backend=backend).select_related("backend") if not rates: raise MissingRate(f"Rate {source} -> {target} does not exist")
django-money/django-money
94f279562b252a0ce631d3929534a68f83e93711
diff --git a/tests/contrib/exchange/test_model.py b/tests/contrib/exchange/test_model.py index 4bd6b75..4d37c78 100644 --- a/tests/contrib/exchange/test_model.py +++ b/tests/contrib/exchange/test_model.py @@ -64,8 +64,10 @@ def test_string_representation(backend): def test_cache(): with patch("djmoney.contrib.exchange.models._get_rate", wraps=_get_rate) as original: assert get_rate("USD", "USD") == 1 + assert original.call_count == 0 + assert get_rate("USD", "EUR") == 2 assert original.call_count == 1 - assert get_rate("USD", "USD") == 1 + assert get_rate("USD", "EUR") == 2 assert original.call_count == 1 diff --git a/tests/contrib/test_django_rest_framework.py b/tests/contrib/test_django_rest_framework.py index 4a7e4a2..5372a91 100644 --- a/tests/contrib/test_django_rest_framework.py +++ b/tests/contrib/test_django_rest_framework.py @@ -106,7 +106,7 @@ class TestMoneyField: def test_serializer_with_fields(self): serializer = self.get_serializer(ModelWithVanillaMoneyField, data={"money": "10.00"}, fields_=("money",)) - serializer.is_valid(True) + serializer.is_valid(raise_exception=True) assert serializer.data == {"money": "10.00"} @pytest.mark.parametrize(
calling get_rate with identical source and target currency should be a noop - it is always exactly 1 - that doesn't even have to hit the cache ;)
0.0
94f279562b252a0ce631d3929534a68f83e93711
[ "tests/contrib/exchange/test_model.py::test_cache" ]
[ "tests/contrib/exchange/test_model.py::test_unknown_currency_with_partially_exiting_currencies[NOK-ZAR]", "tests/contrib/exchange/test_model.py::test_unknown_currency_with_partially_exiting_currencies[USD-ZAR]", "tests/contrib/exchange/test_model.py::test_get_rate[EUR-USD-expected2-1]", "tests/contrib/exchange/test_model.py::test_bad_configuration", "tests/contrib/exchange/test_model.py::test_rates_via_base[SEK-NOK-expected1]", "tests/contrib/exchange/test_model.py::test_unknown_currency[SEK-ZWL]", "tests/contrib/exchange/test_model.py::test_rates_via_base[NOK-SEK-expected0]", "tests/contrib/exchange/test_model.py::test_without_installed_exchange", "tests/contrib/exchange/test_model.py::test_get_rate[source3-USD-1-0]", "tests/contrib/exchange/test_model.py::test_get_rate[USD-USD-1-0]", "tests/contrib/exchange/test_model.py::test_unknown_currency_with_partially_exiting_currencies[ZAR-USD]", "tests/contrib/exchange/test_model.py::test_get_rate[USD-target4-1-0]", "tests/contrib/exchange/test_model.py::test_get_rate[USD-EUR-2-1]", "tests/contrib/exchange/test_model.py::test_string_representation", "tests/contrib/exchange/test_model.py::test_unknown_currency_with_partially_exiting_currencies[ZAR-NOK]", "tests/contrib/exchange/test_model.py::test_unknown_currency[USD-EUR]" ]
{ "failed_lite_validators": [ "has_short_problem_statement" ], "has_test_patch": true, "is_lite": false }
2022-09-27 10:03:46+00:00
bsd-3-clause
1,932
django-treebeard__django-treebeard-186
diff --git a/CHANGES b/CHANGES index 4b8acb7..ef16948 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,13 @@ +Release 4.4 (Oct 26, 2020) +---------------------------- + +* Implement a non-destructive path-fixing algorithm for ``MP_Node.fix_tree``. +* Ensure ``post_save`` is triggered *after* the parent node is updated in ``MP_AddChildHandler``. +* Fix static URL generation to use ``static`` template tag instead of constructing the URL manually. +* Declare support for Django 2.2, 3.0 and 3.1. +* Drop support for Django 2.1 and lower. +* Drop support for Python 2.7 and Python 3.5. + Release 4.3.1 (Dec 25, 2019) ---------------------------- @@ -221,7 +231,7 @@ New features added - script to build documentation - updated numconv.py - + Bugs fixed ~~~~~~~~~~ @@ -230,7 +240,7 @@ Bugs fixed Solves bug in postgres when the table isn't created by syncdb. * Removing unused method NS_Node._find_next_node - + * Fixed MP_Node.get_tree to include the given parent when given a leaf node diff --git a/README.rst b/README.rst index 8e31be6..688ea51 100644 --- a/README.rst +++ b/README.rst @@ -16,6 +16,9 @@ Status .. image:: https://travis-ci.org/django-treebeard/django-treebeard.svg?branch=master :target: https://travis-ci.org/django-treebeard/django-treebeard +.. image:: https://ci.appveyor.com/api/projects/status/mwbf062v68lhw05c?svg=true + :target: https://ci.appveyor.com/project/mvantellingen/django-treebeard + .. image:: https://img.shields.io/pypi/v/django-treebeard.svg :target: https://pypi.org/project/django-treebeard/ diff --git a/appveyor.yml b/appveyor.yml index 5ee9a8f..807ce95 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,7 +1,25 @@ -# Do a dummy build so that AppVeyor doesn't fail -# while we're waiting for it to be disconnected altogether +services: + - mssql2016 -branches: - only: [] +environment: + matrix: + - TOXENV: py36-dj22-mssql + - TOXENV: py37-dj22-mssql + - TOXENV: py38-dj22-mssql + - TOXENV: py36-dj30-mssql + - TOXENV: py37-dj30-mssql + - TOXENV: py38-dj30-mssql + - TOXENV: py36-dj31-mssql + - TOXENV: py37-dj31-mssql + - TOXENV: py38-dj31-mssql -build: false # i.e. do nut run msbuild +matrix: + fast_finish: true + +install: + - C:\Python36\python -m pip install tox + +build: false # Not a C# project + +test_script: + - C:\Python36\scripts\tox diff --git a/tox.ini b/tox.ini index d909363..2105bd3 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,7 @@ [tox] envlist = - py{36,37,38}-dj{22,30,31}-{sqlite,postgres,mysql} + py{36,37,38}-dj{22,30,31}-{sqlite,postgres,mysql,mssql} [testenv:docs] basepython = python @@ -25,9 +25,11 @@ deps = dj31: Django>=3.1,<3.2 postgres: psycopg2>=2.6 mysql: mysqlclient>=1.3.9 + mssql: django-mssql-backend>=2.8.1 setenv = sqlite: DATABASE_ENGINE=sqlite postgres: DATABASE_ENGINE=psql mysql: DATABASE_ENGINE=mysql + mssql: DATABASE_ENGINE=mssql commands = pytest diff --git a/treebeard/__init__.py b/treebeard/__init__.py index 00d37f5..80f4727 100644 --- a/treebeard/__init__.py +++ b/treebeard/__init__.py @@ -10,10 +10,13 @@ Release logic: 5. git push 6. assure that all tests pass on https://travis-ci.org/django-treebeard/django-treebeard/builds/ 7. git push --tags - 8. python setup.py sdist upload - 9. bump the version, append ".dev0" to __version__ -10. git add treebeard/__init__.py -11. git commit -m 'Start with <version>' -12. git push + 8. pip install --upgrade pip wheel twine + 9. python setup.py clean --all + 9. python setup.py sdist bdist_wheel +10. twine upload dist/* +11. bump the version, append ".dev0" to __version__ +12. git add treebeard/__init__.py +13. git commit -m 'Start with <version>' +14. git push """ -__version__ = '4.3.1' +__version__ = '4.4.0' diff --git a/treebeard/forms.py b/treebeard/forms.py index 4f9ef11..547c6d9 100644 --- a/treebeard/forms.py +++ b/treebeard/forms.py @@ -178,11 +178,8 @@ class MoveNodeForm(forms.ModelForm): def add_subtree(cls, for_node, node, options): """ Recursively build options tree. """ if cls.is_loop_safe(for_node, node): - options.append( - (node.pk, - mark_safe(cls.mk_indent(node.get_depth()) + escape(node)))) - for subnode in node.get_children(): - cls.add_subtree(for_node, subnode, options) + for item, _ in node.get_annotated_list(node): + options.append((item.pk, mark_safe(cls.mk_indent(item.get_depth()) + escape(item)))) @classmethod def mk_dropdown_tree(cls, model, for_node=None):
django-treebeard/django-treebeard
c3abc0c812da30a9ab5b2a8bcf976c860a44ee95
diff --git a/treebeard/tests/settings.py b/treebeard/tests/settings.py index c8a2745..47cc1c8 100644 --- a/treebeard/tests/settings.py +++ b/treebeard/tests/settings.py @@ -36,6 +36,19 @@ def get_db_conf(): 'HOST': '127.0.0.1', 'PORT': '', } + elif database_engine == "mssql": + return { + 'ENGINE': 'sql_server.pyodbc', + 'NAME': 'master', + 'USER': 'sa', + 'PASSWORD': 'Password12!', + 'HOST': '(local)\\SQL2016', + 'PORT': '', + 'OPTIONS': { + 'driver': 'SQL Server Native Client 11.0', + 'MARS_Connection': 'True', + }, + } DATABASES = {'default': get_db_conf()} SECRET_KEY = '7r33b34rd' diff --git a/treebeard/tests/test_treebeard.py b/treebeard/tests/test_treebeard.py index 03e7619..c68963d 100644 --- a/treebeard/tests/test_treebeard.py +++ b/treebeard/tests/test_treebeard.py @@ -2164,8 +2164,8 @@ class TestMoveNodeForm(TestNonEmptyTree): def test_form_leaf_node(self, model): nodes = list(model.get_tree()) - node = nodes.pop() safe_parent_nodes = self._get_node_ids_and_depths(nodes) + node = nodes.pop() self._move_node_helper(node, safe_parent_nodes) def test_form_admin(self, model): @@ -2725,3 +2725,16 @@ class TestTreeAdmin(TestNonEmptyTree): ('4', 1, 1), ('41', 2, 0)] assert self.got(model) == expected + + +class TestMPFormPerformance(TestCase): + @classmethod + def setup_class(cls): + cls.model = models.MP_TestNode + cls.model.load_bulk(BASE_DATA) + + def test_form_add_subtree_no_of_queries(self): + form_class = movenodeform_factory(self.model) + form = form_class() + with self.assertNumQueries(len(self.model.get_root_nodes()) + 1): + form.mk_dropdown_tree(self.model)
Publish releases as wheels? I see on PyPI that the package’s releases only contain source distribution, for example for the latest [4.3.1](https://pypi.org/project/django-treebeard/4.3.1/#files). Would it be possible to additionally publish wheels? The project is already set up for universal wheels since #130, and will switch to Python3-only wheels once #153 is merged – so I think this should just be a matter of adding `bdist_wheel` to the release process as described here: https://github.com/django-treebeard/django-treebeard/blob/3a8062cf4584336cc63551f332e9926e1af207ed/treebeard/__init__.py#L14 More general info on wheels: https://pythonwheels.com/. For me I’m particularly interested in speeding up installations.
0.0
c3abc0c812da30a9ab5b2a8bcf976c860a44ee95
[ "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_leaf_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_leaf_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_leaf_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_leaf_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_leaf_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_leaf_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMPFormPerformance::test_form_add_subtree_no_of_queries" ]
[ "treebeard/tests/test_treebeard.py::TestEmptyTree::test_load_bulk_empty[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_load_bulk_empty[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_load_bulk_empty[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_load_bulk_empty[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_load_bulk_empty[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_load_bulk_empty[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_dump_bulk_empty[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_dump_bulk_empty[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_dump_bulk_empty[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_dump_bulk_empty[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_dump_bulk_empty[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_dump_bulk_empty[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_add_root_empty[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_add_root_empty[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_add_root_empty[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_add_root_empty[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_add_root_empty[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_add_root_empty[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_root_nodes_empty[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_root_nodes_empty[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_root_nodes_empty[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_root_nodes_empty[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_root_nodes_empty[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_root_nodes_empty[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_first_root_node_empty[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_first_root_node_empty[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_first_root_node_empty[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_first_root_node_empty[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_first_root_node_empty[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_first_root_node_empty[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_last_root_node_empty[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_last_root_node_empty[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_last_root_node_empty[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_last_root_node_empty[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_last_root_node_empty[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_last_root_node_empty[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_tree[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_tree[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_tree[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_tree[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_tree[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_tree[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_annotated_list[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_annotated_list[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_annotated_list[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_annotated_list[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_annotated_list[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestEmptyTree::test_get_annotated_list[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_bulk_existing[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_bulk_existing[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_bulk_existing[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_bulk_existing[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_bulk_existing[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_bulk_existing[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_all[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_all[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_all[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_all[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_all[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_all[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_all[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_all[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_all[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_all[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_all[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_all[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_leaf[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_leaf[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_leaf[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_leaf[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_leaf[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_tree_leaf[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_all[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_all[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_all[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_all[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_all[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_all[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_leaf[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_leaf[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_leaf[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_leaf[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_leaf[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_annotated_list_leaf[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_dump_bulk_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_keeping_ids[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_keeping_ids[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_keeping_ids[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_keeping_ids[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_keeping_ids[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_keeping_ids[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_with_fk[AL_TestNodeRelated]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_with_fk[MP_TestNodeRelated]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_load_and_dump_bulk_with_fk[NS_TestNodeRelated]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_root_nodes[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_root_nodes[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_root_nodes[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_root_nodes[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_root_nodes[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_root_nodes[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_first_root_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_first_root_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_first_root_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_first_root_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_first_root_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_first_root_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_last_root_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_last_root_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_last_root_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_last_root_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_last_root_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_get_last_root_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_passed_instance[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_passed_instance[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_passed_instance[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_passed_instance[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_passed_instance[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_passed_instance[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_already_saved_instance[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_already_saved_instance[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_already_saved_instance[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_already_saved_instance[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_already_saved_instance[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestClassMethods::test_add_root_with_already_saved_instance[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_leaf[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_leaf[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_leaf[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_leaf[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_leaf[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_leaf[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_parent[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_parent[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_parent[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_parent[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_parent[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_parent[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children_count[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children_count[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children_count[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children_count[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children_count[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_children_count[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_siblings[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_siblings[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_siblings[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_siblings[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_siblings[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_siblings[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_prev_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_prev_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_prev_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_prev_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_prev_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_prev_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_next_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_next_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_next_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_next_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_next_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_next_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_child[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_child[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_child[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_child[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_child[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_first_child[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_child[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_child[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_child[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_child[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_child[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_last_child[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_ancestors[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_ancestors[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_ancestors[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_ancestors[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_ancestors[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_ancestors[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendants[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendants[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendants[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendants[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendants[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendants[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendant_count[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendant_count[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendant_count[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendant_count[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendant_count[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_get_descendant_count[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_sibling_of[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_sibling_of[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_sibling_of[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_sibling_of[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_sibling_of[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_sibling_of[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_child_of[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_child_of[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_child_of[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_child_of[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_child_of[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_child_of[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_descendant_of[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_descendant_of[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_descendant_of[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_descendant_of[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_descendant_of[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSimpleNodeMethods::test_is_descendant_of[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_leaf[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_leaf[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_leaf[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_leaf[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_leaf[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_leaf[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_to_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_passed_instance[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_passed_instance[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_passed_instance[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_passed_instance[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_passed_instance[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_passed_instance[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_already_saved_instance[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_already_saved_instance[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_already_saved_instance[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_already_saved_instance[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_already_saved_instance[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_with_already_saved_instance[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_post_save[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_post_save[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_post_save[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_post_save[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_post_save[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddChild::test_add_child_post_save[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_invalid_pos[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_invalid_pos[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_invalid_pos[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_invalid_pos[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_invalid_pos[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_invalid_pos[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_missing_nodeorderby[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_missing_nodeorderby[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_missing_nodeorderby[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_missing_nodeorderby[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_missing_nodeorderby[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_missing_nodeorderby[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_last[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_first[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_left_noleft[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_right_noright[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_with_passed_instance[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_with_passed_instance[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_with_passed_instance[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_with_passed_instance[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_with_passed_instance[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_with_passed_instance[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_already_saved_instance[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_already_saved_instance[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_already_saved_instance[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_already_saved_instance[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_already_saved_instance[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAddSibling::test_add_sibling_already_saved_instance[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_leaf[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_leaf[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_leaf[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_leaf[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_leaf[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_leaf[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_root_nodes[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_root_nodes[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_root_nodes[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_root_nodes[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_root_nodes[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_root_nodes[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_children[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_children[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_children[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_children[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_children[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_filter_children[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_nonexistant_nodes[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_nonexistant_nodes[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_nonexistant_nodes[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_nonexistant_nodes[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_nonexistant_nodes[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_nonexistant_nodes[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_same_node_twice[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_same_node_twice[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_same_node_twice[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_same_node_twice[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_same_node_twice[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_same_node_twice[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_root_nodes[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_root_nodes[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_root_nodes[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_root_nodes[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_root_nodes[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_root_nodes[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_nodes[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_nodes[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_nodes[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_nodes[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_nodes[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestDelete::test_delete_all_nodes[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_invalid_pos[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_invalid_pos[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_invalid_pos[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_invalid_pos[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_invalid_pos[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_invalid_pos[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_to_descendant[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_to_descendant[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_to_descendant[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_to_descendant[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_to_descendant[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_to_descendant[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_missing_nodeorderby[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_missing_nodeorderby[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_missing_nodeorderby[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_missing_nodeorderby[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_missing_nodeorderby[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveErrors::test_move_missing_nodeorderby[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveSortedErrors::test_nonsorted_move_in_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestMoveSortedErrors::test_nonsorted_move_in_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestMoveSortedErrors::test_nonsorted_move_in_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_left_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_left_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_left_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_left_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_left_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_left_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_right_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_right_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_right_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_right_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_right_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_right_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_child_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_child_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_child_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_child_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_child_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_last_child_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_child_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_child_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_child_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_child_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_child_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeafRoot::test_move_leaf_first_child_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_right_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_right_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_right_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_right_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_right_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_right_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling_itself[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling_itself[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling_itself[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling_itself[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling_itself[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_left_sibling_itself[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_child[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_child[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_child[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_child[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_child[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_last_child[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_child[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_child[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_child[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_child[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_child[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveLeaf::test_move_leaf_first_child[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_noleft_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_noleft_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_noleft_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_noleft_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_noleft_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_left_noleft_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_noright_sibling_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_noright_sibling_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_noright_sibling_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_noright_sibling_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_noright_sibling_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_right_noright_sibling_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_child_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_child_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_child_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_child_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_child_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_first_child_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_child_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_child_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_child_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_child_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_child_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranchRoot::test_move_branch_last_child_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_noleft_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_noleft_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_noleft_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_noleft_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_noleft_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_noleft_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_noright_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_noright_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_noright_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_noright_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_noright_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_right_noright_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_itself_sibling[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_itself_sibling[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_itself_sibling[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_itself_sibling[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_itself_sibling[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_left_itself_sibling[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_child[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_child[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_child[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_child[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_child[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_first_child[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_child[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_child[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_child[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_child[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_child[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveBranch::test_move_branch_last_child[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_root_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_root_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_root_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_child_root_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_child_root_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_child_root_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_child_nonroot_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_child_nonroot_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_add_child_nonroot_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_move_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_move_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_move_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_move_sortedsibling[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_move_sortedsibling[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestTreeSorted::test_move_sortedsibling[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_tree_all[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_tree_all[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_tree_all[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_tree_node[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_tree_node[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_tree_node[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_root_nodes[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_root_nodes[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_root_nodes[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_root_node[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_root_node[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_root_node[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_root_node[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_root_node[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_root_node[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_is_root[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_is_root[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_is_root[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_is_leaf[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_is_leaf[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_is_leaf[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_root[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_root[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_root[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_parent[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_parent[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_parent[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_children[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_children[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_children[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_children_count[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_children_count[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_children_count[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_siblings[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_siblings[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_siblings[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_sibling[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_sibling[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_sibling[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_prev_sibling[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_prev_sibling[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_prev_sibling[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_next_sibling[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_next_sibling[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_next_sibling[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_sibling[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_sibling[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_sibling[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_child[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_child[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_first_child[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_child[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_child[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_last_child[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_ancestors[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_ancestors[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_ancestors[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_descendants[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_descendants[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_descendants[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_descendant_count[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_descendant_count[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_get_descendant_count[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_cascading_deletion[AL_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_cascading_deletion[MP_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestInheritedModels::test_cascading_deletion[NS_TestNodeInherited]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_root[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_root[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_root[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_root[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_root[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_root[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestHelpers::test_descendants_group_count_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMP_TreeSortedAutoNow::test_sorted_by_autonow_workaround[MP_TestNodeSortedAutoNow]", "treebeard/tests/test_treebeard.py::TestMP_TreeSortedAutoNow::test_sorted_by_autonow_FAIL[MP_TestNodeSortedAutoNow]", "treebeard/tests/test_treebeard.py::TestMP_TreeStepOverflow::test_add_root[MP_TestNodeSmallStep]", "treebeard/tests/test_treebeard.py::TestMP_TreeStepOverflow::test_add_child[MP_TestNodeSmallStep]", "treebeard/tests/test_treebeard.py::TestMP_TreeStepOverflow::test_add_sibling[MP_TestNodeSmallStep]", "treebeard/tests/test_treebeard.py::TestMP_TreeStepOverflow::test_move[MP_TestNodeSmallStep]", "treebeard/tests/test_treebeard.py::TestMP_TreeShortPath::test_short_path[MP_TestNodeShortPath]", "treebeard/tests/test_treebeard.py::TestMP_TreeFindProblems::test_find_problems[MP_TestNodeAlphabet]", "treebeard/tests/test_treebeard.py::TestMP_TreeFix::test_fix_tree_non_destructive[MP_TestNodeShortPath]", "treebeard/tests/test_treebeard.py::TestMP_TreeFix::test_fix_tree_non_destructive[MP_TestSortedNodeShortPath]", "treebeard/tests/test_treebeard.py::TestMP_TreeFix::test_fix_tree_destructive[MP_TestNodeShortPath]", "treebeard/tests/test_treebeard.py::TestMP_TreeFix::test_fix_tree_destructive[MP_TestSortedNodeShortPath]", "treebeard/tests/test_treebeard.py::TestMP_TreeFix::test_fix_tree_with_fix_paths[MP_TestNodeShortPath]", "treebeard/tests/test_treebeard.py::TestMP_TreeFix::test_fix_tree_with_fix_paths[MP_TestSortedNodeShortPath]", "treebeard/tests/test_treebeard.py::TestIssues::test_many_to_many_django_user_anonymous[MP_TestManyToManyWithUser]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_root_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_root_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_root_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_root_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_root_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_root_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_admin[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_admin[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_admin[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_admin[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_admin[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestMoveNodeForm::test_form_admin[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestModelAdmin::test_default_fields[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestModelAdmin::test_default_fields[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestModelAdmin::test_default_fields[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestModelAdmin::test_default_fields[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestModelAdmin::test_default_fields[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestModelAdmin::test_default_fields[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_root_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_root_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_root_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_child_root_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_child_root_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_child_root_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_child_nonroot_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_child_nonroot_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_add_child_nonroot_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_move_sorted[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_move_sorted[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_move_sorted[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_move_sortedsibling[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_move_sortedsibling[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_move_sortedsibling[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_sorted_form[AL_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_sorted_form[MP_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestSortedForm::test_sorted_form[NS_TestNodeSorted]", "treebeard/tests/test_treebeard.py::TestForm::test_form[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_form[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_form[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_form[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_form[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_form[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_move_node_form[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_move_node_form[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_move_node_form[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_move_node_form[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_move_node_form[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_move_node_form[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_get_position_ref_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_get_position_ref_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_get_position_ref_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_get_position_ref_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_get_position_ref_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_get_position_ref_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_clean_cleaned_data[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_clean_cleaned_data[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_clean_cleaned_data[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_clean_cleaned_data[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_clean_cleaned_data[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_clean_cleaned_data[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_save_edit[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_save_edit[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_save_edit[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_save_edit[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_save_edit[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_save_edit[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_save_new[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_save_new[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_save_new[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestForm::test_save_new[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_save_new[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestForm::test_save_new[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestAdminTreeTemplateTags::test_treebeard_css", "treebeard/tests/test_treebeard.py::TestAdminTreeTemplateTags::test_treebeard_js", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_changelist_view", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_get_node[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_get_node[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_get_node[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_get_node[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_get_node[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_get_node[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_keyerror[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_keyerror[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_keyerror[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_keyerror[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_keyerror[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_keyerror[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_valueerror[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_valueerror[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_valueerror[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_valueerror[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_valueerror[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_node_validate_valueerror[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_missing_nodeorderby[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_missing_nodeorderby[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_missing_nodeorderby[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_missing_nodeorderby[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_missing_nodeorderby[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_missing_nodeorderby[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_invalid_pos[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_invalid_pos[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_invalid_pos[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_invalid_pos[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_invalid_pos[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_invalid_pos[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_to_descendant[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_to_descendant[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_to_descendant[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_to_descendant[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_to_descendant[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_validate_to_descendant[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_left[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_left[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_left[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_left[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_left[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_left[NS_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_last_child[AL_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_last_child[MP_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_last_child[NS_TestNode]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_last_child[AL_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_last_child[MP_TestNode_Proxy]", "treebeard/tests/test_treebeard.py::TestTreeAdmin::test_move_last_child[NS_TestNode_Proxy]" ]
{ "failed_lite_validators": [ "has_hyperlinks", "has_many_modified_files", "has_many_hunks" ], "has_test_patch": true, "is_lite": false }
2020-10-26 06:31:31+00:00
apache-2.0
1,933
django__asgiref-183
diff --git a/asgiref/wsgi.py b/asgiref/wsgi.py index 7155ab2..8811118 100644 --- a/asgiref/wsgi.py +++ b/asgiref/wsgi.py @@ -55,8 +55,8 @@ class WsgiToAsgiInstance: """ environ = { "REQUEST_METHOD": scope["method"], - "SCRIPT_NAME": scope.get("root_path", ""), - "PATH_INFO": scope["path"], + "SCRIPT_NAME": scope.get("root_path", "").encode("utf8").decode("latin1"), + "PATH_INFO": scope["path"].encode("utf8").decode("latin1"), "QUERY_STRING": scope["query_string"].decode("ascii"), "SERVER_PROTOCOL": "HTTP/%s" % scope["http_version"], "wsgi.version": (1, 0),
django/asgiref
3020b4a309033ad0b7041dda7712b0ed729e338f
diff --git a/tests/test_wsgi.py b/tests/test_wsgi.py index 647f465..3490573 100644 --- a/tests/test_wsgi.py +++ b/tests/test_wsgi.py @@ -50,6 +50,48 @@ async def test_basic_wsgi(): assert (await instance.receive_output(1)) == {"type": "http.response.body"} [email protected] +async def test_wsgi_path_encoding(): + """ + Makes sure the WSGI wrapper has basic functionality. + """ + # Define WSGI app + def wsgi_application(environ, start_response): + assert environ["SCRIPT_NAME"] == "/中国".encode("utf8").decode("latin-1") + assert environ["PATH_INFO"] == "/中文".encode("utf8").decode("latin-1") + start_response("200 OK", []) + yield b"" + + # Wrap it + application = WsgiToAsgi(wsgi_application) + # Launch it as a test application + instance = ApplicationCommunicator( + application, + { + "type": "http", + "http_version": "1.0", + "method": "GET", + "path": "/中文", + "root_path": "/中国", + "query_string": b"bar=baz", + "headers": [], + }, + ) + await instance.send_input({"type": "http.request"}) + # Check they send stuff + assert (await instance.receive_output(1)) == { + "type": "http.response.start", + "status": 200, + "headers": [], + } + assert (await instance.receive_output(1)) == { + "type": "http.response.body", + "body": b"", + "more_body": True, + } + assert (await instance.receive_output(1)) == {"type": "http.response.body"} + + @pytest.mark.asyncio async def test_wsgi_empty_body(): """
WSGI Error in non-ascii path https://github.com/encode/starlette/issues/997 I noticed that the ASGI document clearly states that utf8 encoding is required, but WSGI seems to require latin-1 encoding. https://www.python.org/dev/peps/pep-3333/#a-note-on-string-types https://asgi.readthedocs.io/en/latest/specs/www.html#connection-scope
0.0
3020b4a309033ad0b7041dda7712b0ed729e338f
[ "tests/test_wsgi.py::test_wsgi_path_encoding" ]
[ "tests/test_wsgi.py::test_basic_wsgi", "tests/test_wsgi.py::test_wsgi_empty_body", "tests/test_wsgi.py::test_wsgi_multi_body" ]
{ "failed_lite_validators": [ "has_short_problem_statement", "has_hyperlinks" ], "has_test_patch": true, "is_lite": false }
2020-07-14 02:53:15+00:00
bsd-3-clause
1,934