-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
03e050c
commit 9fe8fd0
Showing
11 changed files
with
54 additions
and
432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
nose==1.3.0 | ||
rednose==0.4.1 | ||
six |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import six | ||
|
||
if six.PY3: | ||
def compat_repr(object_repr): | ||
return object_repr | ||
else: | ||
def compat_repr(object_repr): | ||
# compat_repr is designed to return all reprs with leading 'u's | ||
# inserted to make all strings look like unicode strings. | ||
# This makes testing between py2 and py3 much easier. | ||
result = '' | ||
in_quote = False | ||
curr_quote = None | ||
for char in object_repr: | ||
if char in ['"', "'"] and ( | ||
not curr_quote or char == curr_quote): | ||
if in_quote: | ||
# Closing quote | ||
curr_quote = None | ||
in_quote = False | ||
else: | ||
# Opening quote | ||
curr_quote = char | ||
result += 'u' | ||
in_quote = True | ||
result += char | ||
return result | ||
|
||
text_type_name = six.text_type().__class__.__name__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.