Error in `value[[3L]](cond)`: Error in reading GML file: D:\temp\RtmpgriD5n\filec68c717836a6
At vendor/cigraph/src/io/gml.c:486 : No 'graph' object in GML file. Parse error

library(arlclustering)  # Adjust the package name as needed
# Define the path to a sample GML file for testing
sample_gml_file <- system.file("extdata", "karate.gml", package = "arlclustering") # Adjust as needed
# Test cases for arlc_get_network_dataset
test_that("arlc_get_network_dataset loads the graph and computes properties correctly", {
# Skip test if the sample GML file is not available
skip_if_not(file.exists(sample_gml_file), "Sample GML file not found")
# Call the function with a valid GML file
result <- arlc_get_network_dataset(sample_gml_file, "Karate Club")
# Check if the graph object is of class igraph
# Check if the average degree is correct
test_that("arlc_get_network_dataset handles non-existent files correctly", {
# Expect an error when a non-existent file is provided
expect_error(arlc_get_network_dataset("non_existent_file.gml", "Non Existent"), "The network file does not exist")
test_that("arlc_get_network_dataset handles unreadable files correctly", {
# Create a temporary file and make it unreadable
# Ensure the file is deleted and permissions are restored after the test
# Expect an error when an unreadable file is provided
expect_error(arlc_get_network_dataset(temp_file, "Unreadable File"), "The network file is not readable")

"arlc_get_network_dataset loads the graph and computes properties correctly"
"arlc_get_network_dataset handles non-existent files correctly"
"arlc_get_network_dataset handles unreadable files correctly"

arlc_get_network_dataset handles unreadable files correctly