-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#328 added tests for example command line
* fixed: date not defined when not required causes failure
- Loading branch information
IanGrimstead
authored and
IanGrimstead
committed
Sep 24, 2019
1 parent
4db6fb8
commit 635d689
Showing
5 changed files
with
42 additions
and
7 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
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,30 @@ | ||
import os | ||
import unittest | ||
|
||
import pytest | ||
|
||
import pygrams | ||
|
||
|
||
@pytest.mark.skipif('TRAVIS' not in os.environ, reason="Only execute with Travis due to speed") | ||
class TestReadme(unittest.TestCase): | ||
""" | ||
Batch of tests to execute same commands as mentioned in the README.md, to ensure they work without crashing | ||
""" | ||
|
||
def test_no_arguments_and_use_cache(self): | ||
# clear cached result | ||
import shutil | ||
shutil.rmtree(os.path.join('cached', 'out-mdf-0.05'), ignore_errors=True) | ||
|
||
# should make cache | ||
pygrams.main([]) | ||
|
||
# load cache | ||
pygrams.main(['-uc', 'out-mdf-0.05']) | ||
|
||
def test_10000_patents(self): | ||
pygrams.main(['-ds', 'USPTO-random-10000.pkl.bz2']) | ||
|
||
def test_mn_mx(self): | ||
pygrams.main(['-mn', '1', '-mx', '3']) |