Skip to content

Commit 5842069

Browse files
tirkarthigeorgebisbas
authored andcommitted
Fix warnings in Python 3.8
* Fix deprecation warning due to invalid escape sequences. * Fix syntax warning due to comparison of literals using is.
1 parent bf6095a commit 5842069

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

nbval/nbdime_reporter.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
nbdime.log.set_nbdime_log_level('ERROR')
2727

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

3030

3131
class NbdimeReporter:

tests/test_unit_tests_in_notebooks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_print(filename, correctoutcome):
6666
if correctoutcome == 'pass':
6767
if exitcode != 0:
6868
raise AssertionError("Tests failed on ipynb (expected pass)")
69-
assert exitcode is 0
69+
assert exitcode == 0
7070
print("The call of py.test has not reported errors - this is good.")
7171
elif correctoutcome == 'fail':
7272
if exitcode == 0:

0 commit comments

Comments
 (0)