'If no compatibility layer is present, imports of gobject and friends
are disallowed.
We do this by running a process where we make sure gi.pygtkcompat
isn\'t present.'

def test_noCompatibilityLayer(self):

    if _PY3:
        raise SkipTest('Python3    always    has    the    compatibility    layer.')
    from twisted.internet import reactor
    if (not IReactorProcess.providedBy(reactor)):
        raise SkipTest('No    process    support    available    in    this    reactor.')
    result = Deferred()
    class Stdout(ProcessProtocol, ):
        data = ''
        def errReceived(self, err):
            print(err)
        def outReceived(self, data):
            self.data += data
        def processExited(self, reason):
            result.callback(self.data)
    path = FilePath(__file__).sibling('process_gireactornocompat.py').path
    pyExe = FilePath(sys.executable)._asBytesPath()
    reactor.spawnProcess(Stdout(), pyExe, [pyExe, path], env={'PYTHONPATH': ':'.join(sys.path)})
    result.addCallback(self.assertEqual, 'success')
    return result
