2626import os
2727import shutil
2828import tempfile
29- import unittest
3029
3130
3231###############################################################################
@@ -283,9 +282,9 @@ class LogsDirectory(Directory):
283282 self .checkOutput ("""
284283 <class 'node.ext.fs.directory.Directory'>: ...
285284 __<class 'node.ext.fs.file.File'>: foo
286- __<class 'node.ext.fs.tests...AudioFile'>: foo.mp3
287- __<class 'node.ext.fs.tests...TextFile'>: foo.txt
288- __<class 'node.ext.fs.tests...LogsDirectory'>: logs
285+ __<class 'node.ext.fs.tests.test_fs. ..AudioFile'>: foo.mp3
286+ __<class 'node.ext.fs.tests.test_fs. ..TextFile'>: foo.txt
287+ __<class 'node.ext.fs.tests.test_fs. ..LogsDirectory'>: logs
289288 __<class 'node.ext.fs.directory.Directory'>: other
290289 """ , dir .treerepr (prefix = '_' ))
291290
@@ -725,10 +724,10 @@ def test_node_index(self):
725724 name = os .path .join (self .tempdir , 'root' )
726725 )
727726 self .checkOutput ("""\
728- <class 'node.ext.fs.tests.ReferencingDirectory'>: ...root
729- <class 'node.ext.fs.tests.ReferencingFile'>: file.txt
730- <class 'node.ext.fs.tests.ReferencingDirectory'>: subdir
731- <class 'node.ext.fs.tests.ReferencingFile'>: subfile.txt
727+ <class 'node.ext.fs.tests.test_fs. ReferencingDirectory'>: ...root
728+ <class 'node.ext.fs.tests.test_fs. ReferencingFile'>: file.txt
729+ <class 'node.ext.fs.tests.test_fs. ReferencingDirectory'>: subdir
730+ <class 'node.ext.fs.tests.test_fs. ReferencingFile'>: subfile.txt
732731 """ , directory .treerepr ())
733732
734733 self .assertEqual (len (directory ._index ), 4 )
@@ -742,8 +741,8 @@ def test_node_index(self):
742741 name = os .path .join (self .tempdir , 'root' )
743742 )
744743 self .checkOutput ("""\
745- <class 'node.ext.fs.tests.ReferencingDirectory'>: ...root
746- <class 'node.ext.fs.tests.ReferencingFile'>: file.txt
744+ <class 'node.ext.fs.tests.test_fs. ReferencingDirectory'>: ...root
745+ <class 'node.ext.fs.tests.test_fs. ReferencingFile'>: file.txt
747746 """ , directory .treerepr ())
748747
749748 self .assertEqual (len (directory ._index ), 2 )
@@ -754,14 +753,3 @@ def test_interfaces(self):
754753
755754 file = File ()
756755 self .assertTrue (IFile .providedBy (file ))
757-
758-
759- if __name__ == '__main__' :
760- from node .ext .fs import tests
761- import sys
762-
763- suite = unittest .TestSuite ()
764- suite .addTest (unittest .findTestCases (tests ))
765- runner = unittest .TextTestRunner (failfast = True )
766- result = runner .run (suite )
767- sys .exit (not result .wasSuccessful ())
0 commit comments