<commit_before>#!/usr/bin/env python

import os
from time import sleep
from urllib2 import urlopen

import pytest

from circuits.core import workers
if not workers.HAS_MULTIPROCESSING:
    py.test.skip("Skip: No multiprocessing support")

from circuits.web import Controller, Server
from circuits import  handler, Event, Component, Process

class Hello(Event):
    """Hello Event"""

class Root(Controller):

    def index(self):
        return self.push(Hello(os.getpid()))

class MyProcess(Process):

    @handler("hello", target="*")
    def hello(self, pid):
        return "Hello %d i'm %d" % (pid, os.getpid())

    def run(self):
        while self.running:
            sleep(1)

def test(webapp):
    p = MyProcess(webapp)
    p.start()

    f = urlopen(webapp.server.base)
    s = f.read()
    assert s == "Hello %d i'm %d" % (os.getpid(), p._process.pid)<commit_msg>tests.web.test_web_process: Fixed incorrect name py.test<commit_after>#!/usr/bin/env python

import os
from time import sleep
from urllib2 import urlopen

import pytest

from circuits.core import workers
if not workers.HAS_MULTIPROCESSING:
    pytest.skip("Skip: No multiprocessing support")

from circuits.web import Controller, Server
from circuits import  handler, Event, Component, Process

class Hello(Event):
    """Hello Event"""

class Root(Controller):

    def index(self):
        return self.push(Hello(os.getpid()))

class MyProcess(Process):

    @handler("hello", target="*")
    def hello(self, pid):
        return "Hello %d i'm %d" % (pid, os.getpid())

    def run(self):
        while self.running:
            sleep(1)

def test(webapp):
    p = MyProcess(webapp)
    p.start()

    f = urlopen(webapp.server.base)
    s = f.read()
    assert s == "Hello %d i'm %d" % (os.getpid(), p._process.pid)
{'fraction_non_alphanumeric': 0.13099219620958752, 'fraction_numerical': 0.002229654403567447, 'mean_word_length': 3.4103194103194103, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1529572', 'n_tokens_mistral': 604, 'n_tokens_neox': 582, 'n_words': 169}