Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.1.0: Tests fail to run: SyntaxError: invalid escape sequence #111

Open
yurivict opened this issue Apr 21, 2024 · 1 comment
Open

6.1.0: Tests fail to run: SyntaxError: invalid escape sequence #111

yurivict opened this issue Apr 21, 2024 · 1 comment
Assignees
Labels
Dependencies Used by Dependabot. Question Further information is requested Unit Tests

Comments

@yurivict
Copy link

========================================================================================== ERRORS ===========================================================================================
___________________________________________________________________ ERROR collecting tests/performance/Graph/NetworkX.py ____________________________________________________________________
/usr/local/lib/python3.9/site-packages/_pytest/python.py:617: in _importtestmodule
    mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
/usr/local/lib/python3.9/site-packages/_pytest/pathlib.py:567: in import_path
    importlib.import_module(module_name)
/usr/local/lib/python3.9/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1030: in _gcd_import
    ???
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
performance/Graph/NetworkX.py:34: in <module>
    import networkx.exception
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
/usr/local/lib/python3.9/site-packages/networkx/__init__.py:42: in <module>
    from networkx import algorithms
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
/usr/local/lib/python3.9/site-packages/networkx/algorithms/__init__.py:37: in <module>
    from networkx.algorithms.operators import *
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
    exec(co, module.__dict__)
/usr/local/lib/python3.9/site-packages/networkx/algorithms/operators/__init__.py:3: in <module>
    from networkx.algorithms.operators.product import *
<frozen importlib._bootstrap>:1007: in _find_and_load
    ???
<frozen importlib._bootstrap>:986: in _find_and_load_unlocked
    ???
<frozen importlib._bootstrap>:680: in _load_unlocked
    ???
/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:177: in exec_module
    source_stat, co = _rewrite_test(fn, self.config)
/usr/local/lib/python3.9/site-packages/_pytest/assertion/rewrite.py:359: in _rewrite_test
    tree = ast.parse(source, filename=strfn)
/usr/local/lib/python3.9/ast.py:50: in parse
    return compile(source, filename, mode, flags,
E     File "/usr/local/lib/python3.9/site-packages/networkx/algorithms/operators/product.py", line 347
E       """Returns the specified power of a graph.
E       ^
E   SyntaxError: invalid escape sequence \
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 1 error in 24.71s =====================================================================================
@yurivict yurivict changed the title 6.1.0: Tests fail: SyntaxError: invalid escape sequence 6.1.0: Tests fail to run: SyntaxError: invalid escape sequence Apr 21, 2024
@Paebbels
Copy link
Member

The problem is within networkx, but not in pyTooling.


In case your installer script want's to check the installation, you shouldn't run performance (tests/performance) and benchmark (tests/benchmark) tests. Just run normal unit tests tests/unit.

For performance testing, additional requirements are installed and then performance of pyTooling can be compared to competing libraries.

@Paebbels Paebbels self-assigned this Apr 22, 2024
@Paebbels Paebbels added Question Further information is requested Dependencies Used by Dependabot. Unit Tests labels Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Used by Dependabot. Question Further information is requested Unit Tests
Projects
None yet
Development

No branches or pull requests

2 participants