The Nets have played up and down to their competition over the past few weeks, losing five games in a row to teams with winning records and then coming out of a seven-game stretch against sub-.500 teams with a 5-2 mark.

Two games against the Raptors — Saturday in Toronto and Wednesday at Barclays Center — sandwiched around Monday’s visit to Indiana, represent a stern test for the Nets, who currently hold the No. 7 playoff position in the Eastern Conference.

The defending NBA champion Raptors lost star forward Kawhi Leonard via free agency last summer, but they currently are behind only the league-best Bucks in the East standings. Toronto also carries a 13-game winning streak into Saturday night’s matchup.

“Just a tough matchup. Great challenge,” Nets coach Kenny Atkinson said of the Raptors after practice Friday in Brooklyn. “I feel like we’re playing better, and they’re on a back-to-back, that gives us a little more confidence.

“But I’ve said it since the beginning of the year, I think they’re a championship-contending team. I said it when we played them in the exhibition [season]. They’re really good. And they’re playing without [Marc] Gasol [hamstring], which makes it even more impressive. It’s a real credit to them.”

Leonard averaged 26.6 points per game in his lone season in Toronto following seven years in San Antonio, but he bolted Canada for a three-year deal worth $103 million from the Clippers to team up with Paul George this season in Los Angeles.

Still, Raptors power forward Pascal Siakam — voted the league’s most improved player in 2018-19 — has taken another leap forward this season, earning his first career All-Star start with career-highs of 23.7 points and 7.7 rebounds per appearance.

The starting backcourt of Fred VanVleet and 33-year-old All-Star point guard Kyle Lowry has combined for more than 37 points and 14 assists per game under second-year coach Nick Nurse. Former Net Rondae Hollis-Jefferson also is playing nearly 20 minutes per game off the bench, averaging 7.4 points and 4.9 rebounds.

“I think the fact that they had Kawhi, that was the excuse, that they won it because of Kawhi. I don’t think it’s that simple,” Atkinson said. “They’ve proven it, that they really do it in a team concept. They have an amazing amount of young guys contribute. I think that’s a credit to their development.

“Nick’s system obviously fits what they’re doing. Siakam taking a huge jump has been real important. I think Kyle, you talk about the winners in the league, guys who know how to win in this league, he’s right up there for me in the top five guys. He just knows how to win.”

The Nets (23-27), who made no trades by Thursday’s deadline, have lost both of the previous two meetings with the Raptors this season. They again will be without Kyrie Irving, who didn’t make the two-game road trip due to the sprained knee he suffered last Saturday against Washington.

“We obviously miss him on the floor. He’s our floor general,” center DeAndre Jordan said. “He’s in practice and film sessions and obviously trying to hurry up and get back to 100 percent healthy where we need him, but he’s still here and talking to guys and pointing out small different details that we need to do to get better as a team and to get as close to a full 48 minutes [against Toronto] as possible.”