<s> import os <EOL> import rdflib <EOL> import unittest <EOL> try : <EOL> import os . fork <EOL> import os . pipe <EOL> except ImportError : <EOL> from nose import SkipTest <EOL> raise SkipTest ( '<STR_LIT>' ) <EOL> class TestRandomSeedInFork ( unittest . TestCase ) : <EOL> def test_bnode_id_differs_in_fork ( self ) : <EOL> """<STR_LIT>""" <EOL> r , w = os . pipe ( ) <EOL> pid = os . fork ( ) <EOL> if pid : <EOL> pb1 = rdflib . term . BNode ( ) <EOL> os . close ( w ) <EOL> r = os . fdopen ( r ) <EOL> txt = r . read ( ) <EOL> os . waitpid ( pid , <NUM_LIT:0> ) <EOL> else : <EOL> os . close ( r ) <EOL> w = os . fdopen ( w , '<STR_LIT:w>' ) <EOL> cb = rdflib . term . BNode ( ) <EOL> w . write ( cb ) <EOL> w . close ( ) <EOL> os . _exit ( <NUM_LIT:0> ) <EOL> assert txt != str ( pb1 ) , "<STR_LIT>" + "<STR_LIT>" % ( <EOL> txt , str ( pb1 ) ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> unittest . main ( ) </s>
