-
Notifications
You must be signed in to change notification settings - Fork 2
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
6ae7137
commit 79cffee
Showing
2 changed files
with
31 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,29 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
High-level tests for the all __repr__ functions | ||
""" | ||
import os | ||
import sys | ||
import unittest | ||
import tempfile | ||
import shutil | ||
import stat | ||
import machinestate | ||
from locale import getpreferredencoding | ||
|
||
ENCODING = getpreferredencoding() | ||
|
||
def test_repr_sub(cls, level): | ||
for inst in cls._instances: | ||
print("{}{}".format(level*'\t',inst)) | ||
if len(inst._instances) > 0: | ||
test_repr_sub(inst, level+1) | ||
|
||
class TestRepr(unittest.TestCase): | ||
def test_repr(self): | ||
ms = machinestate.MachineState(extended=True) | ||
ms.generate() | ||
print("") | ||
print(ms) | ||
test_repr_sub(ms, 1) | ||
|