Skip to content

Minor error in "Testing Filesystems" documentation #407

Closed
@mjpieters

Description

@mjpieters

The Implementing Filesystems -> Testing Filesystems section has a minor error in the example:

from fs.test import FSTestCases

class TestMyFS(FSTestCases):

    def make_fs(self):
        # Return an instance of your FS object here
        return MyFS()

FSTestCases is a plain class without anything more than object as a base class, yet it's methods expect unittest.TestCase to be a base, so the above won't work. It's missing an additional base class:

import unittest 
from fs.test import FSTestCases

class TestMyFS(FSTestCases, unittest.TestCase):

    def make_fs(self):
        # Return an instance of your FS object here
        return MyFS()

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsIssues related to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions