<commit_before>package reader

import (
	"testing"
)

var (
	r = Reader{hostAddr: "192.168.20.112", port: 4001, busAddr: 255}
)

func TestReaderConnect(t *testing.T) {
	if err := Connect(hostAddr, 4001); err != nil {
		t.Errorf("Connect(%v) = %v", r.hostAddr, r.socketHnd)
	}
}

// func TestDisconnect(t *testing.T) {
// To-Do
// }<commit_msg>Corrected current tests to match the new Reader structure<commit_after>package reader

import (
	"testing"
)

var (
	r = Reader{hostAddr: "192.168.20.112", port: 4001, busAddr: 255}
)

func TestConnect(t *testing.T) {
	if err := r.Connect(); err != nil {
		t.Errorf("r.Connect() = %v", r.socketHnd)
	}
	r.Disconnect()
}

func TestDisconnect(t *testing.T) {
	r.Connect()
	if status, err := r.Disconnect(); err != nil {
		t.Errorf("r.Disconnect() = %v", status)
	}
}
{'fraction_non_alphanumeric': 0.18463444857496902, 'fraction_numerical': 0.04956629491945477, 'mean_word_length': 3.926829268292683, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '5247896', 'n_tokens_mistral': 356, 'n_tokens_neox': 319, 'n_words': 74}