<commit_before>require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../../fixtures/classes', __FILE__)
require File.expand_path('../../shared/partially_closable_sockets', __FILE__)

describe "TCPSocket partial closability" do
  
  before :each do
    @server = TCPServer.new("127.0.0.1", SocketSpecs.port)
    @s1 = TCPSocket.new("127.0.0.1", SocketSpecs.port)
    @s2 = @server.accept
  end

  after :each do
    @server.close
    @s1.close
    @s2.close
  end
  
  it_should_behave_like "partially closable sockets"
  
end<commit_msg>Temporary hack to avoid address in use exception.<commit_after>require File.expand_path('../../../../spec_helper', __FILE__)
require File.expand_path('../../fixtures/classes', __FILE__)
require File.expand_path('../../shared/partially_closable_sockets', __FILE__)

describe "TCPSocket partial closability" do
  
  before :each do
    @server = TCPServer.new("127.0.0.1", SocketSpecs.port+1)
    @s1 = TCPSocket.new("127.0.0.1", SocketSpecs.port+1)
    @s2 = @server.accept
  end

  after :each do
    @server.close
    @s1.close
    @s2.close
  end
  
  it_should_behave_like "partially closable sockets"
  
end

{'fraction_non_alphanumeric': 0.1496196111580727, 'fraction_numerical': 0.028740490278951817, 'mean_word_length': 3.4511278195488724, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '7144893', 'n_tokens_mistral': 426, 'n_tokens_neox': 417, 'n_words': 82}