def test_collect_testtextfile(self, testdir):
    w = testdir.maketxtfile(whatever='')
    checkfile = testdir.maketxtfile(test_something='\n            alskdjalsdk\n            >>> i = 5\n            >>> i-1\n            4\n        ')
    for x in (testdir.tmpdir, checkfile):
        (items, reprec) = testdir.inline_genitems(x)
        assert (len(items) == 1)
        assert isinstance(items[0], DoctestItem)
        assert isinstance(items[0].parent, DoctestTextfile)
    (items, reprec) = testdir.inline_genitems(w)
    assert (len(items) == 0)
def test_collect_testtextfile(self, testdir):
    w = testdir.maketxtfile(whatever=)
    checkfile = testdir.maketxtfile(test_something='\n            alskdjalsdk\n            >>> i = 5\n            >>> i-1\n            4\n        ')
    for x in (testdir.tmpdir, checkfile):
        (items, reprec) = testdir.inline_genitems(x)
        assert (len(items) == 1)
        assert isinstance(items[0], DoctestItem)
        assert isinstance(items[0].parent, DoctestTextfile)
    (items, reprec) = testdir.inline_genitems(w)
    assert (len(items) == 0)