This repository has been archived by the owner on May 9, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split alt tests out, to be run manually
- Loading branch information
Will McCutchen
committed
Feb 22, 2013
1 parent
12d1d2b
commit fc75b81
Showing
4 changed files
with
50 additions
and
16 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Tests the twitter-text-py library for conformance | ||
# https://github.com/dryan/twitter-text-py | ||
|
||
import sys | ||
from test_twitter_regex import pytest_generate_tests | ||
|
||
|
||
try: | ||
import twitter_text | ||
except ImportError, e: | ||
print >> sys.stderr, 'Unable to load alt implemenatation: %s' % e | ||
print >> sys.stderr, 'Please run `git submodule update --init`' | ||
sys.exit(1) | ||
|
||
|
||
def test_twitter_text_py(description, text, expected): | ||
results = twitter_text.extractor.Extractor(text).extract_urls() | ||
assert expected == results |
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,18 @@ | ||
# Test the twitter-text-python library for conformance | ||
# https://github.com/BonsaiDen/twitter-text-python | ||
|
||
import sys | ||
from test_twitter_regex import pytest_generate_tests | ||
|
||
|
||
try: | ||
import ttp | ||
except ImportError, e: | ||
print >> sys.stderr, 'Unable to load alt implemenatation: %s' % e | ||
print >> sys.stderr, 'Please run `git submodule update --init`' | ||
sys.exit(1) | ||
|
||
|
||
def test_twitter_text_py(description, text, expected): | ||
result = ttp.Parser().parse(text) | ||
assert expected == result.urls |
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