@@ -117,7 +117,7 @@ describe('inspect', () => {
117117 {
118118 pkg : {
119119 name : 'markupsafe' ,
120- version : '2.1.4 ' ,
120+ version : '2.1.5 ' ,
121121 } ,
122122 directDeps : [ 'jinja2' ] ,
123123 } ,
@@ -131,7 +131,7 @@ describe('inspect', () => {
131131 {
132132 pkg : {
133133 name : 'markupsafe' ,
134- version : '2.1.4 ' ,
134+ version : '2.1.5 ' ,
135135 } ,
136136 directDeps : [ 'jinja2' ] ,
137137 } ,
@@ -173,7 +173,7 @@ describe('inspect', () => {
173173 {
174174 pkg : {
175175 name : 'markupsafe' ,
176- version : '2.1.4 ' ,
176+ version : '2.1.5 ' ,
177177 } ,
178178 directDeps : [ 'jinja2' ] ,
179179 } ,
@@ -289,6 +289,46 @@ describe('inspect', () => {
289289 } ) ;
290290 } ) ;
291291
292+ describe ( 'Circular deps' , ( ) => {
293+ let tearDown ;
294+ afterEach ( ( ) => {
295+ tearDown ( ) ;
296+ } ) ;
297+
298+ it ( 'Should get a valid dependency graph for circular dependencies' , async ( ) => {
299+ const test_case = {
300+ workspace : 'pip-app-circular-deps' ,
301+ uninstallPackages : [ ] ,
302+ pluginOpts : { allowEmpty : true } , // For Python 3.12
303+ expected : [
304+ {
305+ pkg : {
306+ name : 'apache-airflow' ,
307+ version : '2.8.1' ,
308+ } ,
309+ directDeps : [ 'apache-airflow' ] ,
310+ } ,
311+ ] ,
312+ } ;
313+ testUtils . chdirWorkspaces ( test_case . workspace ) ;
314+ testUtils . ensureVirtualenv ( test_case . workspace ) ;
315+ tearDown = testUtils . activateVirtualenv ( test_case . workspace ) ;
316+ testUtils . pipInstall ( ) ;
317+ if ( test_case . uninstallPackages ) {
318+ test_case . uninstallPackages . forEach ( ( pkg ) => {
319+ testUtils . pipUninstall ( pkg ) ;
320+ } ) ;
321+ }
322+
323+ const result = await inspect (
324+ '.' ,
325+ FILENAMES . pip . manifest ,
326+ test_case . pluginOpts
327+ ) ;
328+ expect ( result ) . toHaveProperty ( 'dependencyGraph' ) ;
329+ } ) ;
330+ } ) ;
331+
292332 describe ( 'poetry projects' , ( ) => {
293333 it ( 'should return expected dependencies for poetry-app' , async ( ) => {
294334 const workspace = 'poetry-app' ;
@@ -402,7 +442,7 @@ describe('inspect', () => {
402442 {
403443 pkg : {
404444 name : 'markupsafe' ,
405- version : '2.1.4 ' ,
445+ version : '2.1.5 ' ,
406446 } ,
407447 directDeps : [ 'jinja2' ] ,
408448 } ,
0 commit comments