-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
2 changed files
with
72 additions
and
0 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,63 @@ | ||
#!/usr/bin/env bats | ||
|
||
|
||
setup() { | ||
:<<DOC | ||
Installs emoji package | ||
DOC | ||
python setup.py install | ||
} | ||
|
||
|
||
teardown() { | ||
:<<DOC | ||
Removes emoji package | ||
DOC | ||
rm -rf ${PACKAGE_NAME}.egg-info dist build | ||
pip uninstall -y ${PACKAGE_NAME} | ||
} | ||
|
||
|
||
@test "package name" { | ||
:<<DOC | ||
Test package name | ||
DOC | ||
pip list | grep ${PACKAGE_NAME} | ||
[ "$?" -eq 0 ] | ||
} | ||
|
||
|
||
@test "package version" { | ||
:<<DOC | ||
Test package version | ||
DOC | ||
pip list | grep ${PACKAGE_VERSION} | ||
[ "$?" -eq 0 ] | ||
} | ||
|
||
|
||
@test "pytest help message" { | ||
:<<DOC | ||
Test pytest help message | ||
DOC | ||
pytest --help | grep "Adds emoji to pytest results" | ||
[ "$?" -eq 0 ] | ||
} | ||
|
||
|
||
@test "pytest long flag" { | ||
:<<DOC | ||
Test pytest long flag | ||
DOC | ||
pytest --help | grep "emoji-out" | ||
[ "$?" -eq 0 ] | ||
} | ||
|
||
|
||
@test "pytest short flag" { | ||
:<<DOC | ||
Test pytest short flag | ||
DOC | ||
pytest --help | grep "eo" | ||
[ "$?" -eq 0 ] | ||
} |