-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a basic test file for yaml.load and yaml.dump
- Loading branch information
1 parent
360b3da
commit 1c1c55a
Showing
3 changed files
with
22 additions
and
1 deletion.
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,19 @@ | ||
import yaml | ||
|
||
def test_dump(verbose=False): | ||
assert yaml.dump(['foo']) | ||
test_dump.unittest = True | ||
|
||
def test_load(verbose=False): | ||
assert yaml.load("- foo\n") | ||
test_load.unittest = True | ||
|
||
def test_load_safeloader(verbose=False): | ||
assert yaml.load("- foo\n", Loader=yaml.SafeLoader) | ||
test_load_safeloader.unittest = True | ||
|
||
if __name__ == '__main__': | ||
import sys, test_load | ||
sys.modules['test_load'] = sys.modules['__main__'] | ||
import test_appliance | ||
test_appliance.run(globals()) |
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,4 +1,5 @@ | ||
|
||
from test_dump_load import * | ||
from test_mark import * | ||
from test_reader import * | ||
from test_canonical import * | ||
|