Skip to content

Commit e215bcd

Browse files
committed
test: rename TestBitVector directory to tests
Rename the test directory from TestBitVector to tests and update all path references across the codebase. Summary of Changes: 1. Renamed Directory: - Rename TestBitVector/ to tests/ using git mv. - Relocate all test modules and input data files to tests/. 2. Updated Configuration & Path References: - Update testpaths = ["tests"] under [tool.pytest.ini_options] in pyproject.toml. - Update all hardcoded relative file paths from "TestBitVector/..." to "tests/..." in BitVector/BitVector.py. Verification: - uv run pytest executed cleanly with coverage reporting across all test suites in tests/. - uv run pre-commit run --all-files passed 100% cleanly across all hooks. - uv build verified that all test files under tests/ are properly included in the source distribution.
1 parent e08d894 commit e215bcd

14 files changed

Lines changed: 7 additions & 7 deletions

BitVector/BitVector.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3028,7 +3028,7 @@ def next(self):
30283028
print(bv8) # 1111111011111111111
30293029

30303030
print("\nConstruct a bit vector from what is in the file testinput1.txt:")
3031-
bv = BitVector(filename="TestBitVector/testinput1.txt")
3031+
bv = BitVector(filename="tests/testinput1.txt")
30323032
# print bv # nothing to show
30333033
bv1 = bv.read_bits_from_file(64)
30343034
print("\nPrint out the first 64 bits read from the file:")
@@ -3061,10 +3061,10 @@ def next(self):
30613061
"\nExperiment with writing an internally generated bit vector out to a disk file:"
30623062
)
30633063
bv1 = BitVector(bitstring="00001010")
3064-
FILEOUT = open("TestBitVector/test.txt", "wb")
3064+
FILEOUT = open("tests/test.txt", "wb")
30653065
bv1.write_to_file(FILEOUT)
30663066
FILEOUT.close()
3067-
bv2 = BitVector(filename="TestBitVector/test.txt")
3067+
bv2 = BitVector(filename="tests/test.txt")
30683068
bv3 = bv2.read_bits_from_file(32)
30693069
print(
30703070
"\nDisplay bit vectors written out to file and read back from the file and their respective lengths:"
@@ -3073,7 +3073,7 @@ def next(self):
30733073
print(str(len(bv1)) + " " + str(len(bv3)))
30743074

30753075
print("\nExperiments with reading a file from the beginning to end:")
3076-
bv = BitVector(filename="TestBitVector/testinput4.txt")
3076+
bv = BitVector(filename="tests/testinput4.txt")
30773077
print("\nHere are all the bits read from the file:")
30783078
while bv.more_to_read:
30793079
bv_read = bv.read_bits_from_file(64)
@@ -3084,13 +3084,13 @@ def next(self):
30843084
"\nExperiment with closing a file object and start extracting bit vectors from the file from the beginning again:"
30853085
)
30863086
bv.close_file_object()
3087-
bv = BitVector(filename="TestBitVector/testinput4.txt")
3087+
bv = BitVector(filename="tests/testinput4.txt")
30883088
bv1 = bv.read_bits_from_file(64)
30893089
print(
30903090
"\nHere are all the first 64 bits read from the file again after the file object was closed and opened again:"
30913091
)
30923092
print(bv1)
3093-
FILEOUT = open("TestBitVector/testinput5.txt", "wb")
3093+
FILEOUT = open("tests/testinput5.txt", "wb")
30943094
bv1.write_to_file(FILEOUT)
30953095
FILEOUT.close()
30963096

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dev = [
4242
]
4343

4444
[tool.pytest.ini_options]
45-
testpaths = ["TestBitVector"]
45+
testpaths = ["tests"]
4646
addopts = "-p no:doctest --cov=BitVector --cov-report=term-missing --cov-report=xml"
4747
pythonpath = ["."]
4848

0 commit comments

Comments
 (0)