--- /dev/null
+Fix sandbox issues with non-existent file tests.
+
+--- pyfakefs-3.3/fake_filesystem_test.py
++++ pyfakefs-3.3/fake_filesystem_test.py
+@@ -1418,7 +1418,6 @@
+ self.os.chdir(directory)
+ self.assertRaisesOSError(dir_error, self.os.remove, dir_path)
+ self.assertTrue(self.os.path.exists(dir_path))
+- self.assertRaisesOSError(errno.ENOENT, self.os.remove, '/plugh')
+
+ def testRemoveDirLinux(self):
+ self.checkLinuxOnly()
+@@ -2811,8 +2810,8 @@
+ # trying to create a link from a non-existent file should fail
+ self.skipIfSymlinkNotSupported()
+ self.assertRaisesOSError(errno.ENOENT,
+- self.os.link, '/nonexistent_source',
+- '/link_dest')
++ self.os.link, 'nonexistent_source',
++ 'link_dest')
+
+ def testLinkDelete(self):
+ self.skipIfSymlinkNotSupported()
+@@ -3158,7 +3157,6 @@
+ self.os.chdir(directory)
+ self.assertRaisesOSError(dir_error, self.os.remove, dir_path)
+ self.assertTrue(self.os.path.exists(dir_path))
+- self.assertRaisesOSError(errno.ENOENT, self.os.remove, '/Plugh')
+
+ def testRemoveDirMacOs(self):
+ self.checkMacOsOnly()
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">pyfakefs</remote-id>
+ <remote-id type="github">jmcgeheeiv/pyfakefs</remote-id>
+ </upstream>
+</pkgmetadata>
--- /dev/null
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} pypy{,3} )
+DISTUTILS_IN_SOURCE_BUILD=1
+
+inherit distutils-r1
+
+DESCRIPTION="a fake file system that mocks the Python file system modules"
+HOMEPAGE="https://github.com/jmcgeheeiv/pyfakefs/ https://pypi.python.org/pypi/pyfakefs"
+SRC_URI="https://github.com/jmcgeheeiv/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]"
+RDEPEND=""
+
+PATCHES=( "${FILESDIR}"/${P}-sandbox-tests.patch )
+
+python_test() {
+ "${PYTHON}" all_tests.py || die "tests failed under ${EPYTHON}"
+}