<commit_before>package telebot

import (
	"fmt"
	"os"
	"testing"
)

func TestBot(t *testing.T) {
	if testing.Short() {
		t.Skip("skipping test in short mode.")
	}

	token := os.Getenv("TELEBOT_SECRET")
	if token == "" {
		fmt.Println("ERROR: " +
			"In order to test telebot functionality, you need to set up " +
			"TELEBOT_SECRET environmental variable, which represents an API " +
			"key to a Telegram bot.\n")
		t.Fatal("Could't find TELEBOT_SECRET, aborting.")
	}

	_, err := NewBot(token)
	if err != nil {
		t.Fatal("couldn't create bot:", err)
	}
}

func TestRecipient(_ *testing.T) {
	bot := Bot{}
	bot.SendMessage(User{}, "", nil)
	bot.SendMessage(Chat{}, "", nil)
}

func TestFile(t *testing.T) {
	file, err := NewFile("telebot.go")
	if err != nil {
		t.Fatal(err)
	}

	if file.Exists() {
		t.Fatal("Newly created file can't exist on Telegram servers!")
	}

	file.FileID = "magic"<commit_msg>Adjusting telebot_test.go for new changes<commit_after>package telebot

import (
	"fmt"
	"os"
	"testing"
)

func TestBot(t *testing.T) {
	if testing.Short() {
		t.Skip("skipping test in short mode.")
	}

	token := os.Getenv("TELEBOT_SECRET")
	if token == "" {
		fmt.Println("ERROR: " +
			"In order to test telebot functionality, you need to set up " +
			"TELEBOT_SECRET environmental variable, which represents an API " +
			"key to a Telegram bot.\n")
		t.Fatal("Could't find TELEBOT_SECRET, aborting.")
	}

	_, err := NewBot(token)
	if err != nil {
		t.Fatal("couldn't create bot:", err)
	}
}

func TestRecipient(_ *testing.T) {
	bot := Bot{}
	bot.Send(&User{}, "")
	bot.Send(&Chat{}, "")
}

func TestFile(t *testing.T) {
	file, err := NewFile("telebot.go")
	if err != nil {
		t.Fatal(err)
	}

	if file.Exists() {
		t.Fatal("Newly created file can't exist on Telegram servers!")
	}

	file.FileID = "magic"
{'fraction_non_alphanumeric': 0.16501103752759383, 'fraction_numerical': 0.0, 'mean_word_length': 3.6968911917098444, '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': '1252443', 'n_tokens_mistral': 745, 'n_tokens_neox': 694, 'n_words': 177}