Skip to content

Commit 321fd5b

Browse files
author
Andy Landy
committed
fix tests
1 parent bfd3cc2 commit 321fd5b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<a href="https://github.com/andy-landy/traceback_with_variables/tree/master/traceback_with_variables/override.py#L9"><img title="type hints everywhere" alt="Annotations coverage" src="https://img.shields.io/badge/type--hints-100%25-blueviolet.svg"></a>
1616
<a href="https://github.com/andy-landy/traceback_with_variables/tree/master/traceback_with_variables/override.py#L8"><img title="no obscure objects, only transparent functions and data classes" alt="No-OOP" src="https://img.shields.io/badge/no OOP-100%25-blueviolet.svg"></a>
1717
<a href="https://github.com/andy-landy/traceback_with_variables/tree/master/setup.py"><img alt="Dependencies" src="https://img.shields.io/badge/dependencies-0-blueviolet.svg"></a>
18+
<a href="https://github.com/andy-landy/traceback_with_variables/tree/master/tests/dumps"><img alt="Tests" src="https://img.shields.io/badge/tests-9328-blueviolet.svg"></a>
1819
<a href="https://colab.research.google.com/github/andy-landy/traceback_with_variables/blob/master/examples/colab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
19-
<a href="https://gitter.im/andy-landy/traceback-with-variables"><img alt="Gitter" src="https://img.shields.io/gitter/room/andy-landy/traceback-with-variables?color=blueviolet"></a>
2020
<!--
2121
<a href="https://pypi.org/project/traceback-with-variables"><img alt="pip Downloads" src="https://static.pepy.tech/personalized-badge/traceback-with-variables?period=total&units=none&left_color=grey&right_color=orange&left_text=pip downloads"></a>
2222
<a href="https://anaconda.org/conda-forge/traceback-with-variables/"><img alt="conda-forge Downloads" src="https://img.shields.io/conda/dn/conda-forge/traceback-with-variables?color=orange&label=conda%20downloads"></a>

README.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
<a href="{{ lib_code_url }}/override.py#L9"><img title="type hints everywhere" alt="Annotations coverage" src="https://img.shields.io/badge/type--hints-100%25-blueviolet.svg"></a>
1616
<a href="{{ lib_code_url }}/override.py#L8"><img title="no obscure objects, only transparent functions and data classes" alt="No-OOP" src="https://img.shields.io/badge/no OOP-100%25-blueviolet.svg"></a>
1717
<a href="{{ code_url }}/setup.py"><img alt="Dependencies" src="https://img.shields.io/badge/dependencies-0-blueviolet.svg"></a>
18+
<a href="{{ code_url }}/tests/dumps"><img alt="Tests" src="https://img.shields.io/badge/tests-9328-blueviolet.svg"></a>
1819
<a href="https://colab.research.google.com/github/{{ user_repo_name }}/blob/master/examples/colab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
19-
<a href="{{ gitter_url }}"><img alt="Gitter" src="https://img.shields.io/gitter/room/{{ user_name }}/{{ package_name }}?color=blueviolet"></a>
2020
<!--
2121
<a href="{{ pypi_url }}"><img alt="pip Downloads" src="https://static.pepy.tech/personalized-badge/{{ package_name }}?period=total&units=none&left_color=grey&right_color=orange&left_text=pip downloads"></a>
2222
<a href="https://anaconda.org/conda-forge/{{ package_name }}/"><img alt="conda-forge Downloads" src="https://img.shields.io/conda/dn/conda-forge/{{ package_name }}?color=orange&label=conda%20downloads"></a>

tests/test_utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def strip_tb_text(text: str) -> str:
6060
#text = re.sub(r'\n[^\n]*\^\^\^[^\n]*\n', '\n', text)
6161
# File "/usr/local/lib/python3.8/dist-packages/_pytest/_code/code.py", line 810, in repr_traceback_entry
6262

63-
text = re.sub(r'/[\w/.-]+(/[\w.-]+\.py[^\w/-])', fr'{OFTO}\1', text) # machine-dependent paths
6463
#text = re.sub(r'([^\w/.-])/[\w/.-]+(/[\w.-]+[^\w/.-])', fr'\1{OFTO}\2', text)
6564
#text = re.sub(r'/[\w/.-]+(/[\w.-]+\.py[^\w/-])', fr'{OFTO}\1', text)
6665

@@ -70,7 +69,9 @@ def strip_tb_text(text: str) -> str:
7069
text = re.sub(r'( at 0x)\w+', fr'\1{OFTO}', text) # object ids
7170
#text = re.sub(r'(__builtins__[^{]*{)[^\n]*', fr'\1{OFTO}', text)
7271
#text = re.sub(r'(<ipython-input-)\d+-\w+(>)', fr'{OFTO}', text)
73-
text = re.sub(r'(<ipython-input-)[^>]+(>)', fr'\1{OFTO}\2', text)
72+
text = re.sub(r'<ipython-input-[^>]+>', OFTO, text) # jupyter cells on some versions
73+
text = re.sub(r'(")[\w/.-]+/[\d]+.py(")', fr'{OFTO}\1', text) # jupyter cells on some versions
74+
text = re.sub(r'/[\w/.-]+(/[\w.-]+\.py[^\w/-])', fr'{OFTO}\1', text) # machine-dependent paths
7475
text = re.sub('\n[^\n]+function open[^\n]+\n', '\n', text) # Jupyter versions?
7576
#text = re.sub('\n[^\n]+_pytest[^\n]+\n', '\n', text)
7677
#text = re.sub(', required=True', '', text)

0 commit comments

Comments
 (0)