Skip to content

Commit

Permalink
Fix warnings in Python 3.8
Browse files Browse the repository at this point in the history
* Fix deprecation warning due to invalid escape sequences.
* Fix syntax warning due to comparison of literals using is.
  • Loading branch information
tirkarthi authored and georgebisbas committed Jul 28, 2022
1 parent bf6095a commit 5842069
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nbval/nbdime_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

nbdime.log.set_nbdime_log_level('ERROR')

_re_nbval_nodeid = re.compile('.*\.ipynb::Cell \d+')
_re_nbval_nodeid = re.compile(r'.*\.ipynb::Cell \d+')


class NbdimeReporter:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_unit_tests_in_notebooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def test_print(filename, correctoutcome):
if correctoutcome == 'pass':
if exitcode != 0:
raise AssertionError("Tests failed on ipynb (expected pass)")
assert exitcode is 0
assert exitcode == 0
print("The call of py.test has not reported errors - this is good.")
elif correctoutcome == 'fail':
if exitcode == 0:
Expand Down

0 comments on commit 5842069

Please sign in to comment.