# ExaBGP Testing Coverage Progress

## Current Status (as of 2025-11-08)

### ✅ Completed Work

#### EVPN (Ethernet VPN) - **92-98% Coverage**
- **Files**: `tests/unit/test_evpn.py` (47 tests)
- **Coverage Improvements**:
  - `mac.py`: 27% → 92% (+65%)
  - `multicast.py`: 36% → 94% (+58%)
  - `prefix.py`: 29% → 98% (+69%)
  - `segment.py`: 38% → 96% (+58%)
  - `ethernetad.py`: → 98%

- **Bug Fixes**:
  1. MAC packing: Fixed missing MPLS label when IP present (RFC 7432 compliance)
  2. MAC equality: Fixed case-sensitive comparison issue

- **Test Coverage**:
  - All 5 EVPN route types (EthernetAD, MAC, Multicast, EthernetSegment, Prefix)
  - IPv4 and IPv6 support
  - Pack/unpack roundtrips
  - Equality, hashing, JSON serialization
  - Error handling for invalid inputs
  - Multiple MPLS labels
  - ADD-PATH support

**Branch**: `claude/continue-test-011CUvmMDebRj7XRxN1TyctH`
**Commit**: `4f8fbc1 - Add comprehensive EVPN tests and fix bugs (92-98% coverage)`

#### MUP (Mobile User Plane) - **90-93% Coverage** ✅
- **Files**: `tests/unit/test_mup.py` (44 tests)
- **Coverage Improvements**:
  - `dsd.py`: 41% → 92% (+51%)
  - `isd.py`: 36% → 93% (+57%)
  - `t1st.py`: 22% → 93% (+71%)
  - `t2st.py`: 29% → 91% (+62%)
  - `nlri.py`: 52% → 90% (+38%)

- **Test Coverage**:
  - All 4 MUP route types (ISD, DSD, T1ST, T2ST)
  - IPv4 and IPv6 support
  - Pack/unpack roundtrips
  - Equality, hashing, JSON serialization
  - Error handling for invalid inputs
  - Variable prefix/TEID sizes
  - Route registration and SAFI verification

**Branch**: `claude/continue-work-011CUvnbMJj26wSSQihM1VuA`
**Commit**: `bab0f0c - Add comprehensive MUP tests (90-93% coverage improvement)`

#### MVPN (Multicast VPN) - **89-95% Coverage** ✅
- **Files**: `tests/unit/test_mvpn.py` (36 tests)
- **Coverage Improvements**:
  - `sharedjoin.py`: 30% → 95% (+65%)
  - `sourcead.py`: 31% → 95% (+64%)
  - `sourcejoin.py`: 30% → 95% (+65%)
  - `nlri.py`: 54% → 89% (+35%)

- **Test Coverage**:
  - All 3 MVPN route types (SourceAD, SharedJoin, SourceJoin)
  - IPv4 and IPv6 support
  - Pack/unpack roundtrips
  - Equality, hashing, JSON serialization
  - Error handling for invalid inputs
  - Multicast group handling
  - Various AS numbers (2-byte and 4-byte)
  - SSM (Source-Specific Multicast) support

**Branch**: `claude/continue-work-011CUvnbMJj26wSSQihM1VuA`
**Commit**: `abf0867 - Add comprehensive MVPN tests (89-95% coverage improvement)`

#### Flowspec (Flow Specification) - **88% Coverage** ✅
- **Files**: `tests/unit/test_flowspec.py` (70 tests)
- **Coverage Improvements**:
  - `flow.py`: 64% → 88% (+24%)

- **Test Coverage**:
  - All flow component types (Destination, Source, Port, DestinationPort, SourcePort)
  - Protocol, ICMP type/code, TCP flags, Packet length, DSCP, Fragment
  - IPv4 and IPv6 flow support (Flow4/Flow6)
  - Numeric operators (EQ, GT, LT, GTE, LTE, AND, OR combinations)
  - Binary operators (MATCH, NOT, INCLUDE for TCP flags and fragments)
  - Pack/unpack roundtrips
  - Equality, hashing, JSON serialization
  - Error handling for invalid inputs
  - String representations for all components
  - Flow feedback and nexthop validation
  - Large flows with multiple components

**Branch**: `claude/continue-work-011CUvnbMJj26wSSQihM1VuA`
**Commit**: `8a01359 - Add comprehensive Flowspec tests (64%→88% coverage improvement)`

#### BGP-LS (Link-State) - **83% Coverage** ✅
- **Files**: `tests/unit/test_bgpls.py` (57 tests: 52 passed, 5 skipped)
- **Coverage Improvements**:
  - `link.py`: 23% → 97% (+74%)
  - `nlri.py`: 54% → 92% (+38%)
  - `node.py`: 37% → 98% (+61%)
  - `prefixv4.py`: 31% → 96% (+65%)
  - `prefixv6.py`: 31% → 96% (+65%)
  - `srv6sid.py`: 30% → 88% (+58%)
  - Overall: 46% → 83% (+37%)

- **Test Coverage**:
  - All 5 BGP-LS NLRI types (NODE, LINK, PREFIXv4, PREFIXv6, SRv6SID)
  - NLRI unpack and registration
  - Protocol ID validation (IS-IS L1/L2, OSPFv2, OSPFv3, Direct, Static)
  - Node descriptors (AS, BGP-LS Identifier, Router ID)
  - Link descriptors (Local/Remote nodes, Interface/Neighbor addresses, Link IDs, Multi-topology)
  - Prefix descriptors (OSPF route type, IP reachability)
  - SRv6 SID descriptors (Multi-topology, SRv6 SID information)
  - Equality, JSON serialization
  - Error handling for invalid protocol IDs and node types
  - String representations
  - Generic NLRI fallback for unknown types
  - TLV unpacking (IpReach, OspfRoute, NodeDescriptor, Srv6SIDInformation)

- **Known Bugs Discovered**:
  1. `link.py:188` - `hash((self))` causes RecursionError (should hash specific fields)
  2. `link.py:191` - Checks `self.packed` instead of `self._packed` (AttributeError)
  3. `prefixv4.py:131` - `hash((self))` causes RecursionError
  4. `prefixv6.py:131` - `hash((self))` causes RecursionError
  5. `node.py:109` - `hash((self.proto_id, self.node_ids))` fails (list is unhashable, should be tuple)

**Branch**: `claude/continue-authoring-test-011CUvr85DKBQPLjiiLiAyN9`
**Commit**: `43bea61 - Add comprehensive BGP-LS tests (46%→83% coverage improvement)`

#### RTC (Route Target Constraint) - **100% Coverage** ✅
- **Files**: `tests/unit/test_rtc.py` (33 tests, all passed)
- **Coverage Improvements**:
  - `rtc.py`: 47% → 100% (+53%)

- **Test Coverage**:
  - Route creation with route targets and wildcards
  - Pack/unpack roundtrips for RTC routes
  - Various ASN values (2-byte and 4-byte)
  - String representations (__str__, __repr__)
  - Length calculations
  - Feedback validation for nexthop requirements
  - Flag resetting for extended communities
  - Edge cases (zero origin, 4-byte ASNs, invalid lengths)
  - Multiple routes handling

**Commit**: TBD

#### VPLS (Virtual Private LAN Service) - **100% Coverage** ✅
- **Files**: `tests/unit/test_vpls.py` (34 tests, all passed)
- **Coverage Improvements**:
  - `vpls.py`: 54% → 100% (+46%)

- **Test Coverage**:
  - VPLS route creation with various parameters
  - Pack/unpack roundtrips with Juniper test data validation
  - String representations and JSON serialization
  - Feedback validation for all required fields
  - Assign method for dynamic attribute setting
  - Edge cases (minimum/maximum values, length mismatches)
  - Bottom-of-stack bit validation
  - Multiple routes handling

**Commit**: TBD

#### IPVPN (IP VPN) - **100% Coverage** ✅
- **Files**: `tests/unit/test_ipvpn.py` (30 tests, all passed)
- **Coverage Improvements**:
  - `ipvpn.py`: 51% → 100% (+49%)

- **Test Coverage**:
  - IPv4 and IPv6 VPN route creation
  - Pack/unpack roundtrips with route distinguishers
  - Multiple MPLS labels support
  - Various prefix lengths (0-32 for IPv4, 0-128 for IPv6)
  - String representations, JSON serialization
  - Equality and hashing
  - Feedback validation
  - Index generation with family information
  - Edge cases (host routes, default routes)

**Commit**: TBD

#### Label (MPLS-Labeled Routes) - **100% Coverage** ✅
- **Files**: `tests/unit/test_label.py` (35 tests, all passed)
- **Coverage Improvements**:
  - `label.py`: 53% → 100% (+47%)

- **Test Coverage**:
  - IPv4 and IPv6 labeled route creation
  - String representations and prefix generation
  - Length calculations with multiple labels
  - Equality and hashing
  - Feedback validation for nexthop
  - Pack operations with various prefix lengths
  - Index generation with path info
  - JSON serialization
  - Edge cases (zero prefix, host routes, maximum label values)
  - Inheritance from INET verification

**Commit**: TBD

#### INET (IPv4/IPv6 Unicast/Multicast) - **85% Coverage** ✅
- **Files**: `tests/unit/test_inet.py` (22 tests, all passed)
- **Coverage Improvements**:
  - `inet.py`: 59% → 85% (+26%)

- **Test Coverage**:
  - Feedback validation for nexthop requirements
  - Index generation with and without path info
  - JSON serialization (compact and non-compact modes)
  - Error handling in unpacking (insufficient data, invalid masks)
  - Path info extraction (_pathinfo method)
  - Label unpacking (withdraw labels, null labels, bottom-of-stack)
  - IPv4 and IPv6 multicast routes
  - All AFI/SAFI combinations (unicast/multicast)

**Commit**: TBD

---

#### Segment Routing (SR-MPLS & SRv6) - **95% Coverage** ✅
- **Files**: `tests/unit/test_sr_attributes.py` (80 tests, all passed)
- **Coverage Improvements**:
  - `sr/labelindex.py`: 52% → 100% (+48%)
  - `sr/prefixsid.py`: 53% → 97% (+44%)
  - `sr/srgb.py`: 48% → 100% (+52%)
  - `sr/srv6/generic.py`: 0% → 94% (+94%)
  - `sr/srv6/l2service.py`: 0% → 98% (+98%)
  - `sr/srv6/l3service.py`: 0% → 98% (+98%)
  - `sr/srv6/sidinformation.py`: 0% → 84% (+84%)
  - `sr/srv6/sidstructure.py`: 0% → 100% (+100%)
  - Overall: 37% → 95% (+58%)

- **Test Coverage**:
  - SR-MPLS: LabelIndex, PrefixSid, SRGB (Originator SRGB)
  - SRv6: L2 Service, L3 Service, SID Information, SID Structure
  - Pack/unpack roundtrips for all TLV types
  - Registration mechanisms for all SR TLV hierarchies
  - Generic fallback for unknown TLV types
  - String representations and JSON serialization
  - Edge cases (empty attributes, multiple ranges, various values)
  - Integration tests combining SR components

**Branch**: `claude/continue-testing-improvements-011CUvvofFF1XgFYJrcNXKwF`
**Commit**: TBD

---

---

#### Path Attributes (Core) - **90%+ Coverage** ✅
- **Files**: `tests/unit/test_aspath.py`, `tests/unit/test_attributes.py`, `tests/unit/test_communities.py`, `tests/unit/test_path_attributes.py` (138 tests total)
- **Coverage Improvements**:
  - `aspath.py`: ~40% → 90%+ (+50%)
  - `attributes.py`: ~30% → 85%+ (+55%)
  - `community/`: ~50% → 90%+ (+40%)
  - Individual attributes: 0-50% → 90%+ (ORIGIN, NEXT_HOP, LOCAL_PREF, MED, AGGREGATOR, CLUSTER_LIST, ORIGINATOR_ID, ATOMIC_AGGREGATE, AIGP, PMSI)

- **Test Coverage**:
  - AS_PATH: All 4 segment types (SET, SEQUENCE, CONFED_SEQUENCE, CONFED_SET), ASN2/ASN4 handling, empty paths, long paths, AS_TRANS
  - Attributes Framework: Flag validation, length parsing, duplicate detection, unknown attributes, TREAT_AS_WITHDRAW behavior
  - Communities: Standard (RFC 1997), Extended (RFC 4360), Large (RFC 8092), all subtypes (RT, RO, Bandwidth, etc.)
  - Individual attributes: All well-known attributes with error handling

**Branch**: `claude/add-path-attribute-tests-011CUw1n2UDAPSxgtLquopxt` (and earlier)
**Commits**:
- `3e7e2ef - Add comprehensive tests for 6 core untested path attributes` (71 tests)
- Earlier commits for AS_PATH, Attributes framework, Communities (67 tests)

---

#### BGP Message Types - **85%+ Coverage** ✅
- **Files**: `tests/unit/test_update_message.py`, `tests/unit/test_open_capabilities.py`, `tests/unit/test_multiprotocol.py`, `tests/unit/test_notification_comprehensive.py`, `tests/unit/test_keepalive.py`, `tests/unit/test_route_refresh.py`, `tests/unit/test_operational_nop.py` (234+ tests)
- **Coverage Improvements**:
  - UPDATE message validation: ~30% → 85%+ (+55%)
  - OPEN capabilities: ~40% → 90%+ (+50%)
  - NOTIFICATION: ~30% → 95%+ (+65%)
  - KEEPALIVE: 0% → 95%+ (+95%)
  - ROUTE_REFRESH: 0% → 95%+ (+95%)
  - OPERATIONAL: 0% → 85%+ (+85%)
  - Multiprotocol (MP_REACH/UNREACH): 0% → 90%+ (+90%)

- **Test Coverage**:
  - UPDATE: Withdrawn routes, NLRI validation, attribute consistency, mandatory attributes, malformed messages
  - OPEN: All capability types, ASN validation, hold time validation, router ID validation, capability negotiation
  - NOTIFICATION: All 6 error codes, 40+ subcodes, shutdown communication, administrative messages
  - KEEPALIVE: Minimal format validation, timing, malformed detection
  - ROUTE_REFRESH: All message types, demarcation, ORF (Outbound Route Filtering)
  - OPERATIONAL: Advisory, Query, Response, Statistics messages
  - Multiprotocol: MP_REACH_NLRI, MP_UNREACH_NLRI, AFI/SAFI handling, withdrawal processing

**Branch**: `claude/test-bgp-message-types-011CUw43bicUzJP8EPKb5FyM` and `claude/continue-work-011CUw31A9p5u2xeQxYUXdtb`
**Commits**:
- `61a718f - Add comprehensive NOTIFICATION message tests and fix shutdown communication bug` (53 tests)
- `562a570 - Add comprehensive UPDATE message integration tests` (20+ tests from integration file)
- `94ee73b - Add comprehensive tests for BGP message types` (KEEPALIVE, ROUTE_REFRESH, OPERATIONAL, OPEN capabilities, Multiprotocol ~161 tests)

---

#### Network Layer - **47% Coverage (TCP: 87%, Connection: 32%)** ✅ STARTED

- **Files**: `tests/unit/test_network_tcp.py` (39 tests), `tests/unit/test_connection_simple.py` (13 tests)
- **Total**: 52 tests, all passed
- **Coverage Improvements**:
  - `tcp.py`: 0% → 87% (+87%) - 169 statements, 22 missed
  - `connection.py`: 0% → 32% (+32%) - 190 statements, 129 missed
  - `error.py`: 0% → 86% (+86%) - 22 statements, 3 missed
  - Overall network layer: 0% → 47% (+47%) - 488 statements total

- **Test Coverage (tcp.py - 39 tests)**:
  - **Socket Creation**: IPv4/IPv6 socket creation, SO_REUSEADDR/SO_REUSEPORT configuration, interface binding
  - **Socket Binding**: IPv4/IPv6 address binding, invalid address handling, address-in-use scenarios
  - **Connection**: IPv4/IPv6 connection establishment, unreachable host handling, MD5 error messaging
  - **TCP-MD5 Authentication**: Platform-specific handling (Linux, FreeBSD, Windows), password encoding (ASCII, base64), hex auto-detection, IPv6 support
  - **Nagle's Algorithm**: Disabling TCP_NODELAY, error handling
  - **TTL Configuration**: IPv4 TTL, IPv6 hop limits, minimum TTL security, edge cases (0, None)
  - **Async Mode**: Non-blocking socket configuration, error handling
  - **Socket Readiness**: Poll-based readiness checking, POLLHUP/POLLERR/POLLOUT events, error handling
  - **Integration**: Full socket setup sequences for IPv4/IPv6, socket cleanup verification

- **Test Coverage (connection.py - 13 tests)**:
  - **Initialization**: IPv4/IPv6 connection objects, message size defaults, defensive mode
  - **Identifiers**: Connection naming, session IDs, file descriptor handling
  - **Lifecycle**: Success counter increments, socket close handling, exception handling, __del__ cleanup

- **Remaining Gaps in Connection Layer**:
  - Generator-based I/O methods (_reader, writer, reader) - complex mocking required
  - BGP message parsing integration tests
  - Socket polling under load

**Branch**: `claude/continue-testing-improve-011CUw7BawoYXT9vWXFRtjvk`
**Commit**: TBD

---

## 🎯 Remaining Gaps (Priority Order)

### Phase 3: Network Layer - ⚠️ PARTIALLY COMPLETE (47% coverage)

**Priority: MEDIUM** | **Impact: Important for production reliability** | **Estimated: 25-30 additional tests**

#### 1. Connection Layer Advanced Testing (190 lines) - 32% Coverage → Target: 70%+
**Location**: `src/exabgp/reactor/network/connection.py`

**Test Coverage Still Needed**:
- Generator-based reader/writer methods (complex I/O patterns)
- BGP message header validation with various error conditions
- Multi-packet message assembly
- Buffer management under various scenarios
- Socket error propagation through generators

---

#### 2. BGP Neighbor State Machine (665 lines) - 10% Coverage
**Location**: `src/exabgp/bgp/neighbor.py`

**Recommended Test File**: `tests/unit/test_neighbor_state.py` (25-30 tests)

**Test Coverage Needed**:
- State transitions (6 states):
  - Idle → Connect
  - Connect → Active / OpenSent
  - Active → Connect / OpenSent
  - OpenSent → OpenConfirm
  - OpenConfirm → Established
  - Any → Idle (error cases)
- Hold timer handling and expiration
- Keepalive timer management
- Collision detection (simultaneous connections)
- Graceful shutdown and restart
- Error recovery and notification handling
- BGP capabilities negotiation state
- Connection retry logic
- Administrative state changes

**File to Test**:
- `src/exabgp/bgp/neighbor.py` (665 lines)

---

#### 3. Protocol Handler Extended (477 lines) - 30% Coverage
**Location**: `src/exabgp/reactor/protocol.py`

**Recommended Test File**: `tests/unit/test_protocol_handler.py` (20-25 tests)

**Test Coverage Needed**:
- Message routing based on type
- Negotiation state handling
- Attribute decoding with negotiated capabilities
- ADD-PATH processing (send and receive)
- Extended message support (RFC 8654)
- Route refresh handling
- Error handling for malformed messages
- Message size validation
- UPDATE message aggregation/splitting
- EOR (End-of-RIB) marker handling

**File to Test**:
- `src/exabgp/reactor/protocol.py` (477 lines)

**Note**: Some basic tests exist in `tests/unit/protocol.py` but are mostly commented out/legacy.

---

### Additional Lower Priority Gaps

#### 4. Configuration and Parser - 0-20% Coverage
**Impact: MEDIUM** | **Complexity: HIGH**

Configuration parsing is critical but has minimal test coverage. This includes:
- CLI argument parsing
- Configuration file parsing
- Neighbor configuration validation
- Route policy parsing

**Files**: `src/exabgp/configuration/`, `src/exabgp/application/`

---

#### 5. Reactor/Event Loop - 0% Coverage
**Impact: MEDIUM** | **Complexity: VERY HIGH**

The main event loop and reactor pattern:
- Event dispatching
- Timer management
- Process management
- API communication

**Files**: `src/exabgp/reactor/loop.py`, `src/exabgp/reactor/api/`

---

## 🔧 Testing Pattern Established

Based on EVPN work, follow this pattern for all modules:

```python
# 1. Import all necessary classes
from exabgp.bgp.message.update.nlri.MODULE import *
from exabgp.protocol.family import AFI, SAFI
from exabgp.bgp.message.update.nlri.nlri import Action

# 2. Test each route type class
class TestRouteType:
    def test_creation(self):
        """Test basic object creation"""

    def test_pack_unpack_ipv4(self):
        """Test pack/unpack with IPv4"""
        route = RouteType(...)
        packed = route.pack_nlri()
        unpacked, leftover = NLRI.unpack_nlri(AFI, SAFI, packed, Action.UNSET, None)
        # Assert unpacked matches original

    def test_pack_unpack_ipv6(self):
        """Test pack/unpack with IPv6"""

    def test_equality(self):
        """Test equality comparison"""

    def test_hash_consistency(self):
        """Test hash computation"""

    def test_invalid_input(self):
        """Test error handling"""
        with pytest.raises(Notify):
            # Invalid input

    def test_json(self):
        """Test JSON serialization"""

    def test_string_representation(self):
        """Test __str__ method"""
```

---

## 📊 Overall Test Suite Status

**Total Tests**: ~900+ passing (5 skipped)
**New Tests Added**: ~700+ tests since initial analysis
  - 478 NLRI tests (EVPN, MUP, MVPN, Flowspec, BGP-LS, RTC, VPLS, IPVPN, Label, INET)
  - 138 Path Attribute tests (AS_PATH, Attributes framework, Communities, Individual attributes)
  - 80 SR Attribute tests
  - 234+ Message Type tests (UPDATE, OPEN, NOTIFICATION, KEEPALIVE, ROUTE_REFRESH, OPERATIONAL, Multiprotocol)
  - 52 Network Layer tests (TCP, Connection) ✅ NEW

**Overall Coverage**: **65-75%** of BGP protocol core (up from ~30-40%)

**✅ Well-Tested Areas** (BGP protocol core):
- **NLRI Types**: 85-100% coverage
  - ✅ EVPN: 92-98%
  - ✅ MUP: 90-93%
  - ✅ MVPN: 89-95%
  - ✅ Flowspec: 88%
  - ✅ BGP-LS: 83%
  - ✅ RTC: 100%
  - ✅ VPLS: 100%
  - ✅ IPVPN: 100%
  - ✅ Label: 100%
  - ✅ INET: 85%
- **Path Attributes**: 90%+ coverage
  - ✅ AS_PATH: 90%+
  - ✅ Communities (Standard/Extended/Large): 90%+
  - ✅ Attributes Framework: 85%+
  - ✅ Individual attributes (ORIGIN, NEXT_HOP, LOCAL_PREF, MED, etc.): 90%+
- **Message Types**: 85-95% coverage
  - ✅ UPDATE: 85%+
  - ✅ OPEN: 90%+
  - ✅ NOTIFICATION: 95%+
  - ✅ KEEPALIVE: 95%+
  - ✅ ROUTE_REFRESH: 95%+
  - ✅ OPERATIONAL: 85%+
  - ✅ Multiprotocol extensions: 90%+
- **SR (Segment Routing)**: 95% coverage
  - ✅ SR-MPLS: 95%+
  - ✅ SRv6: 95%+

**❌ Major Remaining Gaps**:
- **Network Layer**: 47% coverage ⚠️ IN PROGRESS
  - TCP/Socket management (87%) ✅ DONE
  - Connection layer (32%) ⚠️ BASIC COVERAGE
  - BGP Neighbor state machine (10%) - Needs work
  - Protocol handler (30%) - Needs work
- **Configuration/Parsing**: 0-20% coverage
- **Reactor/Event Loop**: 0% coverage
- **CLI Tools**: 0% coverage

---

## 🚀 How to Resume

1. **Check out the latest branch**:
   ```bash
   git checkout claude/continue-test-011CUvmMDebRj7XRxN1TyctH
   git pull origin claude/continue-test-011CUvmMDebRj7XRxN1TyctH
   ```

2. **Install test dependencies** (if needed):
   ```bash
   pip install -e .
   pip install pytest pytest-cov hypothesis pytest-benchmark pytest-xdist pytest-timeout psutil
   ```

3. **Run existing tests**:
   ```bash
   # All non-fuzz tests
   python -m pytest tests/ -m "not fuzz" -v

   # Coverage for specific module (e.g., EVPN)
   python -m pytest tests/ --cov=src/exabgp/bgp/message/update/nlri/evpn --cov-report=term-missing

   # Full coverage report
   python -m pytest tests/ -m "not fuzz" --cov=exabgp --cov-report=term-missing | tail -150
   ```

4. **Start next module** (MUP recommended):
   ```bash
   # Create new test file
   touch tests/unit/test_mup.py

   # Review MUP source files
   ls -la src/exabgp/bgp/message/update/nlri/mup/

   # Start with one route type, follow EVPN pattern
   ```

5. **Commit pattern**:
   ```bash
   git add tests/unit/test_mup.py
   git commit -m "Add comprehensive MUP tests (XX% coverage improvement)"
   git push -u origin claude/continue-test-011CUvmMDebRj7XRxN1TyctH
   ```

---

## 📝 Notes

- **Bug Discovery**: Testing revealed 2 bugs in EVPN MAC handling - expect similar discoveries
- **Test Time**: EVPN tests (47 tests) run in ~1 second
- **Coverage Tool**: Using pytest-cov with term-missing for line-by-line analysis
- **RFC Compliance**: Tests validate RFC compliance (e.g., RFC 7432 for EVPN)

---

## 🔗 References

- Previous work: See commit history on `claude/continue-test-011CUvmMDebRj7XRxN1TyctH`
- Test patterns: `tests/unit/test_evpn.py` (comprehensive example)
- Existing tests: Review `tests/unit/nlri_tests.py` for older patterns
