Skip to content

Conversation

@kotfu
Copy link
Member

@kotfu kotfu commented Jan 7, 2018

In python 3.7, the behavior of re.escape() changed. Rework the test cases in test_transcript.py to ensure they run properly on both 3.4-3.6 as well as 3.7.

This closes #244

@kotfu kotfu requested a review from tleonhardt as a code owner January 7, 2018 04:10
@codecov
Copy link

codecov bot commented Jan 7, 2018

Codecov Report

Merging #245 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #245   +/-   ##
=======================================
  Coverage   96.39%   96.39%           
=======================================
  Files           1        1           
  Lines        1221     1221           
=======================================
  Hits         1177     1177           
  Misses         44       44
Impacted Files Coverage Δ
cmd2.py 96.39% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f97663...e8481e1. Read the comment docs.

.cache
*.pyc
.coverage
.tox
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, that should have always been there ;-)


def _transform_transcript_expected(self, s):
"""parse the string with slashed regexes into a valid regex"""
"""parse the string with slashed regexes into a valid regex
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice description

( 'use 2/3 cup', 'use\ 2\/3\ cup' ),
( '/tmp is nice', '\/tmp\ is\ nice'),
( 'slash at end/', 'slash\ at\ end\/'),
# strings with zero or one slash or with escaped slashes means no regular
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@tleonhardt tleonhardt merged commit 2a474dc into master Jan 7, 2018
@tleonhardt tleonhardt deleted the issue244 branch January 7, 2018 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unit test failures in Python 3.7.0a3

3 participants