<s> from pypy . conftest import gettestobjspace <EOL> import py <EOL> import errno <EOL> def setup_module ( mod ) : <EOL> mod . space = gettestobjspace ( usemodules = [ '<STR_LIT>' ] ) <EOL> class AppTestErrno : <EOL> def setup_class ( cls ) : <EOL> cls . space = space <EOL> cls . w_errno = space . appexec ( [ ] , "<STR_LIT>" ) <EOL> cls . w_errorcode = space . wrap ( errno . errorcode ) <EOL> def test_posix ( self ) : <EOL> assert self . errno . __file__ <EOL> def test_constants ( self ) : <EOL> for code , name in self . errorcode . iteritems ( ) : <EOL> assert getattr ( self . errno , name ) == code <EOL> def test_errorcode ( self ) : <EOL> assert self . errorcode == self . errno . errorcode </s>
